sfdx-hardis 6.0.5-beta202508132214.0 → 6.0.6-beta202508141313.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 CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  Note: Can be used with `sfdx plugins:install sfdx-hardis@beta` and docker image `hardisgroupcom/sfdx-hardis@beta`
6
6
 
7
+ ## [6.0.5 (beta)] 2025-08-14
8
+
9
+ - Add ENV SF_DATA_DIR to the ubuntu Dockerfile to install plugins "globally" and make the image work as non-root user
10
+
7
11
  ## [6.0.4 (beta)] 2025-08-14
8
12
 
9
13
  - Immediately stop when a user cancelled a multi-questions prompts
@@ -9274,6 +9274,238 @@
9274
9274
  "remotesites:audit:project:hardis"
9275
9275
  ]
9276
9276
  },
9277
+ "hardis:project:configure:auth": {
9278
+ "aliases": [],
9279
+ "args": {},
9280
+ "description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n## Technical explanations\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
9281
+ "examples": [
9282
+ "$ sf hardis:project:configure:auth"
9283
+ ],
9284
+ "flags": {
9285
+ "json": {
9286
+ "description": "Format output as json.",
9287
+ "helpGroup": "GLOBAL",
9288
+ "name": "json",
9289
+ "allowNo": false,
9290
+ "type": "boolean"
9291
+ },
9292
+ "flags-dir": {
9293
+ "helpGroup": "GLOBAL",
9294
+ "name": "flags-dir",
9295
+ "summary": "Import flag values from a directory.",
9296
+ "hasDynamicHelp": false,
9297
+ "multiple": false,
9298
+ "type": "option"
9299
+ },
9300
+ "devhub": {
9301
+ "char": "b",
9302
+ "description": "Configure project DevHub",
9303
+ "name": "devhub",
9304
+ "allowNo": false,
9305
+ "type": "boolean"
9306
+ },
9307
+ "debug": {
9308
+ "char": "d",
9309
+ "description": "Activate debug mode (more logs)",
9310
+ "name": "debug",
9311
+ "allowNo": false,
9312
+ "type": "boolean"
9313
+ },
9314
+ "websocket": {
9315
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
9316
+ "name": "websocket",
9317
+ "hasDynamicHelp": false,
9318
+ "multiple": false,
9319
+ "type": "option"
9320
+ },
9321
+ "skipauth": {
9322
+ "description": "Skip authentication check when a default username is required",
9323
+ "name": "skipauth",
9324
+ "allowNo": false,
9325
+ "type": "boolean"
9326
+ },
9327
+ "target-org": {
9328
+ "aliases": [
9329
+ "targetusername",
9330
+ "u"
9331
+ ],
9332
+ "char": "o",
9333
+ "deprecateAliases": true,
9334
+ "name": "target-org",
9335
+ "noCacheDefault": true,
9336
+ "summary": "Username or alias of the target org.",
9337
+ "hasDynamicHelp": true,
9338
+ "multiple": false,
9339
+ "type": "option"
9340
+ },
9341
+ "target-dev-hub": {
9342
+ "aliases": [
9343
+ "targetdevhubusername"
9344
+ ],
9345
+ "char": "v",
9346
+ "deprecateAliases": true,
9347
+ "name": "target-dev-hub",
9348
+ "noCacheDefault": true,
9349
+ "required": false,
9350
+ "summary": "Username or alias of the Dev Hub org.",
9351
+ "hasDynamicHelp": true,
9352
+ "multiple": false,
9353
+ "type": "option"
9354
+ }
9355
+ },
9356
+ "hasDynamicHelp": true,
9357
+ "hiddenAliases": [],
9358
+ "id": "hardis:project:configure:auth",
9359
+ "pluginAlias": "sfdx-hardis",
9360
+ "pluginName": "sfdx-hardis",
9361
+ "pluginType": "core",
9362
+ "strict": true,
9363
+ "enableJsonFlag": true,
9364
+ "title": "Configure authentication",
9365
+ "requiresProject": false,
9366
+ "requiresDependencies": [
9367
+ "openssl"
9368
+ ],
9369
+ "isESM": true,
9370
+ "relativePath": [
9371
+ "lib",
9372
+ "commands",
9373
+ "hardis",
9374
+ "project",
9375
+ "configure",
9376
+ "auth.js"
9377
+ ],
9378
+ "aliasPermutations": [],
9379
+ "permutations": [
9380
+ "hardis:project:configure:auth",
9381
+ "project:hardis:configure:auth",
9382
+ "project:configure:hardis:auth",
9383
+ "project:configure:auth:hardis",
9384
+ "hardis:configure:project:auth",
9385
+ "configure:hardis:project:auth",
9386
+ "configure:project:hardis:auth",
9387
+ "configure:project:auth:hardis",
9388
+ "hardis:configure:auth:project",
9389
+ "configure:hardis:auth:project",
9390
+ "configure:auth:hardis:project",
9391
+ "configure:auth:project:hardis",
9392
+ "hardis:project:auth:configure",
9393
+ "project:hardis:auth:configure",
9394
+ "project:auth:hardis:configure",
9395
+ "project:auth:configure:hardis",
9396
+ "hardis:auth:project:configure",
9397
+ "auth:hardis:project:configure",
9398
+ "auth:project:hardis:configure",
9399
+ "auth:project:configure:hardis",
9400
+ "hardis:auth:configure:project",
9401
+ "auth:hardis:configure:project",
9402
+ "auth:configure:hardis:project",
9403
+ "auth:configure:project:hardis"
9404
+ ]
9405
+ },
9406
+ "hardis:project:convert:profilestopermsets": {
9407
+ "aliases": [],
9408
+ "args": {},
9409
+ "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## Technical explanations\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",
9410
+ "examples": [
9411
+ "$ sf hardis:project:convert:profilestopermsets"
9412
+ ],
9413
+ "flags": {
9414
+ "json": {
9415
+ "description": "Format output as json.",
9416
+ "helpGroup": "GLOBAL",
9417
+ "name": "json",
9418
+ "allowNo": false,
9419
+ "type": "boolean"
9420
+ },
9421
+ "flags-dir": {
9422
+ "helpGroup": "GLOBAL",
9423
+ "name": "flags-dir",
9424
+ "summary": "Import flag values from a directory.",
9425
+ "hasDynamicHelp": false,
9426
+ "multiple": false,
9427
+ "type": "option"
9428
+ },
9429
+ "except": {
9430
+ "char": "e",
9431
+ "description": "List of filters",
9432
+ "name": "except",
9433
+ "default": [],
9434
+ "hasDynamicHelp": false,
9435
+ "multiple": true,
9436
+ "type": "option"
9437
+ },
9438
+ "debug": {
9439
+ "char": "d",
9440
+ "description": "Activate debug mode (more logs)",
9441
+ "name": "debug",
9442
+ "allowNo": false,
9443
+ "type": "boolean"
9444
+ },
9445
+ "websocket": {
9446
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
9447
+ "name": "websocket",
9448
+ "hasDynamicHelp": false,
9449
+ "multiple": false,
9450
+ "type": "option"
9451
+ },
9452
+ "skipauth": {
9453
+ "description": "Skip authentication check when a default username is required",
9454
+ "name": "skipauth",
9455
+ "allowNo": false,
9456
+ "type": "boolean"
9457
+ }
9458
+ },
9459
+ "hasDynamicHelp": false,
9460
+ "hiddenAliases": [],
9461
+ "id": "hardis:project:convert:profilestopermsets",
9462
+ "pluginAlias": "sfdx-hardis",
9463
+ "pluginName": "sfdx-hardis",
9464
+ "pluginType": "core",
9465
+ "strict": true,
9466
+ "enableJsonFlag": true,
9467
+ "title": "Convert Profiles into Permission Sets",
9468
+ "requiresProject": true,
9469
+ "requiresSfdxPlugins": [
9470
+ "shane-sfdx-plugins"
9471
+ ],
9472
+ "isESM": true,
9473
+ "relativePath": [
9474
+ "lib",
9475
+ "commands",
9476
+ "hardis",
9477
+ "project",
9478
+ "convert",
9479
+ "profilestopermsets.js"
9480
+ ],
9481
+ "aliasPermutations": [],
9482
+ "permutations": [
9483
+ "hardis:project:convert:profilestopermsets",
9484
+ "project:hardis:convert:profilestopermsets",
9485
+ "project:convert:hardis:profilestopermsets",
9486
+ "project:convert:profilestopermsets:hardis",
9487
+ "hardis:convert:project:profilestopermsets",
9488
+ "convert:hardis:project:profilestopermsets",
9489
+ "convert:project:hardis:profilestopermsets",
9490
+ "convert:project:profilestopermsets:hardis",
9491
+ "hardis:convert:profilestopermsets:project",
9492
+ "convert:hardis:profilestopermsets:project",
9493
+ "convert:profilestopermsets:hardis:project",
9494
+ "convert:profilestopermsets:project:hardis",
9495
+ "hardis:project:profilestopermsets:convert",
9496
+ "project:hardis:profilestopermsets:convert",
9497
+ "project:profilestopermsets:hardis:convert",
9498
+ "project:profilestopermsets:convert:hardis",
9499
+ "hardis:profilestopermsets:project:convert",
9500
+ "profilestopermsets:hardis:project:convert",
9501
+ "profilestopermsets:project:hardis:convert",
9502
+ "profilestopermsets:project:convert:hardis",
9503
+ "hardis:profilestopermsets:convert:project",
9504
+ "profilestopermsets:hardis:convert:project",
9505
+ "profilestopermsets:convert:hardis:project",
9506
+ "profilestopermsets:convert:project:hardis"
9507
+ ]
9508
+ },
9277
9509
  "hardis:project:clean:emptyitems": {
9278
9510
  "aliases": [],
9279
9511
  "args": {},
@@ -10759,12 +10991,14 @@
10759
10991
  "xml:clean:project:hardis"
10760
10992
  ]
