sfdx-hardis 6.14.1-beta202512011840.0 → 6.14.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5808,6 +5808,243 @@
5808
5808
  "import:files:org:hardis"
5809
5809
  ]
5810
5810
  },
5811
+ "hardis:org:fix:listviewmine": {
5812
+ "aliases": [],
5813
+ "args": {},
5814
+ "description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[![Invalid scope:Mine, not allowed ? Deploy your ListViews anyway !](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-invalid-scope-mine.jpg)](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
5815
+ "examples": [
5816
+ "$ sf hardis:org:fix:listviewmine",
5817
+ "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
5818
+ ],
5819
+ "flags": {
5820
+ "json": {
5821
+ "description": "Format output as json.",
5822
+ "helpGroup": "GLOBAL",
5823
+ "name": "json",
5824
+ "allowNo": false,
5825
+ "type": "boolean"
5826
+ },
5827
+ "flags-dir": {
5828
+ "helpGroup": "GLOBAL",
5829
+ "name": "flags-dir",
5830
+ "summary": "Import flag values from a directory.",
5831
+ "hasDynamicHelp": false,
5832
+ "multiple": false,
5833
+ "type": "option"
5834
+ },
5835
+ "listviews": {
5836
+ "char": "l",
5837
+ "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
5838
+ "name": "listviews",
5839
+ "hasDynamicHelp": false,
5840
+ "multiple": false,
5841
+ "type": "option"
5842
+ },
5843
+ "debug": {
5844
+ "char": "d",
5845
+ "description": "Activate debug mode (more logs)",
5846
+ "name": "debug",
5847
+ "allowNo": false,
5848
+ "type": "boolean"
5849
+ },
5850
+ "websocket": {
5851
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
5852
+ "name": "websocket",
5853
+ "hasDynamicHelp": false,
5854
+ "multiple": false,
5855
+ "type": "option"
5856
+ },
5857
+ "skipauth": {
5858
+ "description": "Skip authentication check when a default username is required",
5859
+ "name": "skipauth",
5860
+ "allowNo": false,
5861
+ "type": "boolean"
5862
+ },
5863
+ "target-org": {
5864
+ "aliases": [
5865
+ "targetusername",
5866
+ "u"
5867
+ ],
5868
+ "char": "o",
5869
+ "deprecateAliases": true,
5870
+ "name": "target-org",
5871
+ "noCacheDefault": true,
5872
+ "required": true,
5873
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
5874
+ "hasDynamicHelp": true,
5875
+ "multiple": false,
5876
+ "type": "option"
5877
+ }
5878
+ },
5879
+ "hasDynamicHelp": true,
5880
+ "hiddenAliases": [],
5881
+ "id": "hardis:org:fix:listviewmine",
5882
+ "pluginAlias": "sfdx-hardis",
5883
+ "pluginName": "sfdx-hardis",
5884
+ "pluginType": "core",
5885
+ "strict": true,
5886
+ "enableJsonFlag": true,
5887
+ "title": "Fix listviews with ",
5888
+ "requiresProject": true,
5889
+ "isESM": true,
5890
+ "relativePath": [
5891
+ "lib",
5892
+ "commands",
5893
+ "hardis",
5894
+ "org",
5895
+ "fix",
5896
+ "listviewmine.js"
5897
+ ],
5898
+ "aliasPermutations": [],
5899
+ "permutations": [
5900
+ "hardis:org:fix:listviewmine",
5901
+ "org:hardis:fix:listviewmine",
5902
+ "org:fix:hardis:listviewmine",
5903
+ "org:fix:listviewmine:hardis",
5904
+ "hardis:fix:org:listviewmine",
5905
+ "fix:hardis:org:listviewmine",
5906
+ "fix:org:hardis:listviewmine",
5907
+ "fix:org:listviewmine:hardis",
5908
+ "hardis:fix:listviewmine:org",
5909
+ "fix:hardis:listviewmine:org",
5910
+ "fix:listviewmine:hardis:org",
5911
+ "fix:listviewmine:org:hardis",
5912
+ "hardis:org:listviewmine:fix",
5913
+ "org:hardis:listviewmine:fix",
5914
+ "org:listviewmine:hardis:fix",
5915
+ "org:listviewmine:fix:hardis",
5916
+ "hardis:listviewmine:org:fix",
5917
+ "listviewmine:hardis:org:fix",
5918
+ "listviewmine:org:hardis:fix",
5919
+ "listviewmine:org:fix:hardis",
5920
+ "hardis:listviewmine:fix:org",
5921
+ "listviewmine:hardis:fix:org",
5922
+ "listviewmine:fix:hardis:org",
5923
+ "listviewmine:fix:org:hardis"
5924
+ ]
5925
+ },
5926
+ "hardis:org:generate:packagexmlfull": {
5927
+ "aliases": [],
5928
+ "args": {},
5929
+ "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",
5930
+ "examples": [
5931
+ "$ sf hardis:org:generate:packagexmlfull",
5932
+ "$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
5933
+ "$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
5934
+ ],
5935
+ "flags": {
5936
+ "json": {
5937
+ "description": "Format output as json.",
5938
+ "helpGroup": "GLOBAL",
5939
+ "name": "json",
5940
+ "allowNo": false,
5941
+ "type": "boolean"
5942
+ },
5943
+ "flags-dir": {
5944
+ "helpGroup": "GLOBAL",
5945
+ "name": "flags-dir",
5946
+ "summary": "Import flag values from a directory.",
5947
+ "hasDynamicHelp": false,
5948
+ "multiple": false,
5949
+ "type": "option"
5950
+ },
5951
+ "outputfile": {
5952
+ "description": "Output package.xml file",
5953
+ "name": "outputfile",
5954
+ "hasDynamicHelp": false,
5955
+ "multiple": false,
5956
+ "type": "option"
5957
+ },
5958
+ "debug": {
5959
+ "char": "d",
5960
+ "description": "Activate debug mode (more logs)",
5961
+ "name": "debug",
5962
+ "allowNo": false,
5963
+ "type": "boolean"
5964
+ },
5965
+ "no-prompt": {
5966
+ "char": "n",
5967
+ "description": "Do not prompt for org username, use the default one",
5968
+ "name": "no-prompt",
5969
+ "allowNo": false,
5970
+ "type": "boolean"
5971
+ },
5972
+ "websocket": {
5973
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
5974
+ "name": "websocket",
5975
+ "hasDynamicHelp": false,
5976
+ "multiple": false,
5977
+ "type": "option"
5978
+ },
5979
+ "skipauth": {
5980
+ "description": "Skip authentication check when a default username is required",
5981
+ "name": "skipauth",
5982
+ "allowNo": false,
5983
+ "type": "boolean"
5984
+ },
5985
+ "target-org": {
5986
+ "aliases": [
5987
+ "targetusername",
5988
+ "u"
5989
+ ],
5990
+ "char": "o",
5991
+ "deprecateAliases": true,
5992
+ "name": "target-org",
5993
+ "noCacheDefault": true,
5994
+ "required": true,
5995
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
5996
+ "hasDynamicHelp": true,
5997
+ "multiple": false,
5998
+ "type": "option"
5999
+ }
6000
+ },
6001
+ "hasDynamicHelp": true,
6002
+ "hiddenAliases": [],
6003
+ "id": "hardis:org:generate:packagexmlfull",
6004
+ "pluginAlias": "sfdx-hardis",
6005
+ "pluginName": "sfdx-hardis",
6006
+ "pluginType": "core",
6007
+ "strict": true,
6008
+ "enableJsonFlag": true,
6009
+ "title": "Generate Full Org package.xml",
6010
+ "requiresProject": false,
6011
+ "isESM": true,
6012
+ "relativePath": [
6013
+ "lib",
6014
+ "commands",
6015
+ "hardis",
6016
+ "org",
6017
+ "generate",
6018
+ "packagexmlfull.js"
6019
+ ],
6020
+ "aliasPermutations": [],
6021
+ "permutations": [
6022
+ "hardis:org:generate:packagexmlfull",
6023
+ "org:hardis:generate:packagexmlfull",
6024
+ "org:generate:hardis:packagexmlfull",
6025
+ "org:generate:packagexmlfull:hardis",
6026
+ "hardis:generate:org:packagexmlfull",
6027
+ "generate:hardis:org:packagexmlfull",
6028
+ "generate:org:hardis:packagexmlfull",
6029
+ "generate:org:packagexmlfull:hardis",
6030
+ "hardis:generate:packagexmlfull:org",
6031
+ "generate:hardis:packagexmlfull:org",
6032
+ "generate:packagexmlfull:hardis:org",
6033
+ "generate:packagexmlfull:org:hardis",
6034
+ "hardis:org:packagexmlfull:generate",
6035
+ "org:hardis:packagexmlfull:generate",
6036
+ "org:packagexmlfull:hardis:generate",
6037
+ "org:packagexmlfull:generate:hardis",
6038
+ "hardis:packagexmlfull:org:generate",
6039
+ "packagexmlfull:hardis:org:generate",
6040
+ "packagexmlfull:org:hardis:generate",
6041
+ "packagexmlfull:org:generate:hardis",
6042
+ "hardis:packagexmlfull:generate:org",
6043
+ "packagexmlfull:hardis:generate:org",
6044
+ "packagexmlfull:generate:hardis:org",
6045
+ "packagexmlfull:generate:org:hardis"
6046
+ ]
6047
+ },
5811
6048
  "hardis:org:diagnose:audittrail": {
5812
6049
  "aliases": [],
5813
6050
  "args": {},
@@ -7206,13 +7443,12 @@
7206
7443
  "unusedusers:diagnose:org:hardis"
7207
7444
  ]
