sfdx-hardis 6.6.1-alpha202510111519.0 → 6.6.1-beta202510111519.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.
- package/CHANGELOG.md +1 -0
- package/lib/common/gitProvider/azureDevops.js +3 -34
- package/lib/common/gitProvider/azureDevops.js.map +1 -1
- package/lib/common/notifProvider/apiProvider.d.ts +6 -0
- package/lib/common/notifProvider/apiProvider.js +138 -13
- package/lib/common/notifProvider/apiProvider.js.map +1 -1
- package/oclif.manifest.json +815 -815
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -4421,135 +4421,6 @@
|
|
|
4421
4421
|
"ws:work:hardis"
|
|
4422
4422
|
]
|
|
4423
4423
|
},
|
|
4424
|
-
"hardis:git:pull-requests:extract": {
|
|
4425
|
-
"aliases": [],
|
|
4426
|
-
"args": {},
|
|
4427
|
-
"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",
|
|
4428
|
-
"examples": [
|
|
4429
|
-
"$ sf hardis:git:pull-requests:extract",
|
|
4430
|
-
"$ sf hardis:git:pull-requests:extract --target-branch main --status merged"
|
|
4431
|
-
],
|
|
4432
|
-
"flags": {
|
|
4433
|
-
"json": {
|
|
4434
|
-
"description": "Format output as json.",
|
|
4435
|
-
"helpGroup": "GLOBAL",
|
|
4436
|
-
"name": "json",
|
|
4437
|
-
"allowNo": false,
|
|
4438
|
-
"type": "boolean"
|
|
4439
|
-
},
|
|
4440
|
-
"flags-dir": {
|
|
4441
|
-
"helpGroup": "GLOBAL",
|
|
4442
|
-
"name": "flags-dir",
|
|
4443
|
-
"summary": "Import flag values from a directory.",
|
|
4444
|
-
"hasDynamicHelp": false,
|
|
4445
|
-
"multiple": false,
|
|
4446
|
-
"type": "option"
|
|
4447
|
-
},
|
|
4448
|
-
"target-branch": {
|
|
4449
|
-
"char": "t",
|
|
4450
|
-
"description": "Target branch of PRs",
|
|
4451
|
-
"name": "target-branch",
|
|
4452
|
-
"hasDynamicHelp": false,
|
|
4453
|
-
"multiple": false,
|
|
4454
|
-
"type": "option"
|
|
4455
|
-
},
|
|
4456
|
-
"status": {
|
|
4457
|
-
"char": "x",
|
|
4458
|
-
"description": "Status of the PR",
|
|
4459
|
-
"name": "status",
|
|
4460
|
-
"hasDynamicHelp": false,
|
|
4461
|
-
"multiple": false,
|
|
4462
|
-
"options": [
|
|
4463
|
-
"open",
|
|
4464
|
-
"merged",
|
|
4465
|
-
"abandoned"
|
|
4466
|
-
],
|
|
4467
|
-
"type": "option"
|
|
4468
|
-
},
|
|
4469
|
-
"min-date": {
|
|
4470
|
-
"char": "m",
|
|
4471
|
-
"description": "Minimum date for PR",
|
|
4472
|
-
"name": "min-date",
|
|
4473
|
-
"hasDynamicHelp": false,
|
|
4474
|
-
"multiple": false,
|
|
4475
|
-
"type": "option"
|
|
4476
|
-
},
|
|
4477
|
-
"outputfile": {
|
|
4478
|
-
"char": "f",
|
|
4479
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
4480
|
-
"name": "outputfile",
|
|
4481
|
-
"hasDynamicHelp": false,
|
|
4482
|
-
"multiple": false,
|
|
4483
|
-
"type": "option"
|
|
4484
|
-
},
|
|
4485
|
-
"debug": {
|
|
4486
|
-
"char": "d",
|
|
4487
|
-
"description": "Activate debug mode (more logs)",
|
|
4488
|
-
"name": "debug",
|
|
4489
|
-
"allowNo": false,
|
|
4490
|
-
"type": "boolean"
|
|
4491
|
-
},
|
|
4492
|
-
"websocket": {
|
|
4493
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
4494
|
-
"name": "websocket",
|
|
4495
|
-
"hasDynamicHelp": false,
|
|
4496
|
-
"multiple": false,
|
|
4497
|
-
"type": "option"
|
|
4498
|
-
},
|
|
4499
|
-
"skipauth": {
|
|
4500
|
-
"description": "Skip authentication check when a default username is required",
|
|
4501
|
-
"name": "skipauth",
|
|
4502
|
-
"allowNo": false,
|
|
4503
|
-
"type": "boolean"
|
|
4504
|
-
}
|
|
4505
|
-
},
|
|
4506
|
-
"hasDynamicHelp": false,
|
|
4507
|
-
"hiddenAliases": [],
|
|
4508
|
-
"id": "hardis:git:pull-requests:extract",
|
|
4509
|
-
"pluginAlias": "sfdx-hardis",
|
|
4510
|
-
"pluginName": "sfdx-hardis",
|
|
4511
|
-
"pluginType": "core",
|
|
4512
|
-
"strict": true,
|
|
4513
|
-
"enableJsonFlag": true,
|
|
4514
|
-
"title": "Extract pull requests",
|
|
4515
|
-
"requiresProject": true,
|
|
4516
|
-
"isESM": true,
|
|
4517
|
-
"relativePath": [
|
|
4518
|
-
"lib",
|
|
4519
|
-
"commands",
|
|
4520
|
-
"hardis",
|
|
4521
|
-
"git",
|
|
4522
|
-
"pull-requests",
|
|
4523
|
-
"extract.js"
|
|
4524
|
-
],
|
|
4525
|
-
"aliasPermutations": [],
|
|
4526
|
-
"permutations": [
|
|
4527
|
-
"hardis:git:pull-requests:extract",
|
|
4528
|
-
"git:hardis:pull-requests:extract",
|
|
4529
|
-
"git:pull-requests:hardis:extract",
|
|
4530
|
-
"git:pull-requests:extract:hardis",
|
|
4531
|
-
"hardis:pull-requests:git:extract",
|
|
4532
|
-
"pull-requests:hardis:git:extract",
|
|
4533
|
-
"pull-requests:git:hardis:extract",
|
|
4534
|
-
"pull-requests:git:extract:hardis",
|
|
4535
|
-
"hardis:pull-requests:extract:git",
|
|
4536
|
-
"pull-requests:hardis:extract:git",
|
|
4537
|
-
"pull-requests:extract:hardis:git",
|
|
4538
|
-
"pull-requests:extract:git:hardis",
|
|
4539
|
-
"hardis:git:extract:pull-requests",
|
|
4540
|
-
"git:hardis:extract:pull-requests",
|
|
4541
|
-
"git:extract:hardis:pull-requests",
|
|
4542
|
-
"git:extract:pull-requests:hardis",
|
|
4543
|
-
"hardis:extract:git:pull-requests",
|
|
4544
|
-
"extract:hardis:git:pull-requests",
|
|
4545
|
-
"extract:git:hardis:pull-requests",
|
|
4546
|
-
"extract:git:pull-requests:hardis",
|
|
4547
|
-
"hardis:extract:pull-requests:git",
|
|
4548
|
-
"extract:hardis:pull-requests:git",
|
|
4549
|
-
"extract:pull-requests:hardis:git",
|
|
4550
|
-
"extract:pull-requests:git:hardis"
|
|
4551
|
-
]
|
|
4552
|
-
},
|
|
4553
4424
|
"hardis:doc:extract:permsetgroups": {
|
|
4554
4425
|
"aliases": [],
|
|
4555
4426
|
"args": {},
|
|
@@ -4740,13 +4611,13 @@
|
|
|
4740
4611
|
"generate:plugin:doc:hardis"
|
|
4741
4612
|
]
|
|
4742
4613
|
},
|
|
4743
|
-
"hardis:
|
|
4614
|
+
"hardis:git:pull-requests:extract": {
|
|
4744
4615
|
"aliases": [],
|
|
4745
4616
|
"args": {},
|
|
4746
|
-
"description": "\n## Command Behavior\n\n**
|
|
4617
|
+
"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",
|
|
4747
4618
|
"examples": [
|
|
4748
|
-
"$ sf hardis:
|
|
4749
|
-
"$ sf hardis:
|
|
4619
|
+
"$ sf hardis:git:pull-requests:extract",
|
|
4620
|
+
"$ sf hardis:git:pull-requests:extract --target-branch main --status merged"
|
|
4750
4621
|
],
|
|
4751
4622
|
"flags": {
|
|
4752
4623
|
"json": {
|
|
@@ -4764,112 +4635,39 @@
|
|
|
4764
4635
|
"multiple": false,
|
|
4765
4636
|
"type": "option"
|
|
4766
4637
|
},
|
|
4767
|
-
"
|
|
4768
|
-
"char": "
|
|
4769
|
-
"description": "
|
|
4770
|
-
"name": "
|
|
4771
|
-
"required": true,
|
|
4638
|
+
"target-branch": {
|
|
4639
|
+
"char": "t",
|
|
4640
|
+
"description": "Target branch of PRs",
|
|
4641
|
+
"name": "target-branch",
|
|
4772
4642
|
"hasDynamicHelp": false,
|
|
4773
4643
|
"multiple": false,
|
|
4774
4644
|
"type": "option"
|
|
4775
4645
|
},
|
|
4776
4646
|
"status": {
|
|
4777
|
-
"char": "
|
|
4778
|
-
"description": "
|
|
4647
|
+
"char": "x",
|
|
4648
|
+
"description": "Status of the PR",
|
|
4779
4649
|
"name": "status",
|
|
4780
|
-
"required": true,
|
|
4781
4650
|
"hasDynamicHelp": false,
|
|
4782
4651
|
"multiple": false,
|
|
4652
|
+
"options": [
|
|
4653
|
+
"open",
|
|
4654
|
+
"merged",
|
|
4655
|
+
"abandoned"
|
|
4656
|
+
],
|
|
4783
4657
|
"type": "option"
|
|
4784
4658
|
},
|
|
4785
|
-
"
|
|
4786
|
-
"char": "
|
|
4787
|
-
"description": "
|
|
4788
|
-
"name": "
|
|
4789
|
-
"
|
|
4790
|
-
"type": "boolean"
|
|
4791
|
-
},
|
|
4792
|
-
"target-org": {
|
|
4793
|
-
"aliases": [
|
|
4794
|
-
"targetusername",
|
|
4795
|
-
"u"
|
|
4796
|
-
],
|
|
4797
|
-
"char": "o",
|
|
4798
|
-
"deprecateAliases": true,
|
|
4799
|
-
"name": "target-org",
|
|
4800
|
-
"noCacheDefault": true,
|
|
4801
|
-
"required": true,
|
|
4802
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
4803
|
-
"hasDynamicHelp": true,
|
|
4659
|
+
"min-date": {
|
|
4660
|
+
"char": "m",
|
|
4661
|
+
"description": "Minimum date for PR",
|
|
4662
|
+
"name": "min-date",
|
|
4663
|
+
"hasDynamicHelp": false,
|
|
4804
4664
|
"multiple": false,
|
|
4805
4665
|
"type": "option"
|
|
4806
|
-
}
|
|
4807
|
-
},
|
|
4808
|
-
"hasDynamicHelp": true,
|
|
4809
|
-
"hiddenAliases": [],
|
|
4810
|
-
"id": "hardis:org:community:update",
|
|
4811
|
-
"pluginAlias": "sfdx-hardis",
|
|
4812
|
-
"pluginName": "sfdx-hardis",
|
|
4813
|
-
"pluginType": "core",
|
|
4814
|
-
"strict": true,
|
|
4815
|
-
"summary": "Update a community status.",
|
|
4816
|
-
"enableJsonFlag": true,
|
|
4817
|
-
"isESM": true,
|
|
4818
|
-
"relativePath": [
|
|
4819
|
-
"lib",
|
|
4820
|
-
"commands",
|
|
4821
|
-
"hardis",
|
|
4822
|
-
"org",
|
|
4823
|
-
"community",
|
|
4824
|
-
"update.js"
|
|
4825
|
-
],
|
|
4826
|
-
"aliasPermutations": [],
|
|
4827
|
-
"permutations": [
|
|
4828
|
-
"hardis:org:community:update",
|
|
4829
|
-
"org:hardis:community:update",
|
|
4830
|
-
"org:community:hardis:update",
|
|
4831
|
-
"org:community:update:hardis",
|
|
4832
|
-
"hardis:community:org:update",
|
|
4833
|
-
"community:hardis:org:update",
|
|
4834
|
-
"community:org:hardis:update",
|
|
4835
|
-
"community:org:update:hardis",
|
|
4836
|
-
"hardis:community:update:org",
|
|
4837
|
-
"community:hardis:update:org",
|
|
4838
|
-
"community:update:hardis:org",
|
|
4839
|
-
"community:update:org:hardis",
|
|
4840
|
-
"hardis:org:update:community",
|
|
4841
|
-
"org:hardis:update:community",
|
|
4842
|
-
"org:update:hardis:community",
|
|
4843
|
-
"org:update:community:hardis",
|
|
4844
|
-
"hardis:update:org:community",
|
|
4845
|
-
"update:hardis:org:community",
|
|
4846
|
-
"update:org:hardis:community",
|
|
4847
|
-
"update:org:community:hardis",
|
|
4848
|
-
"hardis:update:community:org",
|
|
4849
|
-
"update:hardis:community:org",
|
|
4850
|
-
"update:community:hardis:org",
|
|
4851
|
-
"update:community:org:hardis"
|
|
4852
|
-
]
|
|
4853
|
-
},
|
|
4854
|
-
"hardis:org:configure:data": {
|
|
4855
|
-
"aliases": [],
|
|
4856
|
-
"args": {},
|
|
4857
|
-
"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[](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",
|
|
4858
|
-
"examples": [
|
|
4859
|
-
"$ sf hardis:org:configure:data"
|
|
4860
|
-
],
|
|
4861
|
-
"flags": {
|
|
4862
|
-
"json": {
|
|
4863
|
-
"description": "Format output as json.",
|
|
4864
|
-
"helpGroup": "GLOBAL",
|
|
4865
|
-
"name": "json",
|
|
4866
|
-
"allowNo": false,
|
|
4867
|
-
"type": "boolean"
|
|
4868
4666
|
},
|
|
4869
|
-
"
|
|
4870
|
-
"
|
|
4871
|
-
"
|
|
4872
|
-
"
|
|
4667
|
+
"outputfile": {
|
|
4668
|
+
"char": "f",
|
|
4669
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
4670
|
+
"name": "outputfile",
|
|
4873
4671
|
"hasDynamicHelp": false,
|
|
4874
4672
|
"multiple": false,
|
|
4875
4673
|
"type": "option"
|
|
@@ -4897,16 +4695,218 @@
|
|
|
4897
4695
|
},
|
|
4898
4696
|
"hasDynamicHelp": false,
|
|
4899
4697
|
"hiddenAliases": [],
|
|
4900
|
-
"id": "hardis:
|
|
4698
|
+
"id": "hardis:git:pull-requests:extract",
|
|
4901
4699
|
"pluginAlias": "sfdx-hardis",
|
|
4902
4700
|
"pluginName": "sfdx-hardis",
|
|
4903
4701
|
"pluginType": "core",
|
|
4904
4702
|
"strict": true,
|
|
4905
4703
|
"enableJsonFlag": true,
|
|
4906
|
-
"title": "
|
|
4907
|
-
"requiresProject":
|
|
4908
|
-
"
|
|
4909
|
-
|
|
4704
|
+
"title": "Extract pull requests",
|
|
4705
|
+
"requiresProject": true,
|
|
4706
|
+
"isESM": true,
|
|
4707
|
+
"relativePath": [
|
|
4708
|
+
"lib",
|
|
4709
|
+
"commands",
|
|
4710
|
+
"hardis",
|
|
4711
|
+
"git",
|
|
4712
|
+
"pull-requests",
|
|
4713
|
+
"extract.js"
|
|
4714
|
+
],
|
|
4715
|
+
"aliasPermutations": [],
|
|
4716
|
+
"permutations": [
|
|
4717
|
+
"hardis:git:pull-requests:extract",
|
|
4718
|
+
"git:hardis:pull-requests:extract",
|
|
4719
|
+
"git:pull-requests:hardis:extract",
|
|
4720
|
+
"git:pull-requests:extract:hardis",
|
|
4721
|
+
"hardis:pull-requests:git:extract",
|
|
4722
|
+
"pull-requests:hardis:git:extract",
|
|
4723
|
+
"pull-requests:git:hardis:extract",
|
|
4724
|
+
"pull-requests:git:extract:hardis",
|
|
4725
|
+
"hardis:pull-requests:extract:git",
|
|
4726
|
+
"pull-requests:hardis:extract:git",
|
|
4727
|
+
"pull-requests:extract:hardis:git",
|
|
4728
|
+
"pull-requests:extract:git:hardis",
|
|
4729
|
+
"hardis:git:extract:pull-requests",
|
|
4730
|
+
"git:hardis:extract:pull-requests",
|
|
4731
|
+
"git:extract:hardis:pull-requests",
|
|
4732
|
+
"git:extract:pull-requests:hardis",
|
|
4733
|
+
"hardis:extract:git:pull-requests",
|
|
4734
|
+
"extract:hardis:git:pull-requests",
|
|
4735
|
+
"extract:git:hardis:pull-requests",
|
|
4736
|
+
"extract:git:pull-requests:hardis",
|
|
4737
|
+
"hardis:extract:pull-requests:git",
|
|
4738
|
+
"extract:hardis:pull-requests:git",
|
|
4739
|
+
"extract:pull-requests:hardis:git",
|
|
4740
|
+
"extract:pull-requests:git:hardis"
|
|
4741
|
+
]
|
|
4742
|
+
},
|
|
4743
|
+
"hardis:org:community:update": {
|
|
4744
|
+
"aliases": [],
|
|
4745
|
+
"args": {},
|
|
4746
|
+
"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",
|
|
4747
|
+
"examples": [
|
|
4748
|
+
"$ sf hardis:org:community:update --name 'MyNetworkName' --status DownForMaintenance",
|
|
4749
|
+
"$ sf hardis:org:community:update --name 'MyNetworkName,MySecondNetworkName' --status Live"
|
|
4750
|
+
],
|
|
4751
|
+
"flags": {
|
|
4752
|
+
"json": {
|
|
4753
|
+
"description": "Format output as json.",
|
|
4754
|
+
"helpGroup": "GLOBAL",
|
|
4755
|
+
"name": "json",
|
|
4756
|
+
"allowNo": false,
|
|
4757
|
+
"type": "boolean"
|
|
4758
|
+
},
|
|
4759
|
+
"flags-dir": {
|
|
4760
|
+
"helpGroup": "GLOBAL",
|
|
4761
|
+
"name": "flags-dir",
|
|
4762
|
+
"summary": "Import flag values from a directory.",
|
|
4763
|
+
"hasDynamicHelp": false,
|
|
4764
|
+
"multiple": false,
|
|
4765
|
+
"type": "option"
|
|
4766
|
+
},
|
|
4767
|
+
"name": {
|
|
4768
|
+
"char": "n",
|
|
4769
|
+
"description": "List of Networks Names that you want to update, separated by comma",
|
|
4770
|
+
"name": "name",
|
|
4771
|
+
"required": true,
|
|
4772
|
+
"hasDynamicHelp": false,
|
|
4773
|
+
"multiple": false,
|
|
4774
|
+
"type": "option"
|
|
4775
|
+
},
|
|
4776
|
+
"status": {
|
|
4777
|
+
"char": "s",
|
|
4778
|
+
"description": "New status for the community, available values are: Live, DownForMaintenance",
|
|
4779
|
+
"name": "status",
|
|
4780
|
+
"required": true,
|
|
4781
|
+
"hasDynamicHelp": false,
|
|
4782
|
+
"multiple": false,
|
|
4783
|
+
"type": "option"
|
|
4784
|
+
},
|
|
4785
|
+
"debug": {
|
|
4786
|
+
"char": "d",
|
|
4787
|
+
"description": "Activate debug mode (more logs)",
|
|
4788
|
+
"name": "debug",
|
|
4789
|
+
"allowNo": false,
|
|
4790
|
+
"type": "boolean"
|
|
4791
|
+
},
|
|
4792
|
+
"target-org": {
|
|
4793
|
+
"aliases": [
|
|
4794
|
+
"targetusername",
|
|
4795
|
+
"u"
|
|
4796
|
+
],
|
|
4797
|
+
"char": "o",
|
|
4798
|
+
"deprecateAliases": true,
|
|
4799
|
+
"name": "target-org",
|
|
4800
|
+
"noCacheDefault": true,
|
|
4801
|
+
"required": true,
|
|
4802
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
4803
|
+
"hasDynamicHelp": true,
|
|
4804
|
+
"multiple": false,
|
|
4805
|
+
"type": "option"
|
|
4806
|
+
}
|
|
4807
|
+
},
|
|
4808
|
+
"hasDynamicHelp": true,
|
|
4809
|
+
"hiddenAliases": [],
|
|
4810
|
+
"id": "hardis:org:community:update",
|
|
4811
|
+
"pluginAlias": "sfdx-hardis",
|
|
4812
|
+
"pluginName": "sfdx-hardis",
|
|
4813
|
+
"pluginType": "core",
|
|
4814
|
+
"strict": true,
|
|
4815
|
+
"summary": "Update a community status.",
|
|
4816
|
+
"enableJsonFlag": true,
|
|
4817
|
+
"isESM": true,
|
|
4818
|
+
"relativePath": [
|
|
4819
|
+
"lib",
|
|
4820
|
+
"commands",
|
|
4821
|
+
"hardis",
|
|
4822
|
+
"org",
|
|
4823
|
+
"community",
|
|
4824
|
+
"update.js"
|
|
4825
|
+
],
|
|
4826
|
+
"aliasPermutations": [],
|
|
4827
|
+
"permutations": [
|
|
4828
|
+
"hardis:org:community:update",
|
|
4829
|
+
"org:hardis:community:update",
|
|
4830
|
+
"org:community:hardis:update",
|
|
4831
|
+
"org:community:update:hardis",
|
|
4832
|
+
"hardis:community:org:update",
|
|
4833
|
+
"community:hardis:org:update",
|
|
4834
|
+
"community:org:hardis:update",
|
|
4835
|
+
"community:org:update:hardis",
|
|
4836
|
+
"hardis:community:update:org",
|
|
4837
|
+
"community:hardis:update:org",
|
|
4838
|
+
"community:update:hardis:org",
|
|
4839
|
+
"community:update:org:hardis",
|
|
4840
|
+
"hardis:org:update:community",
|
|
4841
|
+
"org:hardis:update:community",
|
|
4842
|
+
"org:update:hardis:community",
|
|
4843
|
+
"org:update:community:hardis",
|
|
4844
|
+
"hardis:update:org:community",
|
|
4845
|
+
"update:hardis:org:community",
|
|
4846
|
+
"update:org:hardis:community",
|
|
4847
|
+
"update:org:community:hardis",
|
|
4848
|
+
"hardis:update:community:org",
|
|
4849
|
+
"update:hardis:community:org",
|
|
4850
|
+
"update:community:hardis:org",
|
|
4851
|
+
"update:community:org:hardis"
|
|
4852
|
+
]
|
|
4853
|
+
},
|
|
4854
|
+
"hardis:org:configure:data": {
|
|
4855
|
+
"aliases": [],
|
|
4856
|
+
"args": {},
|
|
4857
|
+
"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[](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",
|
|
4858
|
+
"examples": [
|
|
4859
|
+
"$ sf hardis:org:configure:data"
|
|
4860
|
+
],
|
|
4861
|
+
"flags": {
|
|
4862
|
+
"json": {
|
|
4863
|
+
"description": "Format output as json.",
|
|
4864
|
+
"helpGroup": "GLOBAL",
|
|
4865
|
+
"name": "json",
|
|
4866
|
+
"allowNo": false,
|
|
4867
|
+
"type": "boolean"
|
|
4868
|
+
},
|
|
4869
|
+
"flags-dir": {
|
|
4870
|
+
"helpGroup": "GLOBAL",
|
|
4871
|
+
"name": "flags-dir",
|
|
4872
|
+
"summary": "Import flag values from a directory.",
|
|
4873
|
+
"hasDynamicHelp": false,
|
|
4874
|
+
"multiple": false,
|
|
4875
|
+
"type": "option"
|
|
4876
|
+
},
|
|
4877
|
+
"debug": {
|
|
4878
|
+
"char": "d",
|
|
4879
|
+
"description": "Activate debug mode (more logs)",
|
|
4880
|
+
"name": "debug",
|
|
4881
|
+
"allowNo": false,
|
|
4882
|
+
"type": "boolean"
|
|
4883
|
+
},
|
|
4884
|
+
"websocket": {
|
|
4885
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
4886
|
+
"name": "websocket",
|
|
4887
|
+
"hasDynamicHelp": false,
|
|
4888
|
+
"multiple": false,
|
|
4889
|
+
"type": "option"
|
|
4890
|
+
},
|
|
4891
|
+
"skipauth": {
|
|
4892
|
+
"description": "Skip authentication check when a default username is required",
|
|
4893
|
+
"name": "skipauth",
|
|
4894
|
+
"allowNo": false,
|
|
4895
|
+
"type": "boolean"
|
|
4896
|
+
}
|
|
4897
|
+
},
|
|
4898
|
+
"hasDynamicHelp": false,
|
|
4899
|
+
"hiddenAliases": [],
|
|
4900
|
+
"id": "hardis:org:configure:data",
|
|
4901
|
+
"pluginAlias": "sfdx-hardis",
|
|
4902
|
+
"pluginName": "sfdx-hardis",
|
|
4903
|
+
"pluginType": "core",
|
|
4904
|
+
"strict": true,
|
|
4905
|
+
"enableJsonFlag": true,
|
|
4906
|
+
"title": "Configure Data project",
|
|
4907
|
+
"requiresProject": false,
|
|
4908
|
+
"requiresSfdxPlugins": [
|
|
4909
|
+
"sfdmu"
|
|
4910
4910
|
],
|
|
4911
4911
|
"isESM": true,
|
|
4912
4912
|
"relativePath": [
|
|
@@ -5538,15 +5538,12 @@
|
|
|
5538
5538
|
"import:data:org:hardis"
|
|
5539
5539
|
]
|
|
5540
5540
|
},
|
|
5541
|
-
"hardis:org:
|
|
5541
|
+
"hardis:org:files:export": {
|
|
5542
5542
|
"aliases": [],
|
|
5543
5543
|
"args": {},
|
|
5544
|
-
"description": "
|
|
5544
|
+
"description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
|
|
5545
5545
|
"examples": [
|
|
5546
|
-
"$ sf hardis:org:
|
|
5547
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5548
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5549
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5546
|
+
"$ sf hardis:org:files:export"
|
|
5550
5547
|
],
|
|
5551
5548
|
"flags": {
|
|
5552
5549
|
"json": {
|
|
@@ -5564,30 +5561,48 @@
|
|
|
5564
5561
|
"multiple": false,
|
|
5565
5562
|
"type": "option"
|
|
5566
5563
|
},
|
|
5567
|
-
"
|
|
5568
|
-
"char": "
|
|
5569
|
-
"description": "
|
|
5570
|
-
"name": "
|
|
5564
|
+
"path": {
|
|
5565
|
+
"char": "p",
|
|
5566
|
+
"description": "Path to the file export project",
|
|
5567
|
+
"name": "path",
|
|
5571
5568
|
"hasDynamicHelp": false,
|
|
5572
5569
|
"multiple": false,
|
|
5573
5570
|
"type": "option"
|
|
5574
5571
|
},
|
|
5575
|
-
"
|
|
5572
|
+
"chunksize": {
|
|
5573
|
+
"char": "c",
|
|
5574
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
5575
|
+
"name": "chunksize",
|
|
5576
|
+
"default": 1000,
|
|
5577
|
+
"hasDynamicHelp": false,
|
|
5578
|
+
"multiple": false,
|
|
5579
|
+
"type": "option"
|
|
5580
|
+
},
|
|
5581
|
+
"polltimeout": {
|
|
5576
5582
|
"char": "t",
|
|
5577
|
-
"description": "
|
|
5578
|
-
"name": "
|
|
5583
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
5584
|
+
"name": "polltimeout",
|
|
5585
|
+
"default": 300000,
|
|
5579
5586
|
"hasDynamicHelp": false,
|
|
5580
5587
|
"multiple": false,
|
|
5581
5588
|
"type": "option"
|
|
5582
5589
|
},
|
|
5583
|
-
"
|
|
5584
|
-
"char": "
|
|
5585
|
-
"description": "
|
|
5586
|
-
"name": "
|
|
5590
|
+
"startchunknumber": {
|
|
5591
|
+
"char": "s",
|
|
5592
|
+
"description": "Chunk number to start from",
|
|
5593
|
+
"name": "startchunknumber",
|
|
5594
|
+
"default": 0,
|
|
5587
5595
|
"hasDynamicHelp": false,
|
|
5588
5596
|
"multiple": false,
|
|
5589
5597
|
"type": "option"
|
|
5590
5598
|
},
|
|
5599
|
+
"resume": {
|
|
5600
|
+
"char": "r",
|
|
5601
|
+
"description": "Resume previous export by checking existing files (default in CI)",
|
|
5602
|
+
"name": "resume",
|
|
5603
|
+
"allowNo": false,
|
|
5604
|
+
"type": "boolean"
|
|
5605
|
+
},
|
|
5591
5606
|
"debug": {
|
|
5592
5607
|
"char": "d",
|
|
5593
5608
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5626,7 +5641,261 @@
|
|
|
5626
5641
|
},
|
|
5627
5642
|
"hasDynamicHelp": true,
|
|
5628
5643
|
"hiddenAliases": [],
|
|
5629
|
-
"id": "hardis:org:
|
|
5644
|
+
"id": "hardis:org:files:export",
|
|
5645
|
+
"pluginAlias": "sfdx-hardis",
|
|
5646
|
+
"pluginName": "sfdx-hardis",
|
|
5647
|
+
"pluginType": "core",
|
|
5648
|
+
"strict": true,
|
|
5649
|
+
"enableJsonFlag": true,
|
|
5650
|
+
"title": "Export files",
|
|
5651
|
+
"requiresProject": false,
|
|
5652
|
+
"isESM": true,
|
|
5653
|
+
"relativePath": [
|
|
5654
|
+
"lib",
|
|
5655
|
+
"commands",
|
|
5656
|
+
"hardis",
|
|
5657
|
+
"org",
|
|
5658
|
+
"files",
|
|
5659
|
+
"export.js"
|
|
5660
|
+
],
|
|
5661
|
+
"aliasPermutations": [],
|
|
5662
|
+
"permutations": [
|
|
5663
|
+
"hardis:org:files:export",
|
|
5664
|
+
"org:hardis:files:export",
|
|
5665
|
+
"org:files:hardis:export",
|
|
5666
|
+
"org:files:export:hardis",
|
|
5667
|
+
"hardis:files:org:export",
|
|
5668
|
+
"files:hardis:org:export",
|
|
5669
|
+
"files:org:hardis:export",
|
|
5670
|
+
"files:org:export:hardis",
|
|
5671
|
+
"hardis:files:export:org",
|
|
5672
|
+
"files:hardis:export:org",
|
|
5673
|
+
"files:export:hardis:org",
|
|
5674
|
+
"files:export:org:hardis",
|
|
5675
|
+
"hardis:org:export:files",
|
|
5676
|
+
"org:hardis:export:files",
|
|
5677
|
+
"org:export:hardis:files",
|
|
5678
|
+
"org:export:files:hardis",
|
|
5679
|
+
"hardis:export:org:files",
|
|
5680
|
+
"export:hardis:org:files",
|
|
5681
|
+
"export:org:hardis:files",
|
|
5682
|
+
"export:org:files:hardis",
|
|
5683
|
+
"hardis:export:files:org",
|
|
5684
|
+
"export:hardis:files:org",
|
|
5685
|
+
"export:files:hardis:org",
|
|
5686
|
+
"export:files:org:hardis"
|
|
5687
|
+
]
|
|
5688
|
+
},
|
|
5689
|
+
"hardis:org:files:import": {
|
|
5690
|
+
"aliases": [],
|
|
5691
|
+
"args": {},
|
|
5692
|
+
"description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
|
|
5693
|
+
"examples": [
|
|
5694
|
+
"$ sf hardis:org:files:import"
|
|
5695
|
+
],
|
|
5696
|
+
"flags": {
|
|
5697
|
+
"json": {
|
|
5698
|
+
"description": "Format output as json.",
|
|
5699
|
+
"helpGroup": "GLOBAL",
|
|
5700
|
+
"name": "json",
|
|
5701
|
+
"allowNo": false,
|
|
5702
|
+
"type": "boolean"
|
|
5703
|
+
},
|
|
5704
|
+
"flags-dir": {
|
|
5705
|
+
"helpGroup": "GLOBAL",
|
|
5706
|
+
"name": "flags-dir",
|
|
5707
|
+
"summary": "Import flag values from a directory.",
|
|
5708
|
+
"hasDynamicHelp": false,
|
|
5709
|
+
"multiple": false,
|
|
5710
|
+
"type": "option"
|
|
5711
|
+
},
|
|
5712
|
+
"path": {
|
|
5713
|
+
"char": "p",
|
|
5714
|
+
"description": "Path to the file export project",
|
|
5715
|
+
"name": "path",
|
|
5716
|
+
"hasDynamicHelp": false,
|
|
5717
|
+
"multiple": false,
|
|
5718
|
+
"type": "option"
|
|
5719
|
+
},
|
|
5720
|
+
"overwrite": {
|
|
5721
|
+
"char": "f",
|
|
5722
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
5723
|
+
"name": "overwrite",
|
|
5724
|
+
"allowNo": false,
|
|
5725
|
+
"type": "boolean"
|
|
5726
|
+
},
|
|
5727
|
+
"debug": {
|
|
5728
|
+
"char": "d",
|
|
5729
|
+
"description": "Activate debug mode (more logs)",
|
|
5730
|
+
"name": "debug",
|
|
5731
|
+
"allowNo": false,
|
|
5732
|
+
"type": "boolean"
|
|
5733
|
+
},
|
|
5734
|
+
"websocket": {
|
|
5735
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5736
|
+
"name": "websocket",
|
|
5737
|
+
"hasDynamicHelp": false,
|
|
5738
|
+
"multiple": false,
|
|
5739
|
+
"type": "option"
|
|
5740
|
+
},
|
|
5741
|
+
"skipauth": {
|
|
5742
|
+
"description": "Skip authentication check when a default username is required",
|
|
5743
|
+
"name": "skipauth",
|
|
5744
|
+
"allowNo": false,
|
|
5745
|
+
"type": "boolean"
|
|
5746
|
+
},
|
|
5747
|
+
"target-org": {
|
|
5748
|
+
"aliases": [
|
|
5749
|
+
"targetusername",
|
|
5750
|
+
"u"
|
|
5751
|
+
],
|
|
5752
|
+
"char": "o",
|
|
5753
|
+
"deprecateAliases": true,
|
|
5754
|
+
"name": "target-org",
|
|
5755
|
+
"noCacheDefault": true,
|
|
5756
|
+
"required": true,
|
|
5757
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
5758
|
+
"hasDynamicHelp": true,
|
|
5759
|
+
"multiple": false,
|
|
5760
|
+
"type": "option"
|
|
5761
|
+
}
|
|
5762
|
+
},
|
|
5763
|
+
"hasDynamicHelp": true,
|
|
5764
|
+
"hiddenAliases": [],
|
|
5765
|
+
"id": "hardis:org:files:import",
|
|
5766
|
+
"pluginAlias": "sfdx-hardis",
|
|
5767
|
+
"pluginName": "sfdx-hardis",
|
|
5768
|
+
"pluginType": "core",
|
|
5769
|
+
"strict": true,
|
|
5770
|
+
"enableJsonFlag": true,
|
|
5771
|
+
"title": "Import files",
|
|
5772
|
+
"requiresProject": false,
|
|
5773
|
+
"isESM": true,
|
|
5774
|
+
"relativePath": [
|
|
5775
|
+
"lib",
|
|
5776
|
+
"commands",
|
|
5777
|
+
"hardis",
|
|
5778
|
+
"org",
|
|
5779
|
+
"files",
|
|
5780
|
+
"import.js"
|
|
5781
|
+
],
|
|
5782
|
+
"aliasPermutations": [],
|
|
5783
|
+
"permutations": [
|
|
5784
|
+
"hardis:org:files:import",
|
|
5785
|
+
"org:hardis:files:import",
|
|
5786
|
+
"org:files:hardis:import",
|
|
5787
|
+
"org:files:import:hardis",
|
|
5788
|
+
"hardis:files:org:import",
|
|
5789
|
+
"files:hardis:org:import",
|
|
5790
|
+
"files:org:hardis:import",
|
|
5791
|
+
"files:org:import:hardis",
|
|
5792
|
+
"hardis:files:import:org",
|
|
5793
|
+
"files:hardis:import:org",
|
|
5794
|
+
"files:import:hardis:org",
|
|
5795
|
+
"files:import:org:hardis",
|
|
5796
|
+
"hardis:org:import:files",
|
|
5797
|
+
"org:hardis:import:files",
|
|
5798
|
+
"org:import:hardis:files",
|
|
5799
|
+
"org:import:files:hardis",
|
|
5800
|
+
"hardis:import:org:files",
|
|
5801
|
+
"import:hardis:org:files",
|
|
5802
|
+
"import:org:hardis:files",
|
|
5803
|
+
"import:org:files:hardis",
|
|
5804
|
+
"hardis:import:files:org",
|
|
5805
|
+
"import:hardis:files:org",
|
|
5806
|
+
"import:files:hardis:org",
|
|
5807
|
+
"import:files:org:hardis"
|
|
5808
|
+
]
|
|
5809
|
+
},
|
|
5810
|
+
"hardis:org:diagnose:audittrail": {
|
|
5811
|
+
"aliases": [],
|
|
5812
|
+
"args": {},
|
|
5813
|
+
"description": "Export Audit trail into a CSV file with selected criteria, and highlight suspect actions\n\nAlso detects updates of Custom Settings values (disable by defining `SKIP_AUDIT_TRAIL_CUSTOM_SETTINGS=true`)\n\nRegular setup actions performed in major orgs are filtered.\n\n- \"\"\n - createScratchOrg\n - changedsenderemail\n - deleteScratchOrg\n - loginasgrantedtopartnerbt\n- Certificate and Key Management\n - insertCertificate\n- Custom App Licenses\n - addeduserpackagelicense\n - granteduserpackagelicense\n - revokeduserpackagelicense\n- Customer Portal\n - createdcustomersuccessuser\n - CSPUserDisabled\n- Currency\n - updateddatedexchrate\n- Data Management\n - queueMembership\n- Email Administration\n - dkimRotationPreparationSuccessful\n - dkimRotationSuccessful\n- External Objects\n - xdsEncryptedFieldChange\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n - siqUserAcceptedTOS\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedofflineuseroffon\n - changedprofileforuserstdtostd\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserAdminVerifiedStatusVerified\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedusername\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - changedUserPhoneVerifiedStatusVerified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suNetworkAdminLogin\n - suNetworkAdminLogout\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\n## Excel output example\n\n\n\n## Local output example\n\n\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-suspect-audit-trail/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
5814
|
+
"examples": [
|
|
5815
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5816
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5817
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5818
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5819
|
+
],
|
|
5820
|
+
"flags": {
|
|
5821
|
+
"json": {
|
|
5822
|
+
"description": "Format output as json.",
|
|
5823
|
+
"helpGroup": "GLOBAL",
|
|
5824
|
+
"name": "json",
|
|
5825
|
+
"allowNo": false,
|
|
5826
|
+
"type": "boolean"
|
|
5827
|
+
},
|
|
5828
|
+
"flags-dir": {
|
|
5829
|
+
"helpGroup": "GLOBAL",
|
|
5830
|
+
"name": "flags-dir",
|
|
5831
|
+
"summary": "Import flag values from a directory.",
|
|
5832
|
+
"hasDynamicHelp": false,
|
|
5833
|
+
"multiple": false,
|
|
5834
|
+
"type": "option"
|
|
5835
|
+
},
|
|
5836
|
+
"excludeusers": {
|
|
5837
|
+
"char": "e",
|
|
5838
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5839
|
+
"name": "excludeusers",
|
|
5840
|
+
"hasDynamicHelp": false,
|
|
5841
|
+
"multiple": false,
|
|
5842
|
+
"type": "option"
|
|
5843
|
+
},
|
|
5844
|
+
"lastndays": {
|
|
5845
|
+
"char": "t",
|
|
5846
|
+
"description": "Number of days to extract from today (included)",
|
|
5847
|
+
"name": "lastndays",
|
|
5848
|
+
"hasDynamicHelp": false,
|
|
5849
|
+
"multiple": false,
|
|
5850
|
+
"type": "option"
|
|
5851
|
+
},
|
|
5852
|
+
"outputfile": {
|
|
5853
|
+
"char": "f",
|
|
5854
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5855
|
+
"name": "outputfile",
|
|
5856
|
+
"hasDynamicHelp": false,
|
|
5857
|
+
"multiple": false,
|
|
5858
|
+
"type": "option"
|
|
5859
|
+
},
|
|
5860
|
+
"debug": {
|
|
5861
|
+
"char": "d",
|
|
5862
|
+
"description": "Activate debug mode (more logs)",
|
|
5863
|
+
"name": "debug",
|
|
5864
|
+
"allowNo": false,
|
|
5865
|
+
"type": "boolean"
|
|
5866
|
+
},
|
|
5867
|
+
"websocket": {
|
|
5868
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5869
|
+
"name": "websocket",
|
|
5870
|
+
"hasDynamicHelp": false,
|
|
5871
|
+
"multiple": false,
|
|
5872
|
+
"type": "option"
|
|
5873
|
+
},
|
|
5874
|
+
"skipauth": {
|
|
5875
|
+
"description": "Skip authentication check when a default username is required",
|
|
5876
|
+
"name": "skipauth",
|
|
5877
|
+
"allowNo": false,
|
|
5878
|
+
"type": "boolean"
|
|
5879
|
+
},
|
|
5880
|
+
"target-org": {
|
|
5881
|
+
"aliases": [
|
|
5882
|
+
"targetusername",
|
|
5883
|
+
"u"
|
|
5884
|
+
],
|
|
5885
|
+
"char": "o",
|
|
5886
|
+
"deprecateAliases": true,
|
|
5887
|
+
"name": "target-org",
|
|
5888
|
+
"noCacheDefault": true,
|
|
5889
|
+
"required": true,
|
|
5890
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
5891
|
+
"hasDynamicHelp": true,
|
|
5892
|
+
"multiple": false,
|
|
5893
|
+
"type": "option"
|
|
5894
|
+
}
|
|
5895
|
+
},
|
|
5896
|
+
"hasDynamicHelp": true,
|
|
5897
|
+
"hiddenAliases": [],
|
|
5898
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5630
5899
|
"pluginAlias": "sfdx-hardis",
|
|
5631
5900
|
"pluginName": "sfdx-hardis",
|
|
5632
5901
|
"pluginType": "core",
|
|
@@ -6801,283 +7070,13 @@
|
|
|
6801
7070
|
"unusedusers:diagnose:org:hardis"
|
|
6802
7071
|
]
|
|
6803
7072
|
},
|
|
6804
|
-
"hardis:org:
|
|
6805
|
-
"aliases": [],
|
|
6806
|
-
"args": {},
|
|
6807
|
-
"description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
|
|
6808
|
-
"examples": [
|
|
6809
|
-
"$ sf hardis:org:files:export"
|
|
6810
|
-
],
|
|
6811
|
-
"flags": {
|
|
6812
|
-
"json": {
|
|
6813
|
-
"description": "Format output as json.",
|
|
6814
|
-
"helpGroup": "GLOBAL",
|
|
6815
|
-
"name": "json",
|
|
6816
|
-
"allowNo": false,
|
|
6817
|
-
"type": "boolean"
|
|
6818
|
-
},
|
|
6819
|
-
"flags-dir": {
|
|
6820
|
-
"helpGroup": "GLOBAL",
|
|
6821
|
-
"name": "flags-dir",
|
|
6822
|
-
"summary": "Import flag values from a directory.",
|
|
6823
|
-
"hasDynamicHelp": false,
|
|
6824
|
-
"multiple": false,
|
|
6825
|
-
"type": "option"
|
|
6826
|
-
},
|
|
6827
|
-
"path": {
|
|
6828
|
-
"char": "p",
|
|
6829
|
-
"description": "Path to the file export project",
|
|
6830
|
-
"name": "path",
|
|
6831
|
-
"hasDynamicHelp": false,
|
|
6832
|
-
"multiple": false,
|
|
6833
|
-
"type": "option"
|
|
6834
|
-
},
|
|
6835
|
-
"chunksize": {
|
|
6836
|
-
"char": "c",
|
|
6837
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
6838
|
-
"name": "chunksize",
|
|
6839
|
-
"default": 1000,
|
|
6840
|
-
"hasDynamicHelp": false,
|
|
6841
|
-
"multiple": false,
|
|
6842
|
-
"type": "option"
|
|
6843
|
-
},
|
|
6844
|
-
"polltimeout": {
|
|
6845
|
-
"char": "t",
|
|
6846
|
-
"description": "Timeout in MS for Bulk API calls",
|
|
6847
|
-
"name": "polltimeout",
|
|
6848
|
-
"default": 300000,
|
|
6849
|
-
"hasDynamicHelp": false,
|
|
6850
|
-
"multiple": false,
|
|
6851
|
-
"type": "option"
|
|
6852
|
-
},
|
|
6853
|
-
"startchunknumber": {
|
|
6854
|
-
"char": "s",
|
|
6855
|
-
"description": "Chunk number to start from",
|
|
6856
|
-
"name": "startchunknumber",
|
|
6857
|
-
"default": 0,
|
|
6858
|
-
"hasDynamicHelp": false,
|
|
6859
|
-
"multiple": false,
|
|
6860
|
-
"type": "option"
|
|
6861
|
-
},
|
|
6862
|
-
"resume": {
|
|
6863
|
-
"char": "r",
|
|
6864
|
-
"description": "Resume previous export by checking existing files (default in CI)",
|
|
6865
|
-
"name": "resume",
|
|
6866
|
-
"allowNo": false,
|
|
6867
|
-
"type": "boolean"
|
|
6868
|
-
},
|
|
6869
|
-
"debug": {
|
|
6870
|
-
"char": "d",
|
|
6871
|
-
"description": "Activate debug mode (more logs)",
|
|
6872
|
-
"name": "debug",
|
|
6873
|
-
"allowNo": false,
|
|
6874
|
-
"type": "boolean"
|
|
6875
|
-
},
|
|
6876
|
-
"websocket": {
|
|
6877
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
6878
|
-
"name": "websocket",
|
|
6879
|
-
"hasDynamicHelp": false,
|
|
6880
|
-
"multiple": false,
|
|
6881
|
-
"type": "option"
|
|
6882
|
-
},
|
|
6883
|
-
"skipauth": {
|
|
6884
|
-
"description": "Skip authentication check when a default username is required",
|
|
6885
|
-
"name": "skipauth",
|
|
6886
|
-
"allowNo": false,
|
|
6887
|
-
"type": "boolean"
|
|
6888
|
-
},
|
|
6889
|
-
"target-org": {
|
|
6890
|
-
"aliases": [
|
|
6891
|
-
"targetusername",
|
|
6892
|
-
"u"
|
|
6893
|
-
],
|
|
6894
|
-
"char": "o",
|
|
6895
|
-
"deprecateAliases": true,
|
|
6896
|
-
"name": "target-org",
|
|
6897
|
-
"noCacheDefault": true,
|
|
6898
|
-
"required": true,
|
|
6899
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
6900
|
-
"hasDynamicHelp": true,
|
|
6901
|
-
"multiple": false,
|
|
6902
|
-
"type": "option"
|
|
6903
|
-
}
|
|
6904
|
-
},
|
|
6905
|
-
"hasDynamicHelp": true,
|
|
6906
|
-
"hiddenAliases": [],
|
|
6907
|
-
"id": "hardis:org:files:export",
|
|
6908
|
-
"pluginAlias": "sfdx-hardis",
|
|
6909
|
-
"pluginName": "sfdx-hardis",
|
|
6910
|
-
"pluginType": "core",
|
|
6911
|
-
"strict": true,
|
|
6912
|
-
"enableJsonFlag": true,
|
|
6913
|
-
"title": "Export files",
|
|
6914
|
-
"requiresProject": false,
|
|
6915
|
-
"isESM": true,
|
|
6916
|
-
"relativePath": [
|
|
6917
|
-
"lib",
|
|
6918
|
-
"commands",
|
|
6919
|
-
"hardis",
|
|
6920
|
-
"org",
|
|
6921
|
-
"files",
|
|
6922
|
-
"export.js"
|
|
6923
|
-
],
|
|
6924
|
-
"aliasPermutations": [],
|
|
6925
|
-
"permutations": [
|
|
6926
|
-
"hardis:org:files:export",
|
|
6927
|
-
"org:hardis:files:export",
|
|
6928
|
-
"org:files:hardis:export",
|
|
6929
|
-
"org:files:export:hardis",
|
|
6930
|
-
"hardis:files:org:export",
|
|
6931
|
-
"files:hardis:org:export",
|
|
6932
|
-
"files:org:hardis:export",
|
|
6933
|
-
"files:org:export:hardis",
|
|
6934
|
-
"hardis:files:export:org",
|
|
6935
|
-
"files:hardis:export:org",
|
|
6936
|
-
"files:export:hardis:org",
|
|
6937
|
-
"files:export:org:hardis",
|
|
6938
|
-
"hardis:org:export:files",
|
|
6939
|
-
"org:hardis:export:files",
|
|
6940
|
-
"org:export:hardis:files",
|
|
6941
|
-
"org:export:files:hardis",
|
|
6942
|
-
"hardis:export:org:files",
|
|
6943
|
-
"export:hardis:org:files",
|
|
6944
|
-
"export:org:hardis:files",
|
|
6945
|
-
"export:org:files:hardis",
|
|
6946
|
-
"hardis:export:files:org",
|
|
6947
|
-
"export:hardis:files:org",
|
|
6948
|
-
"export:files:hardis:org",
|
|
6949
|
-
"export:files:org:hardis"
|
|
6950
|
-
]
|
|
6951
|
-
},
|
|
6952
|
-
"hardis:org:files:import": {
|
|
6953
|
-
"aliases": [],
|
|
6954
|
-
"args": {},
|
|
6955
|
-
"description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
|
|
6956
|
-
"examples": [
|
|
6957
|
-
"$ sf hardis:org:files:import"
|
|
6958
|
-
],
|
|
6959
|
-
"flags": {
|
|
6960
|
-
"json": {
|
|
6961
|
-
"description": "Format output as json.",
|
|
6962
|
-
"helpGroup": "GLOBAL",
|
|
6963
|
-
"name": "json",
|
|
6964
|
-
"allowNo": false,
|
|
6965
|
-
"type": "boolean"
|
|
6966
|
-
},
|
|
6967
|
-
"flags-dir": {
|
|
6968
|
-
"helpGroup": "GLOBAL",
|
|
6969
|
-
"name": "flags-dir",
|
|
6970
|
-
"summary": "Import flag values from a directory.",
|
|
6971
|
-
"hasDynamicHelp": false,
|
|
6972
|
-
"multiple": false,
|
|
6973
|
-
"type": "option"
|
|
6974
|
-
},
|
|
6975
|
-
"path": {
|
|
6976
|
-
"char": "p",
|
|
6977
|
-
"description": "Path to the file export project",
|
|
6978
|
-
"name": "path",
|
|
6979
|
-
"hasDynamicHelp": false,
|
|
6980
|
-
"multiple": false,
|
|
6981
|
-
"type": "option"
|
|
6982
|
-
},
|
|
6983
|
-
"overwrite": {
|
|
6984
|
-
"char": "f",
|
|
6985
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
6986
|
-
"name": "overwrite",
|
|
6987
|
-
"allowNo": false,
|
|
6988
|
-
"type": "boolean"
|
|
6989
|
-
},
|
|
6990
|
-
"debug": {
|
|
6991
|
-
"char": "d",
|
|
6992
|
-
"description": "Activate debug mode (more logs)",
|
|
6993
|
-
"name": "debug",
|
|
6994
|
-
"allowNo": false,
|
|
6995
|
-
"type": "boolean"
|
|
6996
|
-
},
|
|
6997
|
-
"websocket": {
|
|
6998
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
6999
|
-
"name": "websocket",
|
|
7000
|
-
"hasDynamicHelp": false,
|
|
7001
|
-
"multiple": false,
|
|
7002
|
-
"type": "option"
|
|
7003
|
-
},
|
|
7004
|
-
"skipauth": {
|
|
7005
|
-
"description": "Skip authentication check when a default username is required",
|
|
7006
|
-
"name": "skipauth",
|
|
7007
|
-
"allowNo": false,
|
|
7008
|
-
"type": "boolean"
|
|
7009
|
-
},
|
|
7010
|
-
"target-org": {
|
|
7011
|
-
"aliases": [
|
|
7012
|
-
"targetusername",
|
|
7013
|
-
"u"
|
|
7014
|
-
],
|
|
7015
|
-
"char": "o",
|
|
7016
|
-
"deprecateAliases": true,
|
|
7017
|
-
"name": "target-org",
|
|
7018
|
-
"noCacheDefault": true,
|
|
7019
|
-
"required": true,
|
|
7020
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
7021
|
-
"hasDynamicHelp": true,
|
|
7022
|
-
"multiple": false,
|
|
7023
|
-
"type": "option"
|
|
7024
|
-
}
|
|
7025
|
-
},
|
|
7026
|
-
"hasDynamicHelp": true,
|
|
7027
|
-
"hiddenAliases": [],
|
|
7028
|
-
"id": "hardis:org:files:import",
|
|
7029
|
-
"pluginAlias": "sfdx-hardis",
|
|
7030
|
-
"pluginName": "sfdx-hardis",
|
|
7031
|
-
"pluginType": "core",
|
|
7032
|
-
"strict": true,
|
|
7033
|
-
"enableJsonFlag": true,
|
|
7034
|
-
"title": "Import files",
|
|
7035
|
-
"requiresProject": false,
|
|
7036
|
-
"isESM": true,
|
|
7037
|
-
"relativePath": [
|
|
7038
|
-
"lib",
|
|
7039
|
-
"commands",
|
|
7040
|
-
"hardis",
|
|
7041
|
-
"org",
|
|
7042
|
-
"files",
|
|
7043
|
-
"import.js"
|
|
7044
|
-
],
|
|
7045
|
-
"aliasPermutations": [],
|
|
7046
|
-
"permutations": [
|
|
7047
|
-
"hardis:org:files:import",
|
|
7048
|
-
"org:hardis:files:import",
|
|
7049
|
-
"org:files:hardis:import",
|
|
7050
|
-
"org:files:import:hardis",
|
|
7051
|
-
"hardis:files:org:import",
|
|
7052
|
-
"files:hardis:org:import",
|
|
7053
|
-
"files:org:hardis:import",
|
|
7054
|
-
"files:org:import:hardis",
|
|
7055
|
-
"hardis:files:import:org",
|
|
7056
|
-
"files:hardis:import:org",
|
|
7057
|
-
"files:import:hardis:org",
|
|
7058
|
-
"files:import:org:hardis",
|
|
7059
|
-
"hardis:org:import:files",
|
|
7060
|
-
"org:hardis:import:files",
|
|
7061
|
-
"org:import:hardis:files",
|
|
7062
|
-
"org:import:files:hardis",
|
|
7063
|
-
"hardis:import:org:files",
|
|
7064
|
-
"import:hardis:org:files",
|
|
7065
|
-
"import:org:hardis:files",
|
|
7066
|
-
"import:org:files:hardis",
|
|
7067
|
-
"hardis:import:files:org",
|
|
7068
|
-
"import:hardis:files:org",
|
|
7069
|
-
"import:files:hardis:org",
|
|
7070
|
-
"import:files:org:hardis"
|
|
7071
|
-
]
|
|
7072
|
-
},
|
|
7073
|
-
"hardis:org:generate:packagexmlfull": {
|
|
7073
|
+
"hardis:org:fix:listviewmine": {
|
|
7074
7074
|
"aliases": [],
|
|
7075
7075
|
"args": {},
|
|
7076
|
-
"description": "
|
|
7076
|
+
"description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
|
|
7077
7077
|
"examples": [
|
|
7078
|
-
"$ sf hardis:org:
|
|
7079
|
-
"$ sf hardis:org:
|
|
7080
|
-
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
7078
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
7079
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
7081
7080
|
],
|
|
7082
7081
|
"flags": {
|
|
7083
7082
|
"json": {
|
|
@@ -7095,9 +7094,10 @@
|
|
|
7095
7094
|
"multiple": false,
|
|
7096
7095
|
"type": "option"
|
|
7097
7096
|
},
|
|
7098
|
-
"
|
|
7099
|
-
"
|
|
7100
|
-
"
|
|
7097
|
+
"listviews": {
|
|
7098
|
+
"char": "l",
|
|
7099
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
7100
|
+
"name": "listviews",
|
|
7101
7101
|
"hasDynamicHelp": false,
|
|
7102
7102
|
"multiple": false,
|
|
7103
7103
|
"type": "option"
|
|
@@ -7109,13 +7109,6 @@
|
|
|
7109
7109
|
"allowNo": false,
|
|
7110
7110
|
"type": "boolean"
|
|
7111
7111
|
},
|
|
7112
|
-
"no-prompt": {
|
|
7113
|
-
"char": "n",
|
|
7114
|
-
"description": "Do not prompt for org username, use the default one",
|
|
7115
|
-
"name": "no-prompt",
|
|
7116
|
-
"allowNo": false,
|
|
7117
|
-
"type": "boolean"
|
|
7118
|
-
},
|
|
7119
7112
|
"websocket": {
|
|
7120
7113
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7121
7114
|
"name": "websocket",
|
|
@@ -7147,58 +7140,59 @@
|
|
|
7147
7140
|
},
|
|
7148
7141
|
"hasDynamicHelp": true,
|
|
7149
7142
|
"hiddenAliases": [],
|
|
7150
|
-
"id": "hardis:org:
|
|
7143
|
+
"id": "hardis:org:fix:listviewmine",
|
|
7151
7144
|
"pluginAlias": "sfdx-hardis",
|
|
7152
7145
|
"pluginName": "sfdx-hardis",
|
|
7153
7146
|
"pluginType": "core",
|
|
7154
7147
|
"strict": true,
|
|
7155
7148
|
"enableJsonFlag": true,
|
|
7156
|
-
"title": "
|
|
7157
|
-
"requiresProject":
|
|
7149
|
+
"title": "Fix listviews with ",
|
|
7150
|
+
"requiresProject": true,
|
|
7158
7151
|
"isESM": true,
|
|
7159
7152
|
"relativePath": [
|
|
7160
7153
|
"lib",
|
|
7161
7154
|
"commands",
|
|
7162
7155
|
"hardis",
|
|
7163
7156
|
"org",
|
|
7164
|
-
"
|
|
7165
|
-
"
|
|
7157
|
+
"fix",
|
|
7158
|
+
"listviewmine.js"
|
|
7166
7159
|
],
|
|
7167
7160
|
"aliasPermutations": [],
|
|
7168
7161
|
"permutations": [
|
|
7169
|
-
"hardis:org:
|
|
7170
|
-
"org:hardis:
|
|
7171
|
-
"org:
|
|
7172
|
-
"org:
|
|
7173
|
-
"hardis:
|
|
7174
|
-
"
|
|
7175
|
-
"
|
|
7176
|
-
"
|
|
7177
|
-
"hardis:
|
|
7178
|
-
"
|
|
7179
|
-
"
|
|
7180
|
-
"
|
|
7181
|
-
"hardis:org:
|
|
7182
|
-
"org:hardis:
|
|
7183
|
-
"org:
|
|
7184
|
-
"org:
|
|
7185
|
-
"hardis:
|
|
7186
|
-
"
|
|
7187
|
-
"
|
|
7188
|
-
"
|
|
7189
|
-
"hardis:
|
|
7190
|
-
"
|
|
7191
|
-
"
|
|
7192
|
-
"
|
|
7162
|
+
"hardis:org:fix:listviewmine",
|
|
7163
|
+
"org:hardis:fix:listviewmine",
|
|
7164
|
+
"org:fix:hardis:listviewmine",
|
|
7165
|
+
"org:fix:listviewmine:hardis",
|
|
7166
|
+
"hardis:fix:org:listviewmine",
|
|
7167
|
+
"fix:hardis:org:listviewmine",
|
|
7168
|
+
"fix:org:hardis:listviewmine",
|
|
7169
|
+
"fix:org:listviewmine:hardis",
|
|
7170
|
+
"hardis:fix:listviewmine:org",
|
|
7171
|
+
"fix:hardis:listviewmine:org",
|
|
7172
|
+
"fix:listviewmine:hardis:org",
|
|
7173
|
+
"fix:listviewmine:org:hardis",
|
|
7174
|
+
"hardis:org:listviewmine:fix",
|
|
7175
|
+
"org:hardis:listviewmine:fix",
|
|
7176
|
+
"org:listviewmine:hardis:fix",
|
|
7177
|
+
"org:listviewmine:fix:hardis",
|
|
7178
|
+
"hardis:listviewmine:org:fix",
|
|
7179
|
+
"listviewmine:hardis:org:fix",
|
|
7180
|
+
"listviewmine:org:hardis:fix",
|
|
7181
|
+
"listviewmine:org:fix:hardis",
|
|
7182
|
+
"hardis:listviewmine:fix:org",
|
|
7183
|
+
"listviewmine:hardis:fix:org",
|
|
7184
|
+
"listviewmine:fix:hardis:org",
|
|
7185
|
+
"listviewmine:fix:org:hardis"
|
|
7193
7186
|
]
|
|
7194
7187
|
},
|
|
7195
|
-
"hardis:org:
|
|
7188
|
+
"hardis:org:generate:packagexmlfull": {
|
|
7196
7189
|
"aliases": [],
|
|
7197
7190
|
"args": {},
|
|
7198
|
-
"description": "
|
|
7191
|
+
"description": "\n## Command Behavior\n\n**Generates a comprehensive `package.xml` file for a Salesforce org, including all metadata components, even managed ones.**\n\nThis command is essential for various Salesforce development and administration tasks, especially when you need a complete snapshot of an org's metadata. It goes beyond typical source tracking by including managed package components, which is crucial for understanding the full metadata footprint of an org.\n\nKey functionalities:\n\n- **Full Org Metadata Retrieval:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a complete list of all metadata types and their members.\n- **Managed Package Inclusion:** Unlike standard source retrieval, this command explicitly includes metadata from managed packages, providing a truly comprehensive `package.xml`.\n- **Customizable Output:** Allows you to specify the output file path for the generated `package.xml`.\n- **Interactive Org Selection:** If no target org is specified, it interactively prompts the user to choose an org. (or use --no-prompt to skip this step)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce Metadata API Interaction:** It leverages the Salesforce Metadata API to list all available metadata types and then retrieve all components for each type.\n- **`buildOrgManifest` Utility:** The core logic for querying the org's metadata and constructing the `package.xml` is encapsulated within the `buildOrgManifest` utility function.\n- **XML Generation:** It dynamically builds the XML structure of the `package.xml` file, including the `types` and `members` elements for all retrieved metadata.\n- **File System Operations:** It writes the generated `package.xml` file to the specified output path.\n- **Interactive Prompts:** Uses `promptOrgUsernameDefault` to guide the user in selecting the target Salesforce org.\n</details>\n",
|
|
7199
7192
|
"examples": [
|
|
7200
|
-
"$ sf hardis:org:
|
|
7201
|
-
"$ sf hardis:org:
|
|
7193
|
+
"$ sf hardis:org:generate:packagexmlfull",
|
|
7194
|
+
"$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
|
|
7195
|
+
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
7202
7196
|
],
|
|
7203
7197
|
"flags": {
|
|
7204
7198
|
"json": {
|
|
@@ -7216,10 +7210,9 @@
|
|
|
7216
7210
|
"multiple": false,
|
|
7217
7211
|
"type": "option"
|
|
7218
7212
|
},
|
|
7219
|
-
"
|
|
7220
|
-
"
|
|
7221
|
-
"
|
|
7222
|
-
"name": "listviews",
|
|
7213
|
+
"outputfile": {
|
|
7214
|
+
"description": "Output package.xml file",
|
|
7215
|
+
"name": "outputfile",
|
|
7223
7216
|
"hasDynamicHelp": false,
|
|
7224
7217
|
"multiple": false,
|
|
7225
7218
|
"type": "option"
|
|
@@ -7231,6 +7224,13 @@
|
|
|
7231
7224
|
"allowNo": false,
|
|
7232
7225
|
"type": "boolean"
|
|
7233
7226
|
},
|
|
7227
|
+
"no-prompt": {
|
|
7228
|
+
"char": "n",
|
|
7229
|
+
"description": "Do not prompt for org username, use the default one",
|
|
7230
|
+
"name": "no-prompt",
|
|
7231
|
+
"allowNo": false,
|
|
7232
|
+
"type": "boolean"
|
|
7233
|
+
},
|
|
7234
7234
|
"websocket": {
|
|
7235
7235
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7236
7236
|
"name": "websocket",
|
|
@@ -7262,49 +7262,49 @@
|
|
|
7262
7262
|
},
|
|
7263
7263
|
"hasDynamicHelp": true,
|
|
7264
7264
|
"hiddenAliases": [],
|
|
7265
|
-
"id": "hardis:org:
|
|
7265
|
+
"id": "hardis:org:generate:packagexmlfull",
|
|
7266
7266
|
"pluginAlias": "sfdx-hardis",
|
|
7267
7267
|
"pluginName": "sfdx-hardis",
|
|
7268
7268
|
"pluginType": "core",
|
|
7269
7269
|
"strict": true,
|
|
7270
7270
|
"enableJsonFlag": true,
|
|
7271
|
-
"title": "
|
|
7272
|
-
"requiresProject":
|
|
7271
|
+
"title": "Generate Full Org package.xml",
|
|
7272
|
+
"requiresProject": false,
|
|
7273
7273
|
"isESM": true,
|
|
7274
7274
|
"relativePath": [
|
|
7275
7275
|
"lib",
|
|
7276
7276
|
"commands",
|
|
7277
7277
|
"hardis",
|
|
7278
7278
|
"org",
|
|
7279
|
-
"
|
|
7280
|
-
"
|
|
7279
|
+
"generate",
|
|
7280
|
+
"packagexmlfull.js"
|
|
7281
7281
|
],
|
|
7282
7282
|
"aliasPermutations": [],
|
|
7283
7283
|
"permutations": [
|
|
7284
|
-
"hardis:org:
|
|
7285
|
-
"org:hardis:
|
|
7286
|
-
"org:
|
|
7287
|
-
"org:
|
|
7288
|
-
"hardis:
|
|
7289
|
-
"
|
|
7290
|
-
"
|
|
7291
|
-
"
|
|
7292
|
-
"hardis:
|
|
7293
|
-
"
|
|
7294
|
-
"
|
|
7295
|
-
"
|
|
7296
|
-
"hardis:org:
|
|
7297
|
-
"org:hardis:
|
|
7298
|
-
"org:
|
|
7299
|
-
"org:
|
|
7300
|
-
"hardis:
|
|
7301
|
-
"
|
|
7302
|
-
"
|
|
7303
|
-
"
|
|
7304
|
-
"hardis:
|
|
7305
|
-
"
|
|
7306
|
-
"
|
|
7307
|
-
"
|
|
7284
|
+
"hardis:org:generate:packagexmlfull",
|
|
7285
|
+
"org:hardis:generate:packagexmlfull",
|
|
7286
|
+
"org:generate:hardis:packagexmlfull",
|
|
7287
|
+
"org:generate:packagexmlfull:hardis",
|
|
7288
|
+
"hardis:generate:org:packagexmlfull",
|
|
7289
|
+
"generate:hardis:org:packagexmlfull",
|
|
7290
|
+
"generate:org:hardis:packagexmlfull",
|
|
7291
|
+
"generate:org:packagexmlfull:hardis",
|
|
7292
|
+
"hardis:generate:packagexmlfull:org",
|
|
7293
|
+
"generate:hardis:packagexmlfull:org",
|
|
7294
|
+
"generate:packagexmlfull:hardis:org",
|
|
7295
|
+
"generate:packagexmlfull:org:hardis",
|
|
7296
|
+
"hardis:org:packagexmlfull:generate",
|
|
7297
|
+
"org:hardis:packagexmlfull:generate",
|
|
7298
|
+
"org:packagexmlfull:hardis:generate",
|
|
7299
|
+
"org:packagexmlfull:generate:hardis",
|
|
7300
|
+
"hardis:packagexmlfull:org:generate",
|
|
7301
|
+
"packagexmlfull:hardis:org:generate",
|
|
7302
|
+
"packagexmlfull:org:hardis:generate",
|
|
7303
|
+
"packagexmlfull:org:generate:hardis",
|
|
7304
|
+
"hardis:packagexmlfull:generate:org",
|
|
7305
|
+
"packagexmlfull:hardis:generate:org",
|
|
7306
|
+
"packagexmlfull:generate:hardis:org",
|
|
7307
|
+
"packagexmlfull:generate:org:hardis"
|
|
7308
7308
|
]
|
|
7309
7309
|
},
|
|
7310
7310
|
"hardis:org:monitor:all": {
|
|
@@ -11406,6 +11406,221 @@
|
|
|
11406
11406
|
"xml:clean:project:hardis"
|
|
11407
11407
|
]
|
|
11408
11408
|
},
|
|
11409
|
+
"hardis:project:fix:profiletabs": {
|
|
11410
|
+
"aliases": [],
|
|
11411
|
+
"args": {},
|
|
11412
|
+
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
|
|
11413
|
+
"examples": [
|
|
11414
|
+
"$ sf hardis:project:fix:profiletabs"
|
|
11415
|
+
],
|
|
11416
|
+
"flags": {
|
|
11417
|
+
"json": {
|
|
11418
|
+
"description": "Format output as json.",
|
|
11419
|
+
"helpGroup": "GLOBAL",
|
|
11420
|
+
"name": "json",
|
|
11421
|
+
"allowNo": false,
|
|
11422
|
+
"type": "boolean"
|
|
11423
|
+
},
|
|
11424
|
+
"flags-dir": {
|
|
11425
|
+
"helpGroup": "GLOBAL",
|
|
11426
|
+
"name": "flags-dir",
|
|
11427
|
+
"summary": "Import flag values from a directory.",
|
|
11428
|
+
"hasDynamicHelp": false,
|
|
11429
|
+
"multiple": false,
|
|
11430
|
+
"type": "option"
|
|
11431
|
+
},
|
|
11432
|
+
"path": {
|
|
11433
|
+
"char": "p",
|
|
11434
|
+
"description": "Root folder",
|
|
11435
|
+
"name": "path",
|
|
11436
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
11437
|
+
"hasDynamicHelp": false,
|
|
11438
|
+
"multiple": false,
|
|
11439
|
+
"type": "option"
|
|
11440
|
+
},
|
|
11441
|
+
"debug": {
|
|
11442
|
+
"char": "d",
|
|
11443
|
+
"description": "Activate debug mode (more logs)",
|
|
11444
|
+
"name": "debug",
|
|
11445
|
+
"allowNo": false,
|
|
11446
|
+
"type": "boolean"
|
|
11447
|
+
},
|
|
11448
|
+
"websocket": {
|
|
11449
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11450
|
+
"name": "websocket",
|
|
11451
|
+
"hasDynamicHelp": false,
|
|
11452
|
+
"multiple": false,
|
|
11453
|
+
"type": "option"
|
|
11454
|
+
},
|
|
11455
|
+
"skipauth": {
|
|
11456
|
+
"description": "Skip authentication check when a default username is required",
|
|
11457
|
+
"name": "skipauth",
|
|
11458
|
+
"allowNo": false,
|
|
11459
|
+
"type": "boolean"
|
|
11460
|
+
},
|
|
11461
|
+
"target-org": {
|
|
11462
|
+
"aliases": [
|
|
11463
|
+
"targetusername",
|
|
11464
|
+
"u"
|
|
11465
|
+
],
|
|
11466
|
+
"char": "o",
|
|
11467
|
+
"deprecateAliases": true,
|
|
11468
|
+
"name": "target-org",
|
|
11469
|
+
"noCacheDefault": true,
|
|
11470
|
+
"required": true,
|
|
11471
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
11472
|
+
"hasDynamicHelp": true,
|
|
11473
|
+
"multiple": false,
|
|
11474
|
+
"type": "option"
|
|
11475
|
+
}
|
|
11476
|
+
},
|
|
11477
|
+
"hasDynamicHelp": true,
|
|
11478
|
+
"hiddenAliases": [],
|
|
11479
|
+
"id": "hardis:project:fix:profiletabs",
|
|
11480
|
+
"pluginAlias": "sfdx-hardis",
|
|
11481
|
+
"pluginName": "sfdx-hardis",
|
|
11482
|
+
"pluginType": "core",
|
|
11483
|
+
"strict": true,
|
|
11484
|
+
"enableJsonFlag": true,
|
|
11485
|
+
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
11486
|
+
"requiresProject": true,
|
|
11487
|
+
"isESM": true,
|
|
11488
|
+
"relativePath": [
|
|
11489
|
+
"lib",
|
|
11490
|
+
"commands",
|
|
11491
|
+
"hardis",
|
|
11492
|
+
"project",
|
|
11493
|
+
"fix",
|
|
11494
|
+
"profiletabs.js"
|
|
11495
|
+
],
|
|
11496
|
+
"aliasPermutations": [],
|
|
11497
|
+
"permutations": [
|
|
11498
|
+
"hardis:project:fix:profiletabs",
|
|
11499
|
+
"project:hardis:fix:profiletabs",
|
|
11500
|
+
"project:fix:hardis:profiletabs",
|
|
11501
|
+
"project:fix:profiletabs:hardis",
|
|
11502
|
+
"hardis:fix:project:profiletabs",
|
|
11503
|
+
"fix:hardis:project:profiletabs",
|
|
11504
|
+
"fix:project:hardis:profiletabs",
|
|
11505
|
+
"fix:project:profiletabs:hardis",
|
|
11506
|
+
"hardis:fix:profiletabs:project",
|
|
11507
|
+
"fix:hardis:profiletabs:project",
|
|
11508
|
+
"fix:profiletabs:hardis:project",
|
|
11509
|
+
"fix:profiletabs:project:hardis",
|
|
11510
|
+
"hardis:project:profiletabs:fix",
|
|
11511
|
+
"project:hardis:profiletabs:fix",
|
|
11512
|
+
"project:profiletabs:hardis:fix",
|
|
11513
|
+
"project:profiletabs:fix:hardis",
|
|
11514
|
+
"hardis:profiletabs:project:fix",
|
|
11515
|
+
"profiletabs:hardis:project:fix",
|
|
11516
|
+
"profiletabs:project:hardis:fix",
|
|
11517
|
+
"profiletabs:project:fix:hardis",
|
|
11518
|
+
"hardis:profiletabs:fix:project",
|
|
11519
|
+
"profiletabs:hardis:fix:project",
|
|
11520
|
+
"profiletabs:fix:hardis:project",
|
|
11521
|
+
"profiletabs:fix:project:hardis"
|
|
11522
|
+
]
|
|
11523
|
+
},
|
|
11524
|
+
"hardis:project:fix:v53flexipages": {
|
|
11525
|
+
"aliases": [],
|
|
11526
|
+
"args": {},
|
|
11527
|
+
"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",
|
|
11528
|
+
"examples": [
|
|
11529
|
+
"$ sf hardis:project:fix:v53flexipages"
|
|
11530
|
+
],
|
|
11531
|
+
"flags": {
|
|
11532
|
+
"json": {
|
|
11533
|
+
"description": "Format output as json.",
|
|
11534
|
+
"helpGroup": "GLOBAL",
|
|
11535
|
+
"name": "json",
|
|
11536
|
+
"allowNo": false,
|
|
11537
|
+
"type": "boolean"
|
|
11538
|
+
},
|
|
11539
|
+
"flags-dir": {
|
|
11540
|
+
"helpGroup": "GLOBAL",
|
|
11541
|
+
"name": "flags-dir",
|
|
11542
|
+
"summary": "Import flag values from a directory.",
|
|
11543
|
+
"hasDynamicHelp": false,
|
|
11544
|
+
"multiple": false,
|
|
11545
|
+
"type": "option"
|
|
11546
|
+
},
|
|
11547
|
+
"path": {
|
|
11548
|
+
"char": "p",
|
|
11549
|
+
"description": "Root folder",
|
|
11550
|
+
"name": "path",
|
|
11551
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
11552
|
+
"hasDynamicHelp": false,
|
|
11553
|
+
"multiple": false,
|
|
11554
|
+
"type": "option"
|
|
11555
|
+
},
|
|
11556
|
+
"debug": {
|
|
11557
|
+
"char": "d",
|
|
11558
|
+
"description": "Activate debug mode (more logs)",
|
|
11559
|
+
"name": "debug",
|
|
11560
|
+
"allowNo": false,
|
|
11561
|
+
"type": "boolean"
|
|
11562
|
+
},
|
|
11563
|
+
"websocket": {
|
|
11564
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11565
|
+
"name": "websocket",
|
|
11566
|
+
"hasDynamicHelp": false,
|
|
11567
|
+
"multiple": false,
|
|
11568
|
+
"type": "option"
|
|
11569
|
+
},
|
|
11570
|
+
"skipauth": {
|
|
11571
|
+
"description": "Skip authentication check when a default username is required",
|
|
11572
|
+
"name": "skipauth",
|
|
11573
|
+
"allowNo": false,
|
|
11574
|
+
"type": "boolean"
|
|
11575
|
+
}
|
|
11576
|
+
},
|
|
11577
|
+
"hasDynamicHelp": false,
|
|
11578
|
+
"hiddenAliases": [],
|
|
11579
|
+
"id": "hardis:project:fix:v53flexipages",
|
|
11580
|
+
"pluginAlias": "sfdx-hardis",
|
|
11581
|
+
"pluginName": "sfdx-hardis",
|
|
11582
|
+
"pluginType": "core",
|
|
11583
|
+
"strict": true,
|
|
11584
|
+
"enableJsonFlag": true,
|
|
11585
|
+
"title": "Fix flexipages for v53",
|
|
11586
|
+
"requiresProject": true,
|
|
11587
|
+
"isESM": true,
|
|
11588
|
+
"relativePath": [
|
|
11589
|
+
"lib",
|
|
11590
|
+
"commands",
|
|
11591
|
+
"hardis",
|
|
11592
|
+
"project",
|
|
11593
|
+
"fix",
|
|
11594
|
+
"v53flexipages.js"
|
|
11595
|
+
],
|
|
11596
|
+
"aliasPermutations": [],
|
|
11597
|
+
"permutations": [
|
|
11598
|
+
"hardis:project:fix:v53flexipages",
|
|
11599
|
+
"project:hardis:fix:v53flexipages",
|
|
11600
|
+
"project:fix:hardis:v53flexipages",
|
|
11601
|
+
"project:fix:v53flexipages:hardis",
|
|
11602
|
+
"hardis:fix:project:v53flexipages",
|
|
11603
|
+
"fix:hardis:project:v53flexipages",
|
|
11604
|
+
"fix:project:hardis:v53flexipages",
|
|
11605
|
+
"fix:project:v53flexipages:hardis",
|
|
11606
|
+
"hardis:fix:v53flexipages:project",
|
|
11607
|
+
"fix:hardis:v53flexipages:project",
|
|
11608
|
+
"fix:v53flexipages:hardis:project",
|
|
11609
|
+
"fix:v53flexipages:project:hardis",
|
|
11610
|
+
"hardis:project:v53flexipages:fix",
|
|
11611
|
+
"project:hardis:v53flexipages:fix",
|
|
11612
|
+
"project:v53flexipages:hardis:fix",
|
|
11613
|
+
"project:v53flexipages:fix:hardis",
|
|
11614
|
+
"hardis:v53flexipages:project:fix",
|
|
11615
|
+
"v53flexipages:hardis:project:fix",
|
|
11616
|
+
"v53flexipages:project:hardis:fix",
|
|
11617
|
+
"v53flexipages:project:fix:hardis",
|
|
11618
|
+
"hardis:v53flexipages:fix:project",
|
|
11619
|
+
"v53flexipages:hardis:fix:project",
|
|
11620
|
+
"v53flexipages:fix:hardis:project",
|
|
11621
|
+
"v53flexipages:fix:project:hardis"
|
|
11622
|
+
]
|
|
11623
|
+
},
|
|
11409
11624
|
"hardis:project:deploy:notify": {
|
|
11410
11625
|
"aliases": [],
|
|
11411
11626
|
"args": {},
|
|
@@ -12581,221 +12796,6 @@
|
|
|
12581
12796
|
"validate:deploy:project:hardis"
|
|
12582
12797
|
]
|
|
12583
12798
|
},
|
|
12584
|
-
"hardis:project:fix:profiletabs": {
|
|
12585
|
-
"aliases": [],
|
|
12586
|
-
"args": {},
|
|
12587
|
-
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
|
|
12588
|
-
"examples": [
|
|
12589
|
-
"$ sf hardis:project:fix:profiletabs"
|
|
12590
|
-
],
|
|
12591
|
-
"flags": {
|
|
12592
|
-
"json": {
|
|
12593
|
-
"description": "Format output as json.",
|
|
12594
|
-
"helpGroup": "GLOBAL",
|
|
12595
|
-
"name": "json",
|
|
12596
|
-
"allowNo": false,
|
|
12597
|
-
"type": "boolean"
|
|
12598
|
-
},
|
|
12599
|
-
"flags-dir": {
|
|
12600
|
-
"helpGroup": "GLOBAL",
|
|
12601
|
-
"name": "flags-dir",
|
|
12602
|
-
"summary": "Import flag values from a directory.",
|
|
12603
|
-
"hasDynamicHelp": false,
|
|
12604
|
-
"multiple": false,
|
|
12605
|
-
"type": "option"
|
|
12606
|
-
},
|
|
12607
|
-
"path": {
|
|
12608
|
-
"char": "p",
|
|
12609
|
-
"description": "Root folder",
|
|
12610
|
-
"name": "path",
|
|
12611
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12612
|
-
"hasDynamicHelp": false,
|
|
12613
|
-
"multiple": false,
|
|
12614
|
-
"type": "option"
|
|
12615
|
-
},
|
|
12616
|
-
"debug": {
|
|
12617
|
-
"char": "d",
|
|
12618
|
-
"description": "Activate debug mode (more logs)",
|
|
12619
|
-
"name": "debug",
|
|
12620
|
-
"allowNo": false,
|
|
12621
|
-
"type": "boolean"
|
|
12622
|
-
},
|
|
12623
|
-
"websocket": {
|
|
12624
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12625
|
-
"name": "websocket",
|
|
12626
|
-
"hasDynamicHelp": false,
|
|
12627
|
-
"multiple": false,
|
|
12628
|
-
"type": "option"
|
|
12629
|
-
},
|
|
12630
|
-
"skipauth": {
|
|
12631
|
-
"description": "Skip authentication check when a default username is required",
|
|
12632
|
-
"name": "skipauth",
|
|
12633
|
-
"allowNo": false,
|
|
12634
|
-
"type": "boolean"
|
|
12635
|
-
},
|
|
12636
|
-
"target-org": {
|
|
12637
|
-
"aliases": [
|
|
12638
|
-
"targetusername",
|
|
12639
|
-
"u"
|
|
12640
|
-
],
|
|
12641
|
-
"char": "o",
|
|
12642
|
-
"deprecateAliases": true,
|
|
12643
|
-
"name": "target-org",
|
|
12644
|
-
"noCacheDefault": true,
|
|
12645
|
-
"required": true,
|
|
12646
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
12647
|
-
"hasDynamicHelp": true,
|
|
12648
|
-
"multiple": false,
|
|
12649
|
-
"type": "option"
|
|
12650
|
-
}
|
|
12651
|
-
},
|
|
12652
|
-
"hasDynamicHelp": true,
|
|
12653
|
-
"hiddenAliases": [],
|
|
12654
|
-
"id": "hardis:project:fix:profiletabs",
|
|
12655
|
-
"pluginAlias": "sfdx-hardis",
|
|
12656
|
-
"pluginName": "sfdx-hardis",
|
|
12657
|
-
"pluginType": "core",
|
|
12658
|
-
"strict": true,
|
|
12659
|
-
"enableJsonFlag": true,
|
|
12660
|
-
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
12661
|
-
"requiresProject": true,
|
|
12662
|
-
"isESM": true,
|
|
12663
|
-
"relativePath": [
|
|
12664
|
-
"lib",
|
|
12665
|
-
"commands",
|
|
12666
|
-
"hardis",
|
|
12667
|
-
"project",
|
|
12668
|
-
"fix",
|
|
12669
|
-
"profiletabs.js"
|
|
12670
|
-
],
|
|
12671
|
-
"aliasPermutations": [],
|
|
12672
|
-
"permutations": [
|
|
12673
|
-
"hardis:project:fix:profiletabs",
|
|
12674
|
-
"project:hardis:fix:profiletabs",
|
|
12675
|
-
"project:fix:hardis:profiletabs",
|
|
12676
|
-
"project:fix:profiletabs:hardis",
|
|
12677
|
-
"hardis:fix:project:profiletabs",
|
|
12678
|
-
"fix:hardis:project:profiletabs",
|
|
12679
|
-
"fix:project:hardis:profiletabs",
|
|
12680
|
-
"fix:project:profiletabs:hardis",
|
|
12681
|
-
"hardis:fix:profiletabs:project",
|
|
12682
|
-
"fix:hardis:profiletabs:project",
|
|
12683
|
-
"fix:profiletabs:hardis:project",
|
|
12684
|
-
"fix:profiletabs:project:hardis",
|
|
12685
|
-
"hardis:project:profiletabs:fix",
|
|
12686
|
-
"project:hardis:profiletabs:fix",
|
|
12687
|
-
"project:profiletabs:hardis:fix",
|
|
12688
|
-
"project:profiletabs:fix:hardis",
|
|
12689
|
-
"hardis:profiletabs:project:fix",
|
|
12690
|
-
"profiletabs:hardis:project:fix",
|
|
12691
|
-
"profiletabs:project:hardis:fix",
|
|
12692
|
-
"profiletabs:project:fix:hardis",
|
|
12693
|
-
"hardis:profiletabs:fix:project",
|
|
12694
|
-
"profiletabs:hardis:fix:project",
|
|
12695
|
-
"profiletabs:fix:hardis:project",
|
|
12696
|
-
"profiletabs:fix:project:hardis"
|
|
12697
|
-
]
|
|
12698
|
-
},
|
|
12699
|
-
"hardis:project:fix:v53flexipages": {
|
|
12700
|
-
"aliases": [],
|
|
12701
|
-
"args": {},
|
|
12702
|
-
"description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n</details>\n",
|
|
12703
|
-
"examples": [
|
|
12704
|
-
"$ sf hardis:project:fix:v53flexipages"
|
|
12705
|
-
],
|
|
12706
|
-
"flags": {
|
|
12707
|
-
"json": {
|
|
12708
|
-
"description": "Format output as json.",
|
|
12709
|
-
"helpGroup": "GLOBAL",
|
|
12710
|
-
"name": "json",
|
|
12711
|
-
"allowNo": false,
|
|
12712
|
-
"type": "boolean"
|
|
12713
|
-
},
|
|
12714
|
-
"flags-dir": {
|
|
12715
|
-
"helpGroup": "GLOBAL",
|
|
12716
|
-
"name": "flags-dir",
|
|
12717
|
-
"summary": "Import flag values from a directory.",
|
|
12718
|
-
"hasDynamicHelp": false,
|
|
12719
|
-
"multiple": false,
|
|
12720
|
-
"type": "option"
|
|
12721
|
-
},
|
|
12722
|
-
"path": {
|
|
12723
|
-
"char": "p",
|
|
12724
|
-
"description": "Root folder",
|
|
12725
|
-
"name": "path",
|
|
12726
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12727
|
-
"hasDynamicHelp": false,
|
|
12728
|
-
"multiple": false,
|
|
12729
|
-
"type": "option"
|
|
12730
|
-
},
|
|
12731
|
-
"debug": {
|
|
12732
|
-
"char": "d",
|
|
12733
|
-
"description": "Activate debug mode (more logs)",
|
|
12734
|
-
"name": "debug",
|
|
12735
|
-
"allowNo": false,
|
|
12736
|
-
"type": "boolean"
|
|
12737
|
-
},
|
|
12738
|
-
"websocket": {
|
|
12739
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12740
|
-
"name": "websocket",
|
|
12741
|
-
"hasDynamicHelp": false,
|
|
12742
|
-
"multiple": false,
|
|
12743
|
-
"type": "option"
|
|
12744
|
-
},
|
|
12745
|
-
"skipauth": {
|
|
12746
|
-
"description": "Skip authentication check when a default username is required",
|
|
12747
|
-
"name": "skipauth",
|
|
12748
|
-
"allowNo": false,
|
|
12749
|
-
"type": "boolean"
|
|
12750
|
-
}
|
|
12751
|
-
},
|
|
12752
|
-
"hasDynamicHelp": false,
|
|
12753
|
-
"hiddenAliases": [],
|
|
12754
|
-
"id": "hardis:project:fix:v53flexipages",
|
|
12755
|
-
"pluginAlias": "sfdx-hardis",
|
|
12756
|
-
"pluginName": "sfdx-hardis",
|
|
12757
|
-
"pluginType": "core",
|
|
12758
|
-
"strict": true,
|
|
12759
|
-
"enableJsonFlag": true,
|
|
12760
|
-
"title": "Fix flexipages for v53",
|
|
12761
|
-
"requiresProject": true,
|
|
12762
|
-
"isESM": true,
|
|
12763
|
-
"relativePath": [
|
|
12764
|
-
"lib",
|
|
12765
|
-
"commands",
|
|
12766
|
-
"hardis",
|
|
12767
|
-
"project",
|
|
12768
|
-
"fix",
|
|
12769
|
-
"v53flexipages.js"
|
|
12770
|
-
],
|
|
12771
|
-
"aliasPermutations": [],
|
|
12772
|
-
"permutations": [
|
|
12773
|
-
"hardis:project:fix:v53flexipages",
|
|
12774
|
-
"project:hardis:fix:v53flexipages",
|
|
12775
|
-
"project:fix:hardis:v53flexipages",
|
|
12776
|
-
"project:fix:v53flexipages:hardis",
|
|
12777
|
-
"hardis:fix:project:v53flexipages",
|
|
12778
|
-
"fix:hardis:project:v53flexipages",
|
|
12779
|
-
"fix:project:hardis:v53flexipages",
|
|
12780
|
-
"fix:project:v53flexipages:hardis",
|
|
12781
|
-
"hardis:fix:v53flexipages:project",
|
|
12782
|
-
"fix:hardis:v53flexipages:project",
|
|
12783
|
-
"fix:v53flexipages:hardis:project",
|
|
12784
|
-
"fix:v53flexipages:project:hardis",
|
|
12785
|
-
"hardis:project:v53flexipages:fix",
|
|
12786
|
-
"project:hardis:v53flexipages:fix",
|
|
12787
|
-
"project:v53flexipages:hardis:fix",
|
|
12788
|
-
"project:v53flexipages:fix:hardis",
|
|
12789
|
-
"hardis:v53flexipages:project:fix",
|
|
12790
|
-
"v53flexipages:hardis:project:fix",
|
|
12791
|
-
"v53flexipages:project:hardis:fix",
|
|
12792
|
-
"v53flexipages:project:fix:hardis",
|
|
12793
|
-
"hardis:v53flexipages:fix:project",
|
|
12794
|
-
"v53flexipages:hardis:fix:project",
|
|
12795
|
-
"v53flexipages:fix:hardis:project",
|
|
12796
|
-
"v53flexipages:fix:project:hardis"
|
|
12797
|
-
]
|
|
12798
|
-
},
|
|
12799
12799
|
"hardis:project:generate:bypass": {
|
|
12800
12800
|
"aliases": [],
|
|
12801
12801
|
"args": {},
|
|
@@ -15369,5 +15369,5 @@
|
|
|
15369
15369
|
]
|
|
15370
15370
|
}
|
|
15371
15371
|
},
|
|
15372
|
-
"version": "6.6.1-
|
|
15372
|
+
"version": "6.6.1-beta202510111519.0"
|
|
15373
15373
|
}
|