10761
10993
  },
10762
- "hardis:project:convert:profilestopermsets": {
10994
+ "hardis:project:deploy:notify": {
10763
10995
  "aliases": [],
10764
10996
  "args": {},
10765
- "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## Technical explanations\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",
10997
+ "description": "Post notifications related to:\n\n- **Deployment simulation** _(use with --check-only)_\n\n- **Deployment process** _(to call only if your deployment is successful)_\n\n### Integrations\n\nAccording to the [integrations you configured](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integrations-home/), notifications can contain deployment information and [Flow Visual Git Diff](https://sfdx-hardis.cloudity.com/salesforce-deployment-assistant-home/#flow-visual-git-diff)\n\n - GitHub, Gitlab, Azure DevOps, Bitbucket comments on Pull Requests (including Flows Visual Git Diff)\n\n - Slack, Microsoft Teams, Email deployment summary after a successful deployment\n\n - JIRA tags and comments on tickets that just has been deployed\n\n![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-jira-gitlab.jpg)\n\n![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-jira-slack.jpg)\n\n### Flows Visual Git Diff\n\n- Visually show you the differences on a diagram\n\n- Display the update details without having to open any XML !\n\n🟩 = added\n\n🟥 = removed\n\n🟧 = updated\n\n![](https://sfdx-hardis.cloudity.com/assets/images/flow-visual-git-diff.jpg)\n\n![](https://sfdx-hardis.cloudity.com/assets/images/flow-visual-git-diff-2.jpg)\n\n### In custom CI/CD workflow\n\nExample of usage in a custom CI/CD pipeline:\n\n```bash\n# Disable exit-on-error temporarily\nset +e\n\n# Run the deploy command\nsf project deploy start [....]\nRET_CODE=$?\n\n# Re-enable exit-on-error\nset -e\n\n# Determine MYSTATUS based on return code\nif [ $RET_CODE -eq 0 ]; then\n MYSTATUS=\"valid\"\nelse\n MYSTATUS=\"invalid\"\nfi\n\n# Run the notify command with MYSTATUS\nsf hardis:project:deploy:notify --check-only --deploy-status \"$MYSTATUS\"\n```\n\n### Other usages\n\nThis command is for custom SF Cli pipelines, if you are a sfdx-hardis user, it is already embedded in sf hardis:deploy:smart.\n\nYou can also use [sfdx-hardis wrapper commands of SF deployment commands](https://sfdx-hardis.cloudity.com/salesforce-deployment-assistant-setup/#using-custom-cicd-pipeline)\n",
10766
10998
  "examples": [
10767
- "$ sf hardis:project:convert:profilestopermsets"
10999
+ "$ sf hardis:project:deploy:notify --check-only --deploy-status valid --message \"This deployment check is valid\\n\\nYahooo !!\"",
11000
+ "$ sf hardis:project:deploy:notify --check-only --deploy-status invalid --message \"This deployment check has failed !\\n\\Oh no !!\"",
11001
+ "$ sf hardis:project:deploy:notify --deploy-status valid --message \"This deployment has been processed !\\n\\nYahooo !!\""
10768
11002
  ],
10769
11003
  "flags": {
10770
11004
  "json": {
@@ -10782,461 +11016,12 @@
10782
11016
  "multiple": false,
10783
11017
  "type": "option"
10784
11018
  },
10785
- "except": {
10786
- "char": "e",
10787
- "description": "List of filters",
10788
- "name": "except",
10789
- "default": [],
10790
- "hasDynamicHelp": false,
10791
- "multiple": true,
10792
- "type": "option"
10793
- },
10794
- "debug": {
10795
- "char": "d",
10796
- "description": "Activate debug mode (more logs)",
10797
- "name": "debug",
10798
- "allowNo": false,
10799
- "type": "boolean"
10800
- },
10801
- "websocket": {
10802
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
10803
- "name": "websocket",
10804
- "hasDynamicHelp": false,
10805
- "multiple": false,
10806
- "type": "option"
10807
- },
10808
- "skipauth": {
10809
- "description": "Skip authentication check when a default username is required",
10810
- "name": "skipauth",
10811
- "allowNo": false,
10812
- "type": "boolean"
10813
- }
10814
- },
10815
- "hasDynamicHelp": false,
10816
- "hiddenAliases": [],
10817
- "id": "hardis:project:convert:profilestopermsets",
10818
- "pluginAlias": "sfdx-hardis",
10819
- "pluginName": "sfdx-hardis",
10820
- "pluginType": "core",
10821
- "strict": true,
10822
- "enableJsonFlag": true,
10823
- "title": "Convert Profiles into Permission Sets",
10824
- "requiresProject": true,
10825
- "requiresSfdxPlugins": [
10826
- "shane-sfdx-plugins"
10827
- ],
10828
- "isESM": true,
10829
- "relativePath": [
10830
- "lib",
10831
- "commands",
10832
- "hardis",
10833
- "project",
10834
- "convert",
10835
- "profilestopermsets.js"
10836
- ],
10837
- "aliasPermutations": [],
10838
- "permutations": [
10839
- "hardis:project:convert:profilestopermsets",
10840
- "project:hardis:convert:profilestopermsets",
10841
- "project:convert:hardis:profilestopermsets",
10842
- "project:convert:profilestopermsets:hardis",
10843
- "hardis:convert:project:profilestopermsets",
10844
- "convert:hardis:project:profilestopermsets",
10845
- "convert:project:hardis:profilestopermsets",
10846
- "convert:project:profilestopermsets:hardis",
10847
- "hardis:convert:profilestopermsets:project",
10848
- "convert:hardis:profilestopermsets:project",
10849
- "convert:profilestopermsets:hardis:project",
10850
- "convert:profilestopermsets:project:hardis",
10851
- "hardis:project:profilestopermsets:convert",
10852
- "project:hardis:profilestopermsets:convert",
10853
- "project:profilestopermsets:hardis:convert",
10854
- "project:profilestopermsets:convert:hardis",
10855
- "hardis:profilestopermsets:project:convert",
10856
- "profilestopermsets:hardis:project:convert",
10857
- "profilestopermsets:project:hardis:convert",
10858
- "profilestopermsets:project:convert:hardis",
10859
- "hardis:profilestopermsets:convert:project",
10860
- "profilestopermsets:hardis:convert:project",
10861
- "profilestopermsets:convert:hardis:project",
10862
- "profilestopermsets:convert:project:hardis"
10863
- ]
10864
- },
10865
- "hardis:project:configure:auth": {
10866
- "aliases": [],
10867
- "args": {},
10868
- "description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n## Technical explanations\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
10869
- "examples": [
10870
- "$ sf hardis:project:configure:auth"
10871
- ],
10872
- "flags": {
10873
- "json": {
10874
- "description": "Format output as json.",
10875
- "helpGroup": "GLOBAL",
10876
- "name": "json",
10877
- "allowNo": false,
10878
- "type": "boolean"
10879
- },
10880
- "flags-dir": {
10881
- "helpGroup": "GLOBAL",
10882
- "name": "flags-dir",
10883
- "summary": "Import flag values from a directory.",
10884
- "hasDynamicHelp": false,
10885
- "multiple": false,
10886
- "type": "option"
10887
- },
10888
- "devhub": {
10889
- "char": "b",
10890
- "description": "Configure project DevHub",
10891
- "name": "devhub",
10892
- "allowNo": false,
10893
- "type": "boolean"
10894
- },
10895
- "debug": {
10896
- "char": "d",
10897
- "description": "Activate debug mode (more logs)",
10898
- "name": "debug",
10899
- "allowNo": false,
10900
- "type": "boolean"
10901
- },
10902
- "websocket": {
10903
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
10904
- "name": "websocket",
10905
- "hasDynamicHelp": false,
10906
- "multiple": false,
10907
- "type": "option"
10908
- },
10909
- "skipauth": {
10910
- "description": "Skip authentication check when a default username is required",
10911
- "name": "skipauth",
10912
- "allowNo": false,
10913
- "type": "boolean"
10914
- },
10915
- "target-org": {
10916
- "aliases": [
10917
- "targetusername",
10918
- "u"
10919
- ],
10920
- "char": "o",
10921
- "deprecateAliases": true,
10922
- "name": "target-org",
10923
- "noCacheDefault": true,
10924
- "summary": "Username or alias of the target org.",
10925
- "hasDynamicHelp": true,
10926
- "multiple": false,
10927
- "type": "option"
10928
- },
10929
- "target-dev-hub": {
10930
- "aliases": [
10931
- "targetdevhubusername"
10932
- ],
10933
- "char": "v",
10934
- "deprecateAliases": true,
10935
- "name": "target-dev-hub",
10936
- "noCacheDefault": true,
10937
- "required": false,
10938
- "summary": "Username or alias of the Dev Hub org.",
10939
- "hasDynamicHelp": true,
10940
- "multiple": false,
10941
- "type": "option"
10942
- }
10943
- },
10944
- "hasDynamicHelp": true,
10945
- "hiddenAliases": [],
10946
- "id": "hardis:project:configure:auth",
10947
- "pluginAlias": "sfdx-hardis",
10948
- "pluginName": "sfdx-hardis",
10949
- "pluginType": "core",
10950
- "strict": true,
10951
- "enableJsonFlag": true,
10952
- "title": "Configure authentication",
10953
- "requiresProject": false,
10954
- "requiresDependencies": [
10955
- "openssl"
10956
- ],
10957
- "isESM": true,
10958
- "relativePath": [
10959
- "lib",
10960
- "commands",
10961
- "hardis",
10962
- "project",
10963
- "configure",
10964
- "auth.js"
10965
- ],
10966
- "aliasPermutations": [],
10967
- "permutations": [
10968
- "hardis:project:configure:auth",
10969
- "project:hardis:configure:auth",
10970
- "project:configure:hardis:auth",
10971
- "project:configure:auth:hardis",
10972
- "hardis:configure:project:auth",
10973
- "configure:hardis:project:auth",
10974
- "configure:project:hardis:auth",
10975
- "configure:project:auth:hardis",
10976
- "hardis:configure:auth:project",
10977
- "configure:hardis:auth:project",
10978
- "configure:auth:hardis:project",
10979
- "configure:auth:project:hardis",
10980
- "hardis:project:auth:configure",
10981
- "project:hardis:auth:configure",
10982
- "project:auth:hardis:configure",
10983
- "project:auth:configure:hardis",
10984
- "hardis:auth:project:configure",
10985
- "auth:hardis:project:configure",
10986
- "auth:project:hardis:configure",
10987
- "auth:project:configure:hardis",
10988
- "hardis:auth:configure:project",
10989
- "auth:hardis:configure:project",
10990
- "auth:configure:hardis:project",
10991
- "auth:configure:project:hardis"
10992
- ]
10993
- },
10994
- "hardis:project:fix:profiletabs": {
10995
- "aliases": [],
10996
- "args": {},
10997
- "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## Technical explanations\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",
10998
- "examples": [
10999
- "$ sf hardis:project:fix:profiletabs"
11000
- ],
11001
- "flags": {
11002
- "json": {
11003
- "description": "Format output as json.",
11004
- "helpGroup": "GLOBAL",
11005
- "name": "json",
11006
- "allowNo": false,
11007
- "type": "boolean"
11008
- },
11009
- "flags-dir": {
11010
- "helpGroup": "GLOBAL",
11011
- "name": "flags-dir",
11012
- "summary": "Import flag values from a directory.",
11013
- "hasDynamicHelp": false,
11014
- "multiple": false,
11015
- "type": "option"
11016
- },
11017
- "path": {
11018
- "char": "p",
11019
- "description": "Root folder",
11020
- "name": "path",
11021
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11022
- "hasDynamicHelp": false,
11023
- "multiple": false,
11024
- "type": "option"
11025
- },
11026
- "debug": {
11027
- "char": "d",
11028
- "description": "Activate debug mode (more logs)",
11029
- "name": "debug",
11030
- "allowNo": false,
11031
- "type": "boolean"
11032
- },
11033
- "websocket": {
11034
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11035
- "name": "websocket",
11036
- "hasDynamicHelp": false,
11037
- "multiple": false,
11038
- "type": "option"
11039
- },
11040
- "skipauth": {
11041
- "description": "Skip authentication check when a default username is required",
11042
- "name": "skipauth",
11043
- "allowNo": false,
11044
- "type": "boolean"
11045
- },
11046
- "target-org": {
11047
- "aliases": [
11048
- "targetusername",
11049
- "u"
11050
- ],
11051
- "char": "o",
11052
- "deprecateAliases": true,
11053
- "name": "target-org",
11054
- "noCacheDefault": true,
11055
- "required": true,
11056
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
11057
- "hasDynamicHelp": true,
11058
- "multiple": false,
11059
- "type": "option"
11060
- }
11061
- },
11062
- "hasDynamicHelp": true,
11063
- "hiddenAliases": [],
11064
- "id": "hardis:project:fix:profiletabs",
11065
- "pluginAlias": "sfdx-hardis",
11066
- "pluginName": "sfdx-hardis",
11067
- "pluginType": "core",
11068
- "strict": true,
11069
- "enableJsonFlag": true,
11070
- "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
11071
- "requiresProject": true,
11072
- "isESM": true,
11073
- "relativePath": [
11074
- "lib",
11075
- "commands",
11076
- "hardis",
11077
- "project",
11078
- "fix",
11079
- "profiletabs.js"
11080
- ],
11081
- "aliasPermutations": [],
11082
- "permutations": [
11083
- "hardis:project:fix:profiletabs",
11084
- "project:hardis:fix:profiletabs",
11085
- "project:fix:hardis:profiletabs",
11086
- "project:fix:profiletabs:hardis",
11087
- "hardis:fix:project:profiletabs",
11088
- "fix:hardis:project:profiletabs",
11089
- "fix:project:hardis:profiletabs",
11090
- "fix:project:profiletabs:hardis",
11091
- "hardis:fix:profiletabs:project",
11092
- "fix:hardis:profiletabs:project",
11093
- "fix:profiletabs:hardis:project",
11094
- "fix:profiletabs:project:hardis",
11095
- "hardis:project:profiletabs:fix",
11096
- "project:hardis:profiletabs:fix",
11097
- "project:profiletabs:hardis:fix",
11098
- "project:profiletabs:fix:hardis",
11099
- "hardis:profiletabs:project:fix",
11100
- "profiletabs:hardis:project:fix",
11101
- "profiletabs:project:hardis:fix",
11102
- "profiletabs:project:fix:hardis",
11103
- "hardis:profiletabs:fix:project",
11104
- "profiletabs:hardis:fix:project",
11105
- "profiletabs:fix:hardis:project",
11106
- "profiletabs:fix:project:hardis"
11107
- ]
11108
- },
11109
- "hardis:project:fix:v53flexipages": {
11110
- "aliases": [],
11111
- "args": {},
11112
- "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## Technical explanations\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",
11113
- "examples": [
11114
- "$ sf hardis:project:fix:v53flexipages"
11115
- ],
11116
- "flags": {
11117
- "json": {
11118
- "description": "Format output as json.",
11119
- "helpGroup": "GLOBAL",
11120
- "name": "json",
11121
- "allowNo": false,
11122
- "type": "boolean"
11123
- },
11124
- "flags-dir": {
11125
- "helpGroup": "GLOBAL",
11126
- "name": "flags-dir",
11127
- "summary": "Import flag values from a directory.",
11128
- "hasDynamicHelp": false,
11129
- "multiple": false,
11130
- "type": "option"
11131
- },
11132
- "path": {
11133
- "char": "p",
11134
- "description": "Root folder",
11135
- "name": "path",
11136
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11137
- "hasDynamicHelp": false,
11138
- "multiple": false,
11139
- "type": "option"
11140
- },
11141
- "debug": {
11142
- "char": "d",
11143
- "description": "Activate debug mode (more logs)",
11144
- "name": "debug",
11145
- "allowNo": false,
11146
- "type": "boolean"
11147
- },
11148
- "websocket": {
11149
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11150
- "name": "websocket",
11151
- "hasDynamicHelp": false,
11152
- "multiple": false,
11153
- "type": "option"
11154
- },
11155
- "skipauth": {
11156
- "description": "Skip authentication check when a default username is required",
11157
- "name": "skipauth",
11158
- "allowNo": false,
11159
- "type": "boolean"
11160
- }
11161
- },
11162
- "hasDynamicHelp": false,
11163
- "hiddenAliases": [],
11164
- "id": "hardis:project:fix:v53flexipages",
11165
- "pluginAlias": "sfdx-hardis",
11166
- "pluginName": "sfdx-hardis",
11167
- "pluginType": "core",
11168
- "strict": true,
11169
- "enableJsonFlag": true,
11170
- "title": "Fix flexipages for v53",
11171
- "requiresProject": true,
11172
- "isESM": true,
11173
- "relativePath": [
11174
- "lib",
11175
- "commands",
11176
- "hardis",
11177
- "project",
11178
- "fix",
11179
- "v53flexipages.js"
11180
- ],
11181
- "aliasPermutations": [],
11182
- "permutations": [
11183
- "hardis:project:fix:v53flexipages",
11184
- "project:hardis:fix:v53flexipages",
11185
- "project:fix:hardis:v53flexipages",
11186
- "project:fix:v53flexipages:hardis",
11187
- "hardis:fix:project:v53flexipages",
11188
- "fix:hardis:project:v53flexipages",
11189
- "fix:project:hardis:v53flexipages",
11190
- "fix:project:v53flexipages:hardis",
11191
- "hardis:fix:v53flexipages:project",
11192
- "fix:hardis:v53flexipages:project",
11193
- "fix:v53flexipages:hardis:project",
11194
- "fix:v53flexipages:project:hardis",
11195
- "hardis:project:v53flexipages:fix",
11196
- "project:hardis:v53flexipages:fix",
11197
- "project:v53flexipages:hardis:fix",
11198
- "project:v53flexipages:fix:hardis",
11199
- "hardis:v53flexipages:project:fix",
11200
- "v53flexipages:hardis:project:fix",
11201
- "v53flexipages:project:hardis:fix",
11202
- "v53flexipages:project:fix:hardis",
11203
- "hardis:v53flexipages:fix:project",
11204
- "v53flexipages:hardis:fix:project",
11205
- "v53flexipages:fix:hardis:project",
11206
- "v53flexipages:fix:project:hardis"
11207
- ]
11208
- },
11209
- "hardis:project:deploy:notify": {
11210
- "aliases": [],
11211
- "args": {},
11212
- "description": "Post notifications related to:\n\n- **Deployment simulation** _(use with --check-only)_\n\n- **Deployment process** _(to call only if your deployment is successful)_\n\n### Integrations\n\nAccording to the [integrations you configured](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integrations-home/), notifications can contain deployment information and [Flow Visual Git Diff](https://sfdx-hardis.cloudity.com/salesforce-deployment-assistant-home/#flow-visual-git-diff)\n\n - GitHub, Gitlab, Azure DevOps, Bitbucket comments on Pull Requests (including Flows Visual Git Diff)\n\n - Slack, Microsoft Teams, Email deployment summary after a successful deployment\n\n - JIRA tags and comments on tickets that just has been deployed\n\n![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-jira-gitlab.jpg)\n\n![](https://sfdx-hardis.cloudity.com/assets/images/screenshot-jira-slack.jpg)\n\n### Flows Visual Git Diff\n\n- Visually show you the differences on a diagram\n\n- Display the update details without having to open any XML !\n\n🟩 = added\n\n🟥 = removed\n\n🟧 = updated\n\n![](https://sfdx-hardis.cloudity.com/assets/images/flow-visual-git-diff.jpg)\n\n![](https://sfdx-hardis.cloudity.com/assets/images/flow-visual-git-diff-2.jpg)\n\n### In custom CI/CD workflow\n\nExample of usage in a custom CI/CD pipeline:\n\n```bash\n# Disable exit-on-error temporarily\nset +e\n\n# Run the deploy command\nsf project deploy start [....]\nRET_CODE=$?\n\n# Re-enable exit-on-error\nset -e\n\n# Determine MYSTATUS based on return code\nif [ $RET_CODE -eq 0 ]; then\n MYSTATUS=\"valid\"\nelse\n MYSTATUS=\"invalid\"\nfi\n\n# Run the notify command with MYSTATUS\nsf hardis:project:deploy:notify --check-only --deploy-status \"$MYSTATUS\"\n```\n\n### Other usages\n\nThis command is for custom SF Cli pipelines, if you are a sfdx-hardis user, it is already embedded in sf hardis:deploy:smart.\n\nYou can also use [sfdx-hardis wrapper commands of SF deployment commands](https://sfdx-hardis.cloudity.com/salesforce-deployment-assistant-setup/#using-custom-cicd-pipeline)\n",
11213
- "examples": [
11214
- "$ sf hardis:project:deploy:notify --check-only --deploy-status valid --message \"This deployment check is valid\\n\\nYahooo !!\"",
11215
- "$ sf hardis:project:deploy:notify --check-only --deploy-status invalid --message \"This deployment check has failed !\\n\\Oh no !!\"",
11216
- "$ sf hardis:project:deploy:notify --deploy-status valid --message \"This deployment has been processed !\\n\\nYahooo !!\""
11217
- ],
11218
- "flags": {
11219
- "json": {
11220
- "description": "Format output as json.",
11221
- "helpGroup": "GLOBAL",
11222
- "name": "json",
11223
- "allowNo": false,
11224
- "type": "boolean"
11225
- },
11226
- "flags-dir": {
11227
- "helpGroup": "GLOBAL",
11228
- "name": "flags-dir",
11229
- "summary": "Import flag values from a directory.",
11230
- "hasDynamicHelp": false,
11231
- "multiple": false,
11232
- "type": "option"
11233
- },
11234
- "check-only": {
11235
- "char": "c",
11236
- "description": "Use this option to send notifications from a Deployment simulation job",
11237
- "name": "check-only",
11238
- "allowNo": false,
11239
- "type": "boolean"
11019
+ "check-only": {
11020
+ "char": "c",
11021
+ "description": "Use this option to send notifications from a Deployment simulation job",
11022
+ "name": "check-only",
11023
+ "allowNo": false,
11024
+ "type": "boolean"
11240
11025
  },
11241
11026
  "deploy-status": {
11242
11027
  "char": "s",
@@ -12381,6 +12166,221 @@
12381
12166
  "validate:deploy:project:hardis"
12382
12167
  ]
12383
12168
  },
12169
+ "hardis:project:fix:profiletabs": {
12170
+ "aliases": [],
12171
+ "args": {},
12172
+ "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## Technical explanations\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",
12173
+ "examples": [
12174
+ "$ sf hardis:project:fix:profiletabs"
12175
+ ],
12176
+ "flags": {
12177
+ "json": {
12178
+ "description": "Format output as json.",
12179
+ "helpGroup": "GLOBAL",
12180
+ "name": "json",
12181
+ "allowNo": false,
12182
+ "type": "boolean"
12183
+ },
12184
+ "flags-dir": {
12185
+ "helpGroup": "GLOBAL",
12186
+ "name": "flags-dir",
12187
+ "summary": "Import flag values from a directory.",
12188
+ "hasDynamicHelp": false,
12189
+ "multiple": false,
12190
+ "type": "option"
12191
+ },
12192
+ "path": {
12193
+ "char": "p",
12194
+ "description": "Root folder",
12195
+ "name": "path",
12196
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12197
+ "hasDynamicHelp": false,
12198
+ "multiple": false,
12199
+ "type": "option"
12200
+ },
12201
+ "debug": {
12202
+ "char": "d",
12203
+ "description": "Activate debug mode (more logs)",
12204
+ "name": "debug",
12205
+ "allowNo": false,
12206
+ "type": "boolean"
12207
+ },
12208
+ "websocket": {
12209
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12210
+ "name": "websocket",
12211
+ "hasDynamicHelp": false,
12212
+ "multiple": false,
12213
+ "type": "option"
12214
+ },
12215
+ "skipauth": {
12216
+ "description": "Skip authentication check when a default username is required",
12217
+ "name": "skipauth",
12218
+ "allowNo": false,
12219
+ "type": "boolean"
12220
+ },
12221
+ "target-org": {
12222
+ "aliases": [
12223
+ "targetusername",
12224
+ "u"
12225
+ ],
12226
+ "char": "o",
12227
+ "deprecateAliases": true,
12228
+ "name": "target-org",
12229
+ "noCacheDefault": true,
12230
+ "required": true,
12231
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
12232
+ "hasDynamicHelp": true,
12233
+ "multiple": false,
12234
+ "type": "option"
12235
+ }
12236
+ },
12237
+ "hasDynamicHelp": true,
12238
+ "hiddenAliases": [],
12239
+ "id": "hardis:project:fix:profiletabs",
12240
+ "pluginAlias": "sfdx-hardis",
12241
+ "pluginName": "sfdx-hardis",
12242
+ "pluginType": "core",
12243
+ "strict": true,
12244
+ "enableJsonFlag": true,
12245
+ "title": "Fix profiles to add tabs that are not retrieved by SF CLI",
12246
+ "requiresProject": true,
12247
+ "isESM": true,
12248
+ "relativePath": [
12249
+ "lib",
12250
+ "commands",
12251
+ "hardis",
12252
+ "project",
12253
+ "fix",
12254
+ "profiletabs.js"
12255
+ ],
12256
+ "aliasPermutations": [],
12257
+ "permutations": [
12258
+ "hardis:project:fix:profiletabs",
12259
+ "project:hardis:fix:profiletabs",
12260
+ "project:fix:hardis:profiletabs",
12261
+ "project:fix:profiletabs:hardis",
12262
+ "hardis:fix:project:profiletabs",
12263
+ "fix:hardis:project:profiletabs",
12264
+ "fix:project:hardis:profiletabs",
12265
+ "fix:project:profiletabs:hardis",
12266
+ "hardis:fix:profiletabs:project",
12267
+ "fix:hardis:profiletabs:project",
12268
+ "fix:profiletabs:hardis:project",
12269
+ "fix:profiletabs:project:hardis",
12270
+ "hardis:project:profiletabs:fix",
12271
+ "project:hardis:profiletabs:fix",
12272
+ "project:profiletabs:hardis:fix",
12273
+ "project:profiletabs:fix:hardis",
12274
+ "hardis:profiletabs:project:fix",
12275
+ "profiletabs:hardis:project:fix",
12276
+ "profiletabs:project:hardis:fix",
12277
+ "profiletabs:project:fix:hardis",
12278
+ "hardis:profiletabs:fix:project",
12279
+ "profiletabs:hardis:fix:project",
12280
+ "profiletabs:fix:hardis:project",
12281
+ "profiletabs:fix:project:hardis"
12282
+ ]
12283
+ },
12284
+ "hardis:project:fix:v53flexipages": {
12285
+ "aliases": [],
12286
+ "args": {},
12287
+ "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## Technical explanations\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",
12288
+ "examples": [
12289
+ "$ sf hardis:project:fix:v53flexipages"
12290
+ ],
12291
+ "flags": {
12292
+ "json": {
12293
+ "description": "Format output as json.",
12294
+ "helpGroup": "GLOBAL",
12295
+ "name": "json",
12296
+ "allowNo": false,
12297
+ "type": "boolean"
12298
+ },
12299
+ "flags-dir": {
12300
+ "helpGroup": "GLOBAL",
12301
+ "name": "flags-dir",
12302
+ "summary": "Import flag values from a directory.",
12303
+ "hasDynamicHelp": false,
12304
+ "multiple": false,
12305
+ "type": "option"
12306
+ },
12307
+ "path": {
12308
+ "char": "p",
12309
+ "description": "Root folder",
12310
+ "name": "path",
12311
+ "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
12312
+ "hasDynamicHelp": false,
12313
+ "multiple": false,
12314
+ "type": "option"
12315
+ },
12316
+ "debug": {
12317
+ "char": "d",
12318
+ "description": "Activate debug mode (more logs)",
12319
+ "name": "debug",
12320
+ "allowNo": false,
12321
+ "type": "boolean"
12322
+ },
12323
+ "websocket": {
12324
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
12325
+ "name": "websocket",
12326
+ "hasDynamicHelp": false,
12327
+ "multiple": false,
12328
+ "type": "option"
12329
+ },
12330
+ "skipauth": {
12331
+ "description": "Skip authentication check when a default username is required",
12332
+ "name": "skipauth",
12333
+ "allowNo": false,
12334
+ "type": "boolean"
12335
+ }
12336
+ },
12337
+ "hasDynamicHelp": false,
12338
+ "hiddenAliases": [],
12339
+ "id": "hardis:project:fix:v53flexipages",
12340
+ "pluginAlias": "sfdx-hardis",
12341
+ "pluginName": "sfdx-hardis",
12342
+ "pluginType": "core",
12343
+ "strict": true,
12344
+ "enableJsonFlag": true,
12345
+ "title": "Fix flexipages for v53",
12346
+ "requiresProject": true,
12347
+ "isESM": true,
12348
+ "relativePath": [
12349
+ "lib",
12350
+ "commands",
12351
+ "hardis",
12352
+ "project",
12353
+ "fix",
12354
+ "v53flexipages.js"
12355
+ ],
12356
+ "aliasPermutations": [],
12357
+ "permutations": [
12358
+ "hardis:project:fix:v53flexipages",
12359
+ "project:hardis:fix:v53flexipages",
12360
+ "project:fix:hardis:v53flexipages",
12361
+ "project:fix:v53flexipages:hardis",
12362
+ "hardis:fix:project:v53flexipages",
12363
+ "fix:hardis:project:v53flexipages",
12364
+ "fix:project:hardis:v53flexipages",
12365
+ "fix:project:v53flexipages:hardis",
12366
+ "hardis:fix:v53flexipages:project",
12367
+ "fix:hardis:v53flexipages:project",
12368
+ "fix:v53flexipages:hardis:project",
12369
+ "fix:v53flexipages:project:hardis",
12370
+ "hardis:project:v53flexipages:fix",
12371
+ "project:hardis:v53flexipages:fix",
12372
+ "project:v53flexipages:hardis:fix",
12373
+ "project:v53flexipages:fix:hardis",
12374
+ "hardis:v53flexipages:project:fix",
12375
+ "v53flexipages:hardis:project:fix",
12376
+ "v53flexipages:project:hardis:fix",
12377
+ "v53flexipages:project:fix:hardis",
12378
+ "hardis:v53flexipages:fix:project",
12379
+ "v53flexipages:hardis:fix:project",
12380
+ "v53flexipages:fix:hardis:project",
12381
+ "v53flexipages:fix:project:hardis"
12382
+ ]
12383
+ },
12384
12384
  "hardis:project:generate:bypass": {
12385
12385
  "aliases": [],
12386
12386
  "args": {},
@@ -14863,5 +14863,5 @@
14863
14863
  ]
14864
14864
  }
14865
14865
  },
14866
- "version": "6.0.5-beta202508132214.0"
14866
+ "version": "6.0.6-beta202508141313.0"
14867
14867
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Swiss-army-knife Toolbox for Salesforce.\n Allows you to define a complete CD/CD Pipeline.\n Orchestrate base commands and assist users with interactive wizards",
4
4
  "author": "NicolasVuillamy @nvuillam",
5
5
  "bugs": "https://github.com/hardisgroupcom/sfdx-hardis/issues",
6
- "version": "6.0.5-beta202508132214.0",
6
+ "version": "6.0.6-beta202508141313.0",
7
7
  "dependencies": {
8
8
  "@actions/github": "^6.0.1",
9
9
  "@cparra/apexdocs": "^3.14.0",