7208
7445
  },
7209
- "hardis:org:fix:listviewmine": {
7446
+ "hardis:org:monitor:all": {
7210
7447
  "aliases": [],
7211
7448
  "args": {},
7212
- "description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[![Invalid scope:Mine, not allowed ? Deploy your ListViews anyway !](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-invalid-scope-mine.jpg)](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
7449
+ "description": "Monitor org, generate reports and sends notifications\n\nYou can disable some commands defining either a **monitoringDisable** property in `.sfdx-hardis.yml`, or a comma separated list in env variable **MONITORING_DISABLE**\n\nExample in .sfdx-hardis.yml:\n \n```yaml\nmonitoringDisable:\n - METADATA_STATUS\n - MISSING_ATTRIBUTES\n - UNUSED_METADATAS\n```\n \nExample in env var:\n\n```sh\nMONITORING_DISABLE=METADATA_STATUS,MISSING_ATTRIBUTES,UNUSED_METADATAS\n```\n\nA [default list of monitoring commands](https://sfdx-hardis.cloudity.com/salesforce-monitoring-home/#monitoring-commands) is used, if you want to override it you can define property **monitoringCommands** in your .sfdx-hardis.yml file\n\nExample:\n\n```yaml\nmonitoringCommands:\n - title: My Custom command\n command: sf my:custom:command\n - title: My Custom command 2\n command: sf my:other:custom:command\n```\n\nYou can force the daily run of all commands by defining env var `MONITORING_IGNORE_FREQUENCY=true`\n\nThe default list of commands is the following:\n\n| Key | Description | Command | Frequency |\n| :---: | :---- | :---- | :-----: |\n| [AUDIT_TRAIL](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | Detect suspect setup actions in major org | [sf hardis:org:diagnose:audittrail](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | daily |\n| [LEGACY_API](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | Detect calls to deprecated API versions | [sf hardis:org:diagnose:legacyapi](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | daily |\n| [ORG_LIMITS](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | Detect if org limits are close to be reached | [sf hardis:org:monitor:limits](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | daily |\n| [UNSECURED_CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | Detect unsecured Connected Apps in an org | [sf hardis:org:diagnose:unsecure-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | daily |\n| [LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | Extract licenses information | [sf hardis:org:diagnose:licenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | weekly |\n| [LINT_ACCESS](https://sfdx-hardis.cloudity.com/hardis/lint/access) | Detect custom elements with no access rights defined in permission sets | [sf hardis:lint:access](https://sfdx-hardis.cloudity.com/hardis/lint/access) | weekly |\n| [UNUSED_LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | Detect permission set licenses that are assigned to users that do not need them | [sf hardis:org:diagnose:unusedlicenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | weekly |\n| [UNUSED_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users without recent logins | [sf hardis:org:diagnose:unusedusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ACTIVE_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users with recent logins | [sf hardis:org:diagnose:unusedusers --returnactiveusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ORG_INFO](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | Get org info + SF instance info + next major upgrade date | [sf hardis:org:diagnose:instanceupgrade](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | weekly |\n| [RELEASE_UPDATES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | Gather warnings about incoming and overdue Release Updates | [sf hardis:org:diagnose:releaseupdates](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | weekly |\n| [UNUSED_METADATAS](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | Detect custom labels and custom permissions that are not in use | [sf hardis:lint:unusedmetadatas](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | weekly |\n| [UNUSED_APEX_CLASSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | Detect unused Apex classes in an org | [sf hardis:org:diagnose:unused-apex-classes](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | weekly |\n| [CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | Detect unused Connected Apps in an org | [sf hardis:org:diagnose:unused-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | weekly |\n| [METADATA_STATUS](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | Detect inactive metadata | [sf hardis:lint:metadatastatus](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | weekly |\n| [MISSING_ATTRIBUTES](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | Detect missing description on custom field | [sf hardis:lint:missingattributes](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | weekly |\n\n",
7213
7450
  "examples": [
7214
- "$ sf hardis:org:fix:listviewmine",
7215
- "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
7451
+ "$ sf hardis:org:monitor:all"
7216
7452
  ],
7217
7453
  "flags": {
7218
7454
  "json": {
@@ -7230,14 +7466,6 @@
7230
7466
  "multiple": false,
7231
7467
  "type": "option"
7232
7468
  },
7233
- "listviews": {
7234
- "char": "l",
7235
- "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
7236
- "name": "listviews",
7237
- "hasDynamicHelp": false,
7238
- "multiple": false,
7239
- "type": "option"
7240
- },
7241
7469
  "debug": {
7242
7470
  "char": "d",
7243
7471
  "description": "Activate debug mode (more logs)",
@@ -7276,235 +7504,7 @@
7276
7504
  },
7277
7505
  "hasDynamicHelp": true,
7278
7506
  "hiddenAliases": [],
7279
- "id": "hardis:org:fix:listviewmine",
7280
- "pluginAlias": "sfdx-hardis",
7281
- "pluginName": "sfdx-hardis",
7282
- "pluginType": "core",
7283
- "strict": true,
7284
- "enableJsonFlag": true,
7285
- "title": "Fix listviews with ",
7286
- "requiresProject": true,
7287
- "isESM": true,
7288
- "relativePath": [
7289
- "lib",
7290
- "commands",
7291
- "hardis",
7292
- "org",
7293
- "fix",
7294
- "listviewmine.js"
7295
- ],
7296
- "aliasPermutations": [],
7297
- "permutations": [
7298
- "hardis:org:fix:listviewmine",
7299
- "org:hardis:fix:listviewmine",
7300
- "org:fix:hardis:listviewmine",
7301
- "org:fix:listviewmine:hardis",
7302
- "hardis:fix:org:listviewmine",
7303
- "fix:hardis:org:listviewmine",
7304
- "fix:org:hardis:listviewmine",
7305
- "fix:org:listviewmine:hardis",
7306
- "hardis:fix:listviewmine:org",
7307
- "fix:hardis:listviewmine:org",
7308
- "fix:listviewmine:hardis:org",
7309
- "fix:listviewmine:org:hardis",
7310
- "hardis:org:listviewmine:fix",
7311
- "org:hardis:listviewmine:fix",
7312
- "org:listviewmine:hardis:fix",
7313
- "org:listviewmine:fix:hardis",
7314
- "hardis:listviewmine:org:fix",
7315
- "listviewmine:hardis:org:fix",
7316
- "listviewmine:org:hardis:fix",
7317
- "listviewmine:org:fix:hardis",
7318
- "hardis:listviewmine:fix:org",
7319
- "listviewmine:hardis:fix:org",
7320
- "listviewmine:fix:hardis:org",
7321
- "listviewmine:fix:org:hardis"
7322
- ]
7323
- },
7324
- "hardis:org:generate:packagexmlfull": {
7325
- "aliases": [],
7326
- "args": {},
7327
- "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",
7328
- "examples": [
7329
- "$ sf hardis:org:generate:packagexmlfull",
7330
- "$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
7331
- "$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
7332
- ],
7333
- "flags": {
7334
- "json": {
7335
- "description": "Format output as json.",
7336
- "helpGroup": "GLOBAL",
7337
- "name": "json",
7338
- "allowNo": false,
7339
- "type": "boolean"
7340
- },
7341
- "flags-dir": {
7342
- "helpGroup": "GLOBAL",
7343
- "name": "flags-dir",
7344
- "summary": "Import flag values from a directory.",
7345
- "hasDynamicHelp": false,
7346
- "multiple": false,
7347
- "type": "option"
7348
- },
7349
- "outputfile": {
7350
- "description": "Output package.xml file",
7351
- "name": "outputfile",
7352
- "hasDynamicHelp": false,
7353
- "multiple": false,
7354
- "type": "option"
7355
- },
7356
- "debug": {
7357
- "char": "d",
7358
- "description": "Activate debug mode (more logs)",
7359
- "name": "debug",
7360
- "allowNo": false,
7361
- "type": "boolean"
7362
- },
7363
- "no-prompt": {
7364
- "char": "n",
7365
- "description": "Do not prompt for org username, use the default one",
7366
- "name": "no-prompt",
7367
- "allowNo": false,
7368
- "type": "boolean"
7369
- },
7370
- "websocket": {
7371
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
7372
- "name": "websocket",
7373
- "hasDynamicHelp": false,
7374
- "multiple": false,
7375
- "type": "option"
7376
- },
7377
- "skipauth": {
7378
- "description": "Skip authentication check when a default username is required",
7379
- "name": "skipauth",
7380
- "allowNo": false,
7381
- "type": "boolean"
7382
- },
7383
- "target-org": {
7384
- "aliases": [
7385
- "targetusername",
7386
- "u"
7387
- ],
7388
- "char": "o",
7389
- "deprecateAliases": true,
7390
- "name": "target-org",
7391
- "noCacheDefault": true,
7392
- "required": true,
7393
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
7394
- "hasDynamicHelp": true,
7395
- "multiple": false,
7396
- "type": "option"
7397
- }
7398
- },
7399
- "hasDynamicHelp": true,
7400
- "hiddenAliases": [],
7401
- "id": "hardis:org:generate:packagexmlfull",
7402
- "pluginAlias": "sfdx-hardis",
7403
- "pluginName": "sfdx-hardis",
7404
- "pluginType": "core",
7405
- "strict": true,
7406
- "enableJsonFlag": true,
7407
- "title": "Generate Full Org package.xml",
7408
- "requiresProject": false,
7409
- "isESM": true,
7410
- "relativePath": [
7411
- "lib",
7412
- "commands",
7413
- "hardis",
7414
- "org",
7415
- "generate",
7416
- "packagexmlfull.js"
7417
- ],
7418
- "aliasPermutations": [],
7419
- "permutations": [
7420
- "hardis:org:generate:packagexmlfull",
7421
- "org:hardis:generate:packagexmlfull",
7422
- "org:generate:hardis:packagexmlfull",
7423
- "org:generate:packagexmlfull:hardis",
7424
- "hardis:generate:org:packagexmlfull",
7425
- "generate:hardis:org:packagexmlfull",
7426
- "generate:org:hardis:packagexmlfull",
7427
- "generate:org:packagexmlfull:hardis",
7428
- "hardis:generate:packagexmlfull:org",
7429
- "generate:hardis:packagexmlfull:org",
7430
- "generate:packagexmlfull:hardis:org",
7431
- "generate:packagexmlfull:org:hardis",
7432
- "hardis:org:packagexmlfull:generate",
7433
- "org:hardis:packagexmlfull:generate",
7434
- "org:packagexmlfull:hardis:generate",
7435
- "org:packagexmlfull:generate:hardis",
7436
- "hardis:packagexmlfull:org:generate",
7437
- "packagexmlfull:hardis:org:generate",
7438
- "packagexmlfull:org:hardis:generate",
7439
- "packagexmlfull:org:generate:hardis",
7440
- "hardis:packagexmlfull:generate:org",
7441
- "packagexmlfull:hardis:generate:org",
7442
- "packagexmlfull:generate:hardis:org",
7443
- "packagexmlfull:generate:org:hardis"
7444
- ]
7445
- },
7446
- "hardis:org:monitor:all": {
7447
- "aliases": [],
7448
- "args": {},
7449
- "description": "Monitor org, generate reports and sends notifications\n\nYou can disable some commands defining either a **monitoringDisable** property in `.sfdx-hardis.yml`, or a comma separated list in env variable **MONITORING_DISABLE**\n\nExample in .sfdx-hardis.yml:\n \n```yaml\nmonitoringDisable:\n - METADATA_STATUS\n - MISSING_ATTRIBUTES\n - UNUSED_METADATAS\n```\n \nExample in env var:\n\n```sh\nMONITORING_DISABLE=METADATA_STATUS,MISSING_ATTRIBUTES,UNUSED_METADATAS\n```\n\nA [default list of monitoring commands](https://sfdx-hardis.cloudity.com/salesforce-monitoring-home/#monitoring-commands) is used, if you want to override it you can define property **monitoringCommands** in your .sfdx-hardis.yml file\n\nExample:\n\n```yaml\nmonitoringCommands:\n - title: My Custom command\n command: sf my:custom:command\n - title: My Custom command 2\n command: sf my:other:custom:command\n```\n\nYou can force the daily run of all commands by defining env var `MONITORING_IGNORE_FREQUENCY=true`\n\nThe default list of commands is the following:\n\n| Key | Description | Command | Frequency |\n| :---: | :---- | :---- | :-----: |\n| [AUDIT_TRAIL](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | Detect suspect setup actions in major org | [sf hardis:org:diagnose:audittrail](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | daily |\n| [LEGACY_API](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | Detect calls to deprecated API versions | [sf hardis:org:diagnose:legacyapi](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | daily |\n| [ORG_LIMITS](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | Detect if org limits are close to be reached | [sf hardis:org:monitor:limits](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | daily |\n| [UNSECURED_CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | Detect unsecured Connected Apps in an org | [sf hardis:org:diagnose:unsecure-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | daily |\n| [LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | Extract licenses information | [sf hardis:org:diagnose:licenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | weekly |\n| [LINT_ACCESS](https://sfdx-hardis.cloudity.com/hardis/lint/access) | Detect custom elements with no access rights defined in permission sets | [sf hardis:lint:access](https://sfdx-hardis.cloudity.com/hardis/lint/access) | weekly |\n| [UNUSED_LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | Detect permission set licenses that are assigned to users that do not need them | [sf hardis:org:diagnose:unusedlicenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | weekly |\n| [UNUSED_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users without recent logins | [sf hardis:org:diagnose:unusedusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ACTIVE_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users with recent logins | [sf hardis:org:diagnose:unusedusers --returnactiveusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ORG_INFO](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | Get org info + SF instance info + next major upgrade date | [sf hardis:org:diagnose:instanceupgrade](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | weekly |\n| [RELEASE_UPDATES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | Gather warnings about incoming and overdue Release Updates | [sf hardis:org:diagnose:releaseupdates](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | weekly |\n| [UNUSED_METADATAS](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | Detect custom labels and custom permissions that are not in use | [sf hardis:lint:unusedmetadatas](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | weekly |\n| [UNUSED_APEX_CLASSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | Detect unused Apex classes in an org | [sf hardis:org:diagnose:unused-apex-classes](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | weekly |\n| [CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | Detect unused Connected Apps in an org | [sf hardis:org:diagnose:unused-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | weekly |\n| [METADATA_STATUS](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | Detect inactive metadata | [sf hardis:lint:metadatastatus](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | weekly |\n| [MISSING_ATTRIBUTES](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | Detect missing description on custom field | [sf hardis:lint:missingattributes](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | weekly |\n\n",
7450
- "examples": [
7451
- "$ sf hardis:org:monitor:all"
7452
- ],
7453
- "flags": {
7454
- "json": {
7455
- "description": "Format output as json.",
7456
- "helpGroup": "GLOBAL",
7457
- "name": "json",
7458
- "allowNo": false,
7459
- "type": "boolean"
7460
- },
7461
- "flags-dir": {
7462
- "helpGroup": "GLOBAL",
7463
- "name": "flags-dir",
7464
- "summary": "Import flag values from a directory.",
7465
- "hasDynamicHelp": false,
7466
- "multiple": false,
7467
- "type": "option"
7468
- },
7469
- "debug": {
7470
- "char": "d",
7471
- "description": "Activate debug mode (more logs)",
7472
- "name": "debug",
7473
- "allowNo": false,
7474
- "type": "boolean"
7475
- },
7476
- "websocket": {
7477
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
7478
- "name": "websocket",
7479
- "hasDynamicHelp": false,
7480
- "multiple": false,
7481
- "type": "option"
7482
- },
7483
- "skipauth": {
7484
- "description": "Skip authentication check when a default username is required",
7485
- "name": "skipauth",
7486
- "allowNo": false,
7487
- "type": "boolean"
7488
- },
7489
- "target-org": {
7490
- "aliases": [
7491
- "targetusername",
7492
- "u"
7493
- ],
7494
- "char": "o",
7495
- "deprecateAliases": true,
7496
- "name": "target-org",
7497
- "noCacheDefault": true,
7498
- "required": true,
7499
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
7500
- "hasDynamicHelp": true,
7501
- "multiple": false,
7502
- "type": "option"
7503
- }
7504
- },
7505
- "hasDynamicHelp": true,
7506
- "hiddenAliases": [],
7507
- "id": "hardis:org:monitor:all",
7507
+ "id": "hardis:org:monitor:all",
7508
7508
  "pluginAlias": "sfdx-hardis",
7509
7509
  "pluginName": "sfdx-hardis",
7510
7510
  "pluginType": "core",
@@ -8545,13 +8545,12 @@
8545
8545
  "before-refresh:refresh:org:hardis"
8546
8546
  ]
8547
8547
  },
8548
- "hardis:org:retrieve:packageconfig": {
8548
+ "hardis:org:test:apex": {
8549
8549
  "aliases": [],
8550
8550
  "args": {},
8551
- "description": "\n**Retrieves the installed package configuration from a Salesforce org and optionally updates the local project configuration.**\n\nThis command is useful for maintaining an accurate record of installed packages within your Salesforce project, which is crucial for managing dependencies and ensuring consistent deployments across environments.\n\nKey functionalities:\n\n- **Package Listing:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a list of all installed packages.\n- **Configuration Update:** Offers the option to update your local project's configuration with the retrieved list of installed packages. This can be beneficial for automating package installations during environment setup or CI/CD processes.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Org Connection:** It establishes a connection to the target Salesforce org using the provided or prompted username.\n- **Metadata Retrieval:** It utilizes `MetadataUtils.listInstalledPackages` to query the Salesforce org and obtain details about the installed packages.\n- **Interactive Prompt:** It uses the `prompts` library to ask the user whether they want to update their local project configuration with the retrieved package list.\n- **Configuration Management:** If the user confirms, it calls `managePackageConfig` to update the project's configuration file (likely `.sfdx-hardis.yml`) with the new package information.\n- **User Feedback:** Provides clear messages to the user about the success of the package retrieval and configuration update.\n</details>\n",
8551
+ "description": "Run apex tests in Salesforce org\n\nIf following configuration is defined, it will fail if apex coverage target is not reached:\n\n- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide`\n- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide`\n\nYou can override env var SFDX_TEST_WAIT_MINUTES to wait more than 120 minutes.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-apex-tests/) and can output Grafana, Slack and MsTeams Notifications.\n",
8552
8552
  "examples": [
8553
- "$ sf hardis:org:retrieve:packageconfig",
8554
- "sf hardis:org:retrieve:packageconfig -u myOrg"
8553
+ "$ sf hardis:org:test:apex"
8555
8554
  ],
8556
8555
  "flags": {
8557
8556
  "json": {
@@ -8569,6 +8568,21 @@
8569
8568
  "multiple": false,
8570
8569
  "type": "option"
8571
8570
  },
8571
+ "testlevel": {
8572
+ "char": "l",
8573
+ "description": "Level of tests to apply to validate deployment",
8574
+ "name": "testlevel",
8575
+ "default": "RunLocalTests",
8576
+ "hasDynamicHelp": false,
8577
+ "multiple": false,
8578
+ "options": [
8579
+ "NoTestRun",
8580
+ "RunSpecifiedTests",
8581
+ "RunLocalTests",
8582
+ "RunAllTestsInOrg"
8583
+ ],
8584
+ "type": "option"
8585
+ },
8572
8586
  "debug": {
8573
8587
  "char": "d",
8574
8588
  "description": "Activate debug mode (more logs)",
@@ -8607,57 +8621,57 @@
8607
8621
  },
8608
8622
  "hasDynamicHelp": true,
8609
8623
  "hiddenAliases": [],
8610
- "id": "hardis:org:retrieve:packageconfig",
8624
+ "id": "hardis:org:test:apex",
8611
8625
  "pluginAlias": "sfdx-hardis",
8612
8626
  "pluginName": "sfdx-hardis",
8613
8627
  "pluginType": "core",
8614
8628
  "strict": true,
8615
8629
  "enableJsonFlag": true,
8616
- "title": "Retrieve package configuration from an org",
8617
- "requiresProject": false,
8630
+ "title": "Run apex tests",
8618
8631
  "isESM": true,
8619
8632
  "relativePath": [
8620
8633
  "lib",
8621
8634
  "commands",
8622
8635
  "hardis",
8623
8636
  "org",
8624
- "retrieve",
8625
- "packageconfig.js"
8637
+ "test",
8638
+ "apex.js"
8626
8639
  ],
8627
8640
  "aliasPermutations": [],
8628
8641
  "permutations": [
8629
- "hardis:org:retrieve:packageconfig",
8630
- "org:hardis:retrieve:packageconfig",
8631
- "org:retrieve:hardis:packageconfig",
8632
- "org:retrieve:packageconfig:hardis",
8633
- "hardis:retrieve:org:packageconfig",
8634
- "retrieve:hardis:org:packageconfig",
8635
- "retrieve:org:hardis:packageconfig",
8636
- "retrieve:org:packageconfig:hardis",
8637
- "hardis:retrieve:packageconfig:org",
8638
- "retrieve:hardis:packageconfig:org",
8639
- "retrieve:packageconfig:hardis:org",
8640
- "retrieve:packageconfig:org:hardis",
8641
- "hardis:org:packageconfig:retrieve",
8642
- "org:hardis:packageconfig:retrieve",
8643
- "org:packageconfig:hardis:retrieve",
8644
- "org:packageconfig:retrieve:hardis",
8645
- "hardis:packageconfig:org:retrieve",
8646
- "packageconfig:hardis:org:retrieve",
8647
- "packageconfig:org:hardis:retrieve",
8648
- "packageconfig:org:retrieve:hardis",
8649
- "hardis:packageconfig:retrieve:org",
8650
- "packageconfig:hardis:retrieve:org",
8651
- "packageconfig:retrieve:hardis:org",
8652
- "packageconfig:retrieve:org:hardis"
8642
+ "hardis:org:test:apex",
8643
+ "org:hardis:test:apex",
8644
+ "org:test:hardis:apex",
8645
+ "org:test:apex:hardis",
8646
+ "hardis:test:org:apex",
8647
+ "test:hardis:org:apex",
8648
+ "test:org:hardis:apex",
8649
+ "test:org:apex:hardis",
8650
+ "hardis:test:apex:org",
8651
+ "test:hardis:apex:org",
8652
+ "test:apex:hardis:org",
8653
+ "test:apex:org:hardis",
8654
+ "hardis:org:apex:test",
8655
+ "org:hardis:apex:test",
8656
+ "org:apex:hardis:test",
8657
+ "org:apex:test:hardis",
8658
+ "hardis:apex:org:test",
8659
+ "apex:hardis:org:test",
8660
+ "apex:org:hardis:test",
8661
+ "apex:org:test:hardis",
8662
+ "hardis:apex:test:org",
8663
+ "apex:hardis:test:org",
8664
+ "apex:test:hardis:org",
8665
+ "apex:test:org:hardis"
8653
8666
  ]
8654
8667
  },
8655
- "hardis:org:test:apex": {
8668
+ "hardis:org:retrieve:packageconfig": {
8656
8669
  "aliases": [],
8657
8670
  "args": {},
8658
- "description": "Run apex tests in Salesforce org\n\nIf following configuration is defined, it will fail if apex coverage target is not reached:\n\n- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide`\n- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide`\n\nYou can override env var SFDX_TEST_WAIT_MINUTES to wait more than 120 minutes.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-apex-tests/) and can output Grafana, Slack and MsTeams Notifications.\n",
8671
+ "description": "\n**Retrieves the installed package configuration from a Salesforce org and optionally updates the local project configuration.**\n\nThis command is useful for maintaining an accurate record of installed packages within your Salesforce project, which is crucial for managing dependencies and ensuring consistent deployments across environments.\n\nKey functionalities:\n\n- **Package Listing:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a list of all installed packages.\n- **Configuration Update:** Offers the option to update your local project's configuration with the retrieved list of installed packages. This can be beneficial for automating package installations during environment setup or CI/CD processes.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Org Connection:** It establishes a connection to the target Salesforce org using the provided or prompted username.\n- **Metadata Retrieval:** It utilizes `MetadataUtils.listInstalledPackages` to query the Salesforce org and obtain details about the installed packages.\n- **Interactive Prompt:** It uses the `prompts` library to ask the user whether they want to update their local project configuration with the retrieved package list.\n- **Configuration Management:** If the user confirms, it calls `managePackageConfig` to update the project's configuration file (likely `.sfdx-hardis.yml`) with the new package information.\n- **User Feedback:** Provides clear messages to the user about the success of the package retrieval and configuration update.\n</details>\n",
8659
8672
  "examples": [
8660
- "$ sf hardis:org:test:apex"
8673
+ "$ sf hardis:org:retrieve:packageconfig",
8674
+ "sf hardis:org:retrieve:packageconfig -u myOrg"
8661
8675
  ],
8662
8676
  "flags": {
8663
8677
  "json": {
@@ -8675,21 +8689,6 @@
8675
8689
  "multiple": false,
8676
8690
  "type": "option"
8677
8691
  },
8678
- "testlevel": {
8679
- "char": "l",
8680
- "description": "Level of tests to apply to validate deployment",
8681
- "name": "testlevel",
8682
- "default": "RunLocalTests",
8683
- "hasDynamicHelp": false,
8684
- "multiple": false,
8685
- "options": [
8686
- "NoTestRun",
8687
- "RunSpecifiedTests",
8688
- "RunLocalTests",
8689
- "RunAllTestsInOrg"
8690
- ],
8691
- "type": "option"
8692
- },
8693
8692
  "debug": {
8694
8693
  "char": "d",
8695
8694
  "description": "Activate debug mode (more logs)",
@@ -8728,48 +8727,49 @@
8728
8727
  },
8729
8728
  "hasDynamicHelp": true,
8730
8729
  "hiddenAliases": [],
8731
- "id": "hardis:org:test:apex",
8730
+ "id": "hardis:org:retrieve:packageconfig",
8732
8731
  "pluginAlias": "sfdx-hardis",
8733
8732
  "pluginName": "sfdx-hardis",
8734
8733
  "pluginType": "core",
8735
8734
  "strict": true,
8736
8735
  "enableJsonFlag": true,
8737
- "title": "Run apex tests",
8736
+ "title": "Retrieve package configuration from an org",
8737
+ "requiresProject": false,
8738
8738
  "isESM": true,
8739
8739
  "relativePath": [
8740
8740
  "lib",
8741
8741
  "commands",
8742
8742
  "hardis",
8743
8743
  "org",
8744
- "test",
8745
- "apex.js"
8744
+ "retrieve",
8745
+ "packageconfig.js"
8746
8746
  ],
8747
8747
  "aliasPermutations": [],
8748
8748
  "permutations": [
8749
- "hardis:org:test:apex",
8750
- "org:hardis:test:apex",
8751
- "org:test:hardis:apex",
8752
- "org:test:apex:hardis",
8753
- "hardis:test:org:apex",
8754
- "test:hardis:org:apex",
8755
- "test:org:hardis:apex",
8756
- "test:org:apex:hardis",
8757
- "hardis:test:apex:org",
8758
- "test:hardis:apex:org",
8759
- "test:apex:hardis:org",
8760
- "test:apex:org:hardis",
8761
- "hardis:org:apex:test",
8762
- "org:hardis:apex:test",
8763
- "org:apex:hardis:test",
8764
- "org:apex:test:hardis",
8765
- "hardis:apex:org:test",
8766
- "apex:hardis:org:test",
8767
- "apex:org:hardis:test",
8768
- "apex:org:test:hardis",
8769
- "hardis:apex:test:org",
8770
- "apex:hardis:test:org",
8771
- "apex:test:hardis:org",
8772
- "apex:test:org:hardis"
8749
+ "hardis:org:retrieve:packageconfig",
8750
+ "org:hardis:retrieve:packageconfig",
8751
+ "org:retrieve:hardis:packageconfig",
8752
+ "org:retrieve:packageconfig:hardis",
8753
+ "hardis:retrieve:org:packageconfig",
8754
+ "retrieve:hardis:org:packageconfig",
8755
+ "retrieve:org:hardis:packageconfig",
8756
+ "retrieve:org:packageconfig:hardis",
8757
+ "hardis:retrieve:packageconfig:org",
8758
+ "retrieve:hardis:packageconfig:org",
8759
+ "retrieve:packageconfig:hardis:org",
8760
+ "retrieve:packageconfig:org:hardis",
8761
+ "hardis:org:packageconfig:retrieve",
8762
+ "org:hardis:packageconfig:retrieve",
8763
+ "org:packageconfig:hardis:retrieve",
8764
+ "org:packageconfig:retrieve:hardis",
8765
+ "hardis:packageconfig:org:retrieve",
8766
+ "packageconfig:hardis:org:retrieve",
8767
+ "packageconfig:org:hardis:retrieve",
8768
+ "packageconfig:org:retrieve:hardis",
8769
+ "hardis:packageconfig:retrieve:org",
8770
+ "packageconfig:hardis:retrieve:org",
8771
+ "packageconfig:retrieve:hardis:org",
8772
+ "packageconfig:retrieve:org:hardis"
8773
8773
  ]
8774
8774
  },
8775
8775
  "hardis:org:user:activateinvalid": {
@@ -9999,140 +9999,37 @@
9999
9999
  "name": "target-org",
10000
10000
  "noCacheDefault": true,
10001
10001
  "summary": "Username or alias of the target org.",
10002
- "hasDynamicHelp": true,
10003
- "multiple": false,
10004
- "type": "option"
10005
- },
10006
- "target-dev-hub": {
10007
- "aliases": [
10008
- "targetdevhubusername"
10009
- ],
10010
- "char": "v",
10011
- "deprecateAliases": true,
10012
- "name": "target-dev-hub",
10013
- "noCacheDefault": true,
10014
- "required": false,
10015
- "summary": "Username or alias of the Dev Hub org.",
10016
- "hasDynamicHelp": true,
10017
- "multiple": false,
10018
- "type": "option"
10019
- }
10020
- },
10021
- "hasDynamicHelp": true,
10022
- "hiddenAliases": [],
10023
- "id": "hardis:project:configure:auth",
10024
- "pluginAlias": "sfdx-hardis",
10025
- "pluginName": "sfdx-hardis",
10026
- "pluginType": "core",
10027
- "strict": true,
10028
- "enableJsonFlag": true,
10029
- "title": "Configure authentication",
10030
- "requiresProject": false,
10031
- "requiresDependencies": [
10032
- "openssl"
10033
- ],
10034
- "isESM": true,
10035
- "relativePath": [
10036
- "lib",
10037
- "commands",
10038
- "hardis",
10039
- "project",
10040
- "configure",
10041
- "auth.js"
10042
- ],
10043
- "aliasPermutations": [],
10044
- "permutations": [
10045
- "hardis:project:configure:auth",
10046
- "project:hardis:configure:auth",
10047
- "project:configure:hardis:auth",
10048
- "project:configure:auth:hardis",
10049
- "hardis:configure:project:auth",
10050
- "configure:hardis:project:auth",
10051
- "configure:project:hardis:auth",
10052
- "configure:project:auth:hardis",
10053
- "hardis:configure:auth:project",
10054
- "configure:hardis:auth:project",
10055
- "configure:auth:hardis:project",
10056
- "configure:auth:project:hardis",
10057
- "hardis:project:auth:configure",
10058
- "project:hardis:auth:configure",
10059
- "project:auth:hardis:configure",
10060
- "project:auth:configure:hardis",
10061
- "hardis:auth:project:configure",
10062
- "auth:hardis:project:configure",
10063
- "auth:project:hardis:configure",
10064
- "auth:project:configure:hardis",
10065
- "hardis:auth:configure:project",
10066
- "auth:hardis:configure:project",
10067
- "auth:configure:hardis:project",
10068
- "auth:configure:project:hardis"
10069
- ]
10070
- },
10071
- "hardis:project:convert:profilestopermsets": {
10072
- "aliases": [],
10073
- "args": {},
10074
- "description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
10075
- "examples": [
10076
- "$ sf hardis:project:convert:profilestopermsets"
10077
- ],
10078
- "flags": {
10079
- "json": {
10080
- "description": "Format output as json.",
10081
- "helpGroup": "GLOBAL",
10082
- "name": "json",
10083
- "allowNo": false,
10084
- "type": "boolean"
10085
- },
10086
- "flags-dir": {
10087
- "helpGroup": "GLOBAL",
10088
- "name": "flags-dir",
10089
- "summary": "Import flag values from a directory.",
10090
- "hasDynamicHelp": false,
10091
- "multiple": false,
10092
- "type": "option"
10093
- },
10094
- "except": {
10095
- "char": "e",
10096
- "description": "List of filters",
10097
- "name": "except",
10098
- "default": [],
10099
- "hasDynamicHelp": false,
10100
- "multiple": true,
10101
- "type": "option"
10102
- },
10103
- "debug": {
10104
- "char": "d",
10105
- "description": "Activate debug mode (more logs)",
10106
- "name": "debug",
10107
- "allowNo": false,
10108
- "type": "boolean"
10109
- },
10110
- "websocket": {
10111
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
10112
- "name": "websocket",
10113
- "hasDynamicHelp": false,
10002
+ "hasDynamicHelp": true,
10114
10003
  "multiple": false,
10115
10004
  "type": "option"
10116
10005
  },
10117
- "skipauth": {
10118
- "description": "Skip authentication check when a default username is required",
10119
- "name": "skipauth",
10120
- "allowNo": false,
10121
- "type": "boolean"
10006
+ "target-dev-hub": {
10007
+ "aliases": [
10008
+ "targetdevhubusername"
10009
+ ],
10010
+ "char": "v",
10011
+ "deprecateAliases": true,
10012
+ "name": "target-dev-hub",
10013
+ "noCacheDefault": true,
10014
+ "required": false,
10015
+ "summary": "Username or alias of the Dev Hub org.",
10016
+ "hasDynamicHelp": true,
10017
+ "multiple": false,
10018
+ "type": "option"
10122
10019
  }
10123
10020
  },
10124
- "hasDynamicHelp": false,
10021
+ "hasDynamicHelp": true,
10125
10022
  "hiddenAliases": [],
10126
- "id": "hardis:project:convert:profilestopermsets",
10023
+ "id": "hardis:project:configure:auth",
10127
10024
  "pluginAlias": "sfdx-hardis",
10128
10025
  "pluginName": "sfdx-hardis",
10129
10026
  "pluginType": "core",
10130
10027
  "strict": true,
10131
10028
  "enableJsonFlag": true,
10132
- "title": "Convert Profiles into Permission Sets",
10133
- "requiresProject": true,
10134
- "requiresSfdxPlugins": [
10135
- "shane-sfdx-plugins"
10029
+ "title": "Configure authentication",
10030
+ "requiresProject": false,
10031
+ "requiresDependencies": [
10032
+ "openssl"
10136
10033
  ],
10137
10034
  "isESM": true,
10138
10035
  "relativePath": [
@@ -10140,35 +10037,35 @@
10140
10037
  "commands",
10141
10038
  "hardis",
10142
10039
  "project",
10143
- "convert",
10144
- "profilestopermsets.js"
10040
+ "configure",
10041
+ "auth.js"
10145
10042
  ],
10146
10043
  "aliasPermutations": [],
10147
10044
  "permutations": [
10148
- "hardis:project:convert:profilestopermsets",
10149
- "project:hardis:convert:profilestopermsets",
10150
- "project:convert:hardis:profilestopermsets",
10151
- "project:convert:profilestopermsets:hardis",
10152
- "hardis:convert:project:profilestopermsets",
10153
- "convert:hardis:project:profilestopermsets",
10154
- "convert:project:hardis:profilestopermsets",
10155
- "convert:project:profilestopermsets:hardis",
10156
- "hardis:convert:profilestopermsets:project",
10157
- "convert:hardis:profilestopermsets:project",
10158
- "convert:profilestopermsets:hardis:project",
10159
- "convert:profilestopermsets:project:hardis",
10160
- "hardis:project:profilestopermsets:convert",
10161
- "project:hardis:profilestopermsets:convert",
10162
- "project:profilestopermsets:hardis:convert",
10163
- "project:profilestopermsets:convert:hardis",
10164
- "hardis:profilestopermsets:project:convert",
10165
- "profilestopermsets:hardis:project:convert",
10166
- "profilestopermsets:project:hardis:convert",
10167
- "profilestopermsets:project:convert:hardis",
10168
- "hardis:profilestopermsets:convert:project",
10169
- "profilestopermsets:hardis:convert:project",
10170
- "profilestopermsets:convert:hardis:project",
10171
- "profilestopermsets:convert:project:hardis"
10045
+ "hardis:project:configure:auth",
10046
+ "project:hardis:configure:auth",
10047
+ "project:configure:hardis:auth",
10048
+ "project:configure:auth:hardis",
10049
+ "hardis:configure:project:auth",
10050
+ "configure:hardis:project:auth",
10051
+ "configure:project:hardis:auth",
10052
+ "configure:project:auth:hardis",
10053
+ "hardis:configure:auth:project",
10054
+ "configure:hardis:auth:project",
10055
+ "configure:auth:hardis:project",
10056
+ "configure:auth:project:hardis",
10057
+ "hardis:project:auth:configure",
10058
+ "project:hardis:auth:configure",
10059
+ "project:auth:hardis:configure",
10060
+ "project:auth:configure:hardis",
10061
+ "hardis:auth:project:configure",
10062
+ "auth:hardis:project:configure",
10063
+ "auth:project:hardis:configure",
10064
+ "auth:project:configure:hardis",
10065
+ "hardis:auth:configure:project",
10066
+ "auth:hardis:configure:project",
10067
+ "auth:configure:hardis:project",
10068
+ "auth:configure:project:hardis"
10172
10069
  ]
10173
10070
  },
10174
10071
  "hardis:project:clean:emptyitems": {
@@ -11757,127 +11654,12 @@
11757
11654
  "xml:clean:project:hardis"
11758
11655
  ]
11759
11656
  },
11760
- "hardis:project:fix:profiletabs": {
11761
- "aliases": [],
11762
- "args": {},
11763
- "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",
11764
- "examples": [
11765
- "$ sf hardis:project:fix:profiletabs"
11766
- ],
11767
- "flags": {
11768
- "json": {
11769
- "description": "Format output as json.",
11770
- "helpGroup": "GLOBAL",
11771
- "name": "json",
11772
- "allowNo": false,
11773
- "type": "boolean"
11774
- },
11775
- "flags-dir": {
11776
- "helpGroup": "GLOBAL",
11777
- "name": "flags-dir",
11778
- "summary": "Import flag values from a directory.",
11779
- "hasDynamicHelp": false,
11780
- "multiple": false,
11781
- "type": "option"
11782
- },
11783
- "path": {
11784
- "char": "p",
11785
- "description": "Root folder",
11786
- "name": "path",
11787
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11788
- "hasDynamicHelp": false,
11789
- "multiple": false,
11790
- "type": "option"
11791
- },
11792
- "debug": {
11793
- "char": "d",
11794
- "description": "Activate debug mode (more logs)",
11795
- "name": "debug",
11796
- "allowNo": false,
11797
- "type": "boolean"
11798
- },
11799
- "websocket": {
11800
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11801
- "name": "websocket",
11802
- "hasDynamicHelp": false,
11803
- "multiple": false,
11804
- "type": "option"
11805
- },
11806
- "skipauth": {
11807
- "description": "Skip authentication check when a default username is required",
11808
- "name": "skipauth",
11809
- "allowNo": false,
11810
- "type": "boolean"
11811
- },
11812
- "target-org": {
11813
- "aliases": [
11814
- "targetusername",
11815
- "u"
11816
- ],
11817
- "char": "o",
11818
- "deprecateAliases": true,
11819
- "name": "target-org",
11820
- "noCacheDefault": true,
11821
- "required": true,
11822
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
11823
- "hasDynamicHelp": true,
11824
- "multiple": false,
11825
- "type": "option"
11826
- }
11827
- },
11828
- "hasDynamicHelp": true,
11829
- "hiddenAliases": [],
11830
- "id": "hardis:project:fix:profiletabs",
11831
- "pluginAlias": "sfdx-hardis",
11832
- "pluginName": "sfdx-hardis",
11833
- "pluginType": "core",
11834
- "strict": true,
11835
- "enableJsonFlag": true,
11836
- "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
11837
- "requiresProject": true,
11838
- "isESM": true,
11839
- "relativePath": [
11840
- "lib",
11841
- "commands",
11842
- "hardis",
11843
- "project",
11844
- "fix",
11845
- "profiletabs.js"
11846
- ],
11847
- "aliasPermutations": [],
11848
- "permutations": [
11849
- "hardis:project:fix:profiletabs",
11850
- "project:hardis:fix:profiletabs",
11851
- "project:fix:hardis:profiletabs",
11852
- "project:fix:profiletabs:hardis",
11853
- "hardis:fix:project:profiletabs",
11854
- "fix:hardis:project:profiletabs",
11855
- "fix:project:hardis:profiletabs",
11856
- "fix:project:profiletabs:hardis",
11857
- "hardis:fix:profiletabs:project",
11858
- "fix:hardis:profiletabs:project",
11859
- "fix:profiletabs:hardis:project",
11860
- "fix:profiletabs:project:hardis",
11861
- "hardis:project:profiletabs:fix",
11862
- "project:hardis:profiletabs:fix",
11863
- "project:profiletabs:hardis:fix",
11864
- "project:profiletabs:fix:hardis",
11865
- "hardis:profiletabs:project:fix",
11866
- "profiletabs:hardis:project:fix",
11867
- "profiletabs:project:hardis:fix",
11868
- "profiletabs:project:fix:hardis",
11869
- "hardis:profiletabs:fix:project",
11870
- "profiletabs:hardis:fix:project",
11871
- "profiletabs:fix:hardis:project",
11872
- "profiletabs:fix:project:hardis"
11873
- ]
11874
- },
11875
- "hardis:project:fix:v53flexipages": {
11657
+ "hardis:project:convert:profilestopermsets": {
11876
11658
  "aliases": [],
11877
11659
  "args": {},
11878
- "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",
11660
+ "description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
11879
11661
  "examples": [
11880
- "$ sf hardis:project:fix:v53flexipages"
11662
+ "$ sf hardis:project:convert:profilestopermsets"
11881
11663
  ],
11882
11664
  "flags": {
11883
11665
  "json": {
@@ -11895,13 +11677,13 @@
11895
11677
  "multiple": false,
11896
11678
  "type": "option"
11897
11679
  },
11898
- "path": {
11899
- "char": "p",
11900
- "description": "Root folder",
11901
- "name": "path",
11902
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11680
+ "except": {
11681
+ "char": "e",
11682
+ "description": "List of filters",
11683
+ "name": "except",
11684
+ "default": [],
11903
11685
  "hasDynamicHelp": false,
11904
- "multiple": false,
11686
+ "multiple": true,
11905
11687
  "type": "option"
11906
11688
  },
11907
11689
  "debug": {
@@ -11927,49 +11709,52 @@
11927
11709
  },
11928
11710
  "hasDynamicHelp": false,
11929
11711
  "hiddenAliases": [],
11930
- "id": "hardis:project:fix:v53flexipages",
11712
+ "id": "hardis:project:convert:profilestopermsets",
11931
11713
  "pluginAlias": "sfdx-hardis",
11932
11714
  "pluginName": "sfdx-hardis",
11933
11715
  "pluginType": "core",
11934
11716
  "strict": true,
11935
- "enableJsonFlag": true,
11936
- "title": "Fix flexipages for v53",
11937
- "requiresProject": true,
11938
- "isESM": true,
11939
- "relativePath": [
11940
- "lib",
11941
- "commands",
11942
- "hardis",
11943
- "project",
11944
- "fix",
11945
- "v53flexipages.js"
11946
- ],
11947
- "aliasPermutations": [],
11948
- "permutations": [
11949
- "hardis:project:fix:v53flexipages",
11950
- "project:hardis:fix:v53flexipages",
11951
- "project:fix:hardis:v53flexipages",
11952
- "project:fix:v53flexipages:hardis",
11953
- "hardis:fix:project:v53flexipages",
11954
- "fix:hardis:project:v53flexipages",
11955
- "fix:project:hardis:v53flexipages",
11956
- "fix:project:v53flexipages:hardis",
11957
- "hardis:fix:v53flexipages:project",
11958
- "fix:hardis:v53flexipages:project",
11959
- "fix:v53flexipages:hardis:project",
11960
- "fix:v53flexipages:project:hardis",
11961
- "hardis:project:v53flexipages:fix",
11962
- "project:hardis:v53flexipages:fix",
11963
- "project:v53flexipages:hardis:fix",
11964
- "project:v53flexipages:fix:hardis",
11965
- "hardis:v53flexipages:project:fix",
11966
- "v53flexipages:hardis:project:fix",
11967
- "v53flexipages:project:hardis:fix",
11968
- "v53flexipages:project:fix:hardis",
11969
- "hardis:v53flexipages:fix:project",
11970
- "v53flexipages:hardis:fix:project",
11971
- "v53flexipages:fix:hardis:project",
11972
- "v53flexipages:fix:project:hardis"
11717
+ "enableJsonFlag": true,
11718
+ "title": "Convert Profiles into Permission Sets",
11719
+ "requiresProject": true,
11720
+ "requiresSfdxPlugins": [
11721
+ "shane-sfdx-plugins"
11722
+ ],
11723
+ "isESM": true,
11724
+ "relativePath": [
11725
+ "lib",
11726
+ "commands",
11727
+ "hardis",
11728
+ "project",
11729
+ "convert",
11730
+ "profilestopermsets.js"
11731
+ ],
11732
+ "aliasPermutations": [],
11733
+ "permutations": [
11734
+ "hardis:project:convert:profilestopermsets",
11735
+ "project:hardis:convert:profilestopermsets",
11736
+ "project:convert:hardis:profilestopermsets",
11737
+ "project:convert:profilestopermsets:hardis",
11738
+ "hardis:convert:project:profilestopermsets",
11739
+ "convert:hardis:project:profilestopermsets",
11740
+ "convert:project:hardis:profilestopermsets",
11741
+ "convert:project:profilestopermsets:hardis",
11742
+ "hardis:convert:profilestopermsets:project",
11743
+ "convert:hardis:profilestopermsets:project",
11744
+ "convert:profilestopermsets:hardis:project",
11745
+ "convert:profilestopermsets:project:hardis",
11746
+ "hardis:project:profilestopermsets:convert",
11747
+ "project:hardis:profilestopermsets:convert",
11748
+ "project:profilestopermsets:hardis:convert",
11749
+ "project:profilestopermsets:convert:hardis",
11750
+ "hardis:profilestopermsets:project:convert",
11751
+ "profilestopermsets:hardis:project:convert",
11752
+ "profilestopermsets:project:hardis:convert",
11753
+ "profilestopermsets:project:convert:hardis",
11754
+ "hardis:profilestopermsets:convert:project",
11755
+ "profilestopermsets:hardis:convert:project",
11756
+ "profilestopermsets:convert:hardis:project",
11757
+ "profilestopermsets:convert:project:hardis"
11973
11758
  ]
11974
11759
  },
11975
11760
  "hardis:project:deploy:notify": {
@@ -13146,6 +12931,221 @@
13146
12931
  "validate:deploy:project:hardis"
13147
12932
  ]
13148
12933
  },
12934
+ "hardis:project:fix:profiletabs": {
12935
+ "aliases": [],
12936
+ "args": {},
12937
+ "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",
12938
+ "examples": [
12939
+ "$ sf hardis:project:fix:profiletabs"
12940
+ ],
12941
+ "flags": {
12942
+ "json": {
12943
+ "description": "Format output as json.",
12944
+ "helpGroup": "GLOBAL",
12945
+ "name": "json",
12946
+ "allowNo": false,
12947
+ "type": "boolean"
12948
+ },
12949
+ "flags-dir": {
12950
+ "helpGroup": "GLOBAL",
12951
+ "name": "flags-dir",
12952
+ "summary": "Import flag values from a directory.",
12953
+ "hasDynamicHelp": false,
12954
+ "multiple": false,
12955
+ "type": "option"
12956
+ },
12957
+ "path": {
12958
+ "char": "p",
12959
+ "description": "Root folder",
12960
+ "name": "path",
12961
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12962
+ "hasDynamicHelp": false,
12963
+ "multiple": false,
12964
+ "type": "option"
12965
+ },
12966
+ "debug": {
12967
+ "char": "d",
12968
+ "description": "Activate debug mode (more logs)",
12969
+ "name": "debug",
12970
+ "allowNo": false,
12971
+ "type": "boolean"
12972
+ },
12973
+ "websocket": {
12974
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12975
+ "name": "websocket",
12976
+ "hasDynamicHelp": false,
12977
+ "multiple": false,
12978
+ "type": "option"
12979
+ },
12980
+ "skipauth": {
12981
+ "description": "Skip authentication check when a default username is required",
12982
+ "name": "skipauth",
12983
+ "allowNo": false,
12984
+ "type": "boolean"
12985
+ },
12986
+ "target-org": {
12987
+ "aliases": [
12988
+ "targetusername",
12989
+ "u"
12990
+ ],
12991
+ "char": "o",
12992
+ "deprecateAliases": true,
12993
+ "name": "target-org",
12994
+ "noCacheDefault": true,
12995
+ "required": true,
12996
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
12997
+ "hasDynamicHelp": true,
12998
+ "multiple": false,
12999
+ "type": "option"
13000
+ }
13001
+ },
13002
+ "hasDynamicHelp": true,
13003
+ "hiddenAliases": [],
13004
+ "id": "hardis:project:fix:profiletabs",
13005
+ "pluginAlias": "sfdx-hardis",
13006
+ "pluginName": "sfdx-hardis",
13007
+ "pluginType": "core",
13008
+ "strict": true,
13009
+ "enableJsonFlag": true,
13010
+ "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
13011
+ "requiresProject": true,
13012
+ "isESM": true,
13013
+ "relativePath": [
13014
+ "lib",
13015
+ "commands",
13016
+ "hardis",
13017
+ "project",
13018
+ "fix",
13019
+ "profiletabs.js"
13020
+ ],
13021
+ "aliasPermutations": [],
13022
+ "permutations": [
13023
+ "hardis:project:fix:profiletabs",
13024
+ "project:hardis:fix:profiletabs",
13025
+ "project:fix:hardis:profiletabs",
13026
+ "project:fix:profiletabs:hardis",
13027
+ "hardis:fix:project:profiletabs",
13028
+ "fix:hardis:project:profiletabs",
13029
+ "fix:project:hardis:profiletabs",
13030
+ "fix:project:profiletabs:hardis",
13031
+ "hardis:fix:profiletabs:project",
13032
+ "fix:hardis:profiletabs:project",
13033
+ "fix:profiletabs:hardis:project",
13034
+ "fix:profiletabs:project:hardis",
13035
+ "hardis:project:profiletabs:fix",
13036
+ "project:hardis:profiletabs:fix",
13037
+ "project:profiletabs:hardis:fix",
13038
+ "project:profiletabs:fix:hardis",
13039
+ "hardis:profiletabs:project:fix",
13040
+ "profiletabs:hardis:project:fix",
13041
+ "profiletabs:project:hardis:fix",
13042
+ "profiletabs:project:fix:hardis",
13043
+ "hardis:profiletabs:fix:project",
13044
+ "profiletabs:hardis:fix:project",
13045
+ "profiletabs:fix:hardis:project",
13046
+ "profiletabs:fix:project:hardis"
13047
+ ]
13048
+ },
13049
+ "hardis:project:fix:v53flexipages": {
13050
+ "aliases": [],
13051
+ "args": {},
13052
+ "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",
13053
+ "examples": [
13054
+ "$ sf hardis:project:fix:v53flexipages"
13055
+ ],
13056
+ "flags": {
13057
+ "json": {
13058
+ "description": "Format output as json.",
13059
+ "helpGroup": "GLOBAL",
13060
+ "name": "json",
13061
+ "allowNo": false,
13062
+ "type": "boolean"
13063
+ },
13064
+ "flags-dir": {
13065
+ "helpGroup": "GLOBAL",
13066
+ "name": "flags-dir",
13067
+ "summary": "Import flag values from a directory.",
13068
+ "hasDynamicHelp": false,
13069
+ "multiple": false,
13070
+ "type": "option"
13071
+ },
13072
+ "path": {
13073
+ "char": "p",
13074
+ "description": "Root folder",
13075
+ "name": "path",
13076
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
13077
+ "hasDynamicHelp": false,
13078
+ "multiple": false,
13079
+ "type": "option"
13080
+ },
13081
+ "debug": {
13082
+ "char": "d",
13083
+ "description": "Activate debug mode (more logs)",
13084
+ "name": "debug",
13085
+ "allowNo": false,
13086
+ "type": "boolean"
13087
+ },
13088
+ "websocket": {
13089
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
13090
+ "name": "websocket",
13091
+ "hasDynamicHelp": false,
13092
+ "multiple": false,
13093
+ "type": "option"
13094
+ },
13095
+ "skipauth": {
13096
+ "description": "Skip authentication check when a default username is required",
13097
+ "name": "skipauth",
13098
+ "allowNo": false,
13099
+ "type": "boolean"
13100
+ }
13101
+ },
13102
+ "hasDynamicHelp": false,
13103
+ "hiddenAliases": [],
13104
+ "id": "hardis:project:fix:v53flexipages",
13105
+ "pluginAlias": "sfdx-hardis",
13106
+ "pluginName": "sfdx-hardis",
13107
+ "pluginType": "core",
13108
+ "strict": true,
13109
+ "enableJsonFlag": true,
13110
+ "title": "Fix flexipages for v53",
13111
+ "requiresProject": true,
13112
+ "isESM": true,
13113
+ "relativePath": [
13114
+ "lib",
13115
+ "commands",
13116
+ "hardis",
13117
+ "project",
13118
+ "fix",
13119
+ "v53flexipages.js"
13120
+ ],
13121
+ "aliasPermutations": [],
13122
+ "permutations": [
13123
+ "hardis:project:fix:v53flexipages",
13124
+ "project:hardis:fix:v53flexipages",
13125
+ "project:fix:hardis:v53flexipages",
13126
+ "project:fix:v53flexipages:hardis",
13127
+ "hardis:fix:project:v53flexipages",
13128
+ "fix:hardis:project:v53flexipages",
13129
+ "fix:project:hardis:v53flexipages",
13130
+ "fix:project:v53flexipages:hardis",
13131
+ "hardis:fix:v53flexipages:project",
13132
+ "fix:hardis:v53flexipages:project",
13133
+ "fix:v53flexipages:hardis:project",
13134
+ "fix:v53flexipages:project:hardis",
13135
+ "hardis:project:v53flexipages:fix",
13136
+ "project:hardis:v53flexipages:fix",
13137
+ "project:v53flexipages:hardis:fix",
13138
+ "project:v53flexipages:fix:hardis",
13139
+ "hardis:v53flexipages:project:fix",
13140
+ "v53flexipages:hardis:project:fix",
13141
+ "v53flexipages:project:hardis:fix",
13142
+ "v53flexipages:project:fix:hardis",
13143
+ "hardis:v53flexipages:fix:project",
13144
+ "v53flexipages:hardis:fix:project",
13145
+ "v53flexipages:fix:hardis:project",
13146
+ "v53flexipages:fix:project:hardis"
13147
+ ]
13148
+ },
13149
13149
  "hardis:project:generate:bypass": {
13150
13150
  "aliases": [],
13151
13151
  "args": {},
@@ -15719,5 +15719,5 @@
15719
15719
  ]
15720
15720
  }
15721
15721
  },
15722
- "version": "6.14.1-beta202512011840.0"
15722
+ "version": "6.14.1"
15723
15723
  }