sfdx-hardis 6.16.1-alpha202512161824.0 → 6.16.1-beta202512161830.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.
Files changed (2) hide show
  1. package/oclif.manifest.json +483 -483
  2. package/package.json +5 -2
@@ -5923,6 +5923,128 @@
5923
5923
  "listviewmine:fix:org:hardis"
5924
5924
  ]
5925
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
+ },
5926
6048
  "hardis:org:diagnose:audittrail": {
5927
6049
  "aliases": [],
5928
6050
  "args": {},
@@ -7321,128 +7443,6 @@
7321
7443
  "unusedusers:diagnose:org:hardis"
7322
7444
  ]
7323
7445
  },
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
7446
  "hardis:org:monitor:all": {
7447
7447
  "aliases": [],
7448
7448
  "args": {},
@@ -8306,123 +8306,16 @@
8306
8306
  "profile:purge:org:hardis"
8307
8307
  ]
8308
8308
  },
8309
- "hardis:org:retrieve:packageconfig": {
8309
+ "hardis:org:refresh:after-refresh": {
8310
8310
  "aliases": [],
8311
8311
  "args": {},
8312
- "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",
8312
+ "description": "\n## Command Behavior\n\n**Restores all previously backed-up Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata to a Salesforce org after a sandbox refresh.**\n\nThis command is the second step in the sandbox refresh process. It scans the backup folder created before the refresh, allows interactive or flag-driven selection of items to restore, and automates cleanup and redeployment to the refreshed org while preserving credentials and configuration.\n\nKey functionalities:\n\n- **Choose a backup to restore:** Lets you pick the saved sandbox project that contains the artifacts to restore.\n- **Select which items to restore:** Finds Connected App XMLs, certificates, custom settings and other artifacts and lets you pick what to restore (or restore all).\n- **Safety checks and validation:** Confirms files exist and prompts before making changes to the target org.\n- **Prepare org for restore:** Optionally cleans up existing Connected Apps so saved apps can be re-deployed without conflict.\n- **Redeploy saved artifacts:** Restores Connected Apps (with saved secrets), certificates, SAML SSO configs, custom settings and other metadata.\n- **Handle SAML configs:** Cleans and updates SAML XML files and helps you choose certificates to wire into restored configs.\n- **Restore records:** Optionally runs data import from selected SFDMU workspaces to restore record data.\n- **Reporting & persistence:** Sends restore reports and can update project config to record what was restored.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run after a sandbox refresh to re-apply saved metadata, credentials and data.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Backup Folder Handling:** Reads the immediate subfolders of `scripts/sandbox-refresh/` and validates the chosen project contains the expected `manifest/` and `force-app` layout.\n- **Metadata & Deployment APIs:** Uses `sf project deploy start --manifest` for package-based deploys, `sf project deploy start --metadata-dir` for MDAPI artifacts (certificates), and utility functions for Connected App deployment that preserve consumer secrets.\n- **SAML Handling:** Queries active certificates via tooling API, updates SAML XML files, and deploys using `sf project deploy start -m SamlSsoConfig`.\n- **Records Handling:** Uses interactive selection of SFDMU workspaces and runs data import utilities to restore records.\n- **Error Handling & Summary:** Aggregates results, logs success/warnings/errors, and returns a structured result indicating which items were restored and any failures.\n\n</details>\n",
8313
8313
  "examples": [
8314
- "$ sf hardis:org:retrieve:packageconfig",
8315
- "sf hardis:org:retrieve:packageconfig -u myOrg"
8316
- ],
8317
- "flags": {
8318
- "json": {
8319
- "description": "Format output as json.",
8320
- "helpGroup": "GLOBAL",
8321
- "name": "json",
8322
- "allowNo": false,
8323
- "type": "boolean"
8324
- },
8325
- "flags-dir": {
8326
- "helpGroup": "GLOBAL",
8327
- "name": "flags-dir",
8328
- "summary": "Import flag values from a directory.",
8329
- "hasDynamicHelp": false,
8330
- "multiple": false,
8331
- "type": "option"
8332
- },
8333
- "debug": {
8334
- "char": "d",
8335
- "description": "Activate debug mode (more logs)",
8336
- "name": "debug",
8337
- "allowNo": false,
8338
- "type": "boolean"
8339
- },
8340
- "websocket": {
8341
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
8342
- "name": "websocket",
8343
- "hasDynamicHelp": false,
8344
- "multiple": false,
8345
- "type": "option"
8346
- },
8347
- "skipauth": {
8348
- "description": "Skip authentication check when a default username is required",
8349
- "name": "skipauth",
8350
- "allowNo": false,
8351
- "type": "boolean"
8352
- },
8353
- "target-org": {
8354
- "aliases": [
8355
- "targetusername",
8356
- "u"
8357
- ],
8358
- "char": "o",
8359
- "deprecateAliases": true,
8360
- "name": "target-org",
8361
- "noCacheDefault": true,
8362
- "required": true,
8363
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
8364
- "hasDynamicHelp": true,
8365
- "multiple": false,
8366
- "type": "option"
8367
- }
8368
- },
8369
- "hasDynamicHelp": true,
8370
- "hiddenAliases": [],
8371
- "id": "hardis:org:retrieve:packageconfig",
8372
- "pluginAlias": "sfdx-hardis",
8373
- "pluginName": "sfdx-hardis",
8374
- "pluginType": "core",
8375
- "strict": true,
8376
- "enableJsonFlag": true,
8377
- "title": "Retrieve package configuration from an org",
8378
- "requiresProject": false,
8379
- "isESM": true,
8380
- "relativePath": [
8381
- "lib",
8382
- "commands",
8383
- "hardis",
8384
- "org",
8385
- "retrieve",
8386
- "packageconfig.js"
8387
- ],
8388
- "aliasPermutations": [],
8389
- "permutations": [
8390
- "hardis:org:retrieve:packageconfig",
8391
- "org:hardis:retrieve:packageconfig",
8392
- "org:retrieve:hardis:packageconfig",
8393
- "org:retrieve:packageconfig:hardis",
8394
- "hardis:retrieve:org:packageconfig",
8395
- "retrieve:hardis:org:packageconfig",
8396
- "retrieve:org:hardis:packageconfig",
8397
- "retrieve:org:packageconfig:hardis",
8398
- "hardis:retrieve:packageconfig:org",
8399
- "retrieve:hardis:packageconfig:org",
8400
- "retrieve:packageconfig:hardis:org",
8401
- "retrieve:packageconfig:org:hardis",
8402
- "hardis:org:packageconfig:retrieve",
8403
- "org:hardis:packageconfig:retrieve",
8404
- "org:packageconfig:hardis:retrieve",
8405
- "org:packageconfig:retrieve:hardis",
8406
- "hardis:packageconfig:org:retrieve",
8407
- "packageconfig:hardis:org:retrieve",
8408
- "packageconfig:org:hardis:retrieve",
8409
- "packageconfig:org:retrieve:hardis",
8410
- "hardis:packageconfig:retrieve:org",
8411
- "packageconfig:hardis:retrieve:org",
8412
- "packageconfig:retrieve:hardis:org",
8413
- "packageconfig:retrieve:org:hardis"
8414
- ]
8415
- },
8416
- "hardis:org:refresh:after-refresh": {
8417
- "aliases": [],
8418
- "args": {},
8419
- "description": "\n## Command Behavior\n\n**Restores all previously backed-up Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata to a Salesforce org after a sandbox refresh.**\n\nThis command is the second step in the sandbox refresh process. It scans the backup folder created before the refresh, allows interactive or flag-driven selection of items to restore, and automates cleanup and redeployment to the refreshed org while preserving credentials and configuration.\n\nKey functionalities:\n\n- **Choose a backup to restore:** Lets you pick the saved sandbox project that contains the artifacts to restore.\n- **Select which items to restore:** Finds Connected App XMLs, certificates, custom settings and other artifacts and lets you pick what to restore (or restore all).\n- **Safety checks and validation:** Confirms files exist and prompts before making changes to the target org.\n- **Prepare org for restore:** Optionally cleans up existing Connected Apps so saved apps can be re-deployed without conflict.\n- **Redeploy saved artifacts:** Restores Connected Apps (with saved secrets), certificates, SAML SSO configs, custom settings and other metadata.\n- **Handle SAML configs:** Cleans and updates SAML XML files and helps you choose certificates to wire into restored configs.\n- **Restore records:** Optionally runs data import from selected SFDMU workspaces to restore record data.\n- **Reporting & persistence:** Sends restore reports and can update project config to record what was restored.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run after a sandbox refresh to re-apply saved metadata, credentials and data.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Backup Folder Handling:** Reads the immediate subfolders of `scripts/sandbox-refresh/` and validates the chosen project contains the expected `manifest/` and `force-app` layout.\n- **Metadata & Deployment APIs:** Uses `sf project deploy start --manifest` for package-based deploys, `sf project deploy start --metadata-dir` for MDAPI artifacts (certificates), and utility functions for Connected App deployment that preserve consumer secrets.\n- **SAML Handling:** Queries active certificates via tooling API, updates SAML XML files, and deploys using `sf project deploy start -m SamlSsoConfig`.\n- **Records Handling:** Uses interactive selection of SFDMU workspaces and runs data import utilities to restore records.\n- **Error Handling & Summary:** Aggregates results, logs success/warnings/errors, and returns a structured result indicating which items were restored and any failures.\n\n</details>\n",
8420
- "examples": [
8421
- "$ sf hardis:org:refresh:after-refresh",
8422
- "$ sf hardis:org:refresh:after-refresh --name \"MyConnectedApp\" // Process specific app, no selection prompt",
8423
- "$ sf hardis:org:refresh:after-refresh --name \"App1,App2,App3\" // Process multiple apps, no selection prompt",
8424
- "$ sf hardis:org:refresh:after-refresh --all // Process all apps, no selection prompt",
8425
- "$ sf hardis:org:refresh:after-refresh --target-org myDevOrg"
8314
+ "$ sf hardis:org:refresh:after-refresh",
8315
+ "$ sf hardis:org:refresh:after-refresh --name \"MyConnectedApp\" // Process specific app, no selection prompt",
8316
+ "$ sf hardis:org:refresh:after-refresh --name \"App1,App2,App3\" // Process multiple apps, no selection prompt",
8317
+ "$ sf hardis:org:refresh:after-refresh --all // Process all apps, no selection prompt",
8318
+ "$ sf hardis:org:refresh:after-refresh --target-org myDevOrg"
8426
8319
  ],
8427
8320
  "flags": {
8428
8321
  "json": {
@@ -8652,6 +8545,113 @@
8652
8545
  "before-refresh:refresh:org:hardis"
8653
8546
  ]
8654
8547
  },
8548
+ "hardis:org:retrieve:packageconfig": {
8549
+ "aliases": [],
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",
8552
+ "examples": [
8553
+ "$ sf hardis:org:retrieve:packageconfig",
8554
+ "sf hardis:org:retrieve:packageconfig -u myOrg"
8555
+ ],
8556
+ "flags": {
8557
+ "json": {
8558
+ "description": "Format output as json.",
8559
+ "helpGroup": "GLOBAL",
8560
+ "name": "json",
8561
+ "allowNo": false,
8562
+ "type": "boolean"
8563
+ },
8564
+ "flags-dir": {
8565
+ "helpGroup": "GLOBAL",
8566
+ "name": "flags-dir",
8567
+ "summary": "Import flag values from a directory.",
8568
+ "hasDynamicHelp": false,
8569
+ "multiple": false,
8570
+ "type": "option"
8571
+ },
8572
+ "debug": {
8573
+ "char": "d",
8574
+ "description": "Activate debug mode (more logs)",
8575
+ "name": "debug",
8576
+ "allowNo": false,
8577
+ "type": "boolean"
8578
+ },
8579
+ "websocket": {
8580
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
8581
+ "name": "websocket",
8582
+ "hasDynamicHelp": false,
8583
+ "multiple": false,
8584
+ "type": "option"
8585
+ },
8586
+ "skipauth": {
8587
+ "description": "Skip authentication check when a default username is required",
8588
+ "name": "skipauth",
8589
+ "allowNo": false,
8590
+ "type": "boolean"
8591
+ },
8592
+ "target-org": {
8593
+ "aliases": [
8594
+ "targetusername",
8595
+ "u"
8596
+ ],
8597
+ "char": "o",
8598
+ "deprecateAliases": true,
8599
+ "name": "target-org",
8600
+ "noCacheDefault": true,
8601
+ "required": true,
8602
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
8603
+ "hasDynamicHelp": true,
8604
+ "multiple": false,
8605
+ "type": "option"
8606
+ }
8607
+ },
8608
+ "hasDynamicHelp": true,
8609
+ "hiddenAliases": [],
8610
+ "id": "hardis:org:retrieve:packageconfig",
8611
+ "pluginAlias": "sfdx-hardis",
8612
+ "pluginName": "sfdx-hardis",
8613
+ "pluginType": "core",
8614
+ "strict": true,
8615
+ "enableJsonFlag": true,
8616
+ "title": "Retrieve package configuration from an org",
8617
+ "requiresProject": false,
8618
+ "isESM": true,
8619
+ "relativePath": [
8620
+ "lib",
8621
+ "commands",
8622
+ "hardis",
8623
+ "org",
8624
+ "retrieve",
8625
+ "packageconfig.js"
8626
+ ],
8627
+ "aliasPermutations": [],
8628
+ "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"
8653
+ ]
8654
+ },
8655
8655
  "hardis:org:test:apex": {
8656
8656
  "aliases": [],
8657
8657
  "args": {},
@@ -11757,12 +11757,14 @@
11757
11757
  "xml:clean:project:hardis"
11758
11758
  ]
11759
11759
  },
11760
- "hardis:project:fix:profiletabs": {
11760
+ "hardis:project:deploy:notify": {
11761
11761
  "aliases": [],
11762
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",
11763
+ "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",
11764
11764
  "examples": [
11765
- "$ sf hardis:project:fix:profiletabs"
11765
+ "$ sf hardis:project:deploy:notify --check-only --deploy-status valid --message \"This deployment check is valid\\n\\nYahooo !!\"",
11766
+ "$ sf hardis:project:deploy:notify --check-only --deploy-status invalid --message \"This deployment check has failed !\\n\\Oh no !!\"",
11767
+ "$ sf hardis:project:deploy:notify --deploy-status valid --message \"This deployment has been processed !\\n\\nYahooo !!\""
11766
11768
  ],
11767
11769
  "flags": {
11768
11770
  "json": {
@@ -11780,249 +11782,32 @@
11780
11782
  "multiple": false,
11781
11783
  "type": "option"
11782
11784
  },
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": {
11876
- "aliases": [],
11877
- "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",
11879
- "examples": [
11880
- "$ sf hardis:project:fix:v53flexipages"
11881
- ],
11882
- "flags": {
11883
- "json": {
11884
- "description": "Format output as json.",
11885
- "helpGroup": "GLOBAL",
11886
- "name": "json",
11887
- "allowNo": false,
11888
- "type": "boolean"
11889
- },
11890
- "flags-dir": {
11891
- "helpGroup": "GLOBAL",
11892
- "name": "flags-dir",
11893
- "summary": "Import flag values from a directory.",
11894
- "hasDynamicHelp": false,
11895
- "multiple": false,
11896
- "type": "option"
11897
- },
11898
- "path": {
11899
- "char": "p",
11900
- "description": "Root folder",
11901
- "name": "path",
11902
- "default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
11903
- "hasDynamicHelp": false,
11904
- "multiple": false,
11905
- "type": "option"
11906
- },
11907
- "debug": {
11908
- "char": "d",
11909
- "description": "Activate debug mode (more logs)",
11910
- "name": "debug",
11911
- "allowNo": false,
11912
- "type": "boolean"
11913
- },
11914
- "websocket": {
11915
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
11916
- "name": "websocket",
11917
- "hasDynamicHelp": false,
11918
- "multiple": false,
11919
- "type": "option"
11920
- },
11921
- "skipauth": {
11922
- "description": "Skip authentication check when a default username is required",
11923
- "name": "skipauth",
11924
- "allowNo": false,
11925
- "type": "boolean"
11926
- }
11927
- },
11928
- "hasDynamicHelp": false,
11929
- "hiddenAliases": [],
11930
- "id": "hardis:project:fix:v53flexipages",
11931
- "pluginAlias": "sfdx-hardis",
11932
- "pluginName": "sfdx-hardis",
11933
- "pluginType": "core",
11934
- "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"
11973
- ]
11974
- },
11975
- "hardis:project:deploy:notify": {
11976
- "aliases": [],
11977
- "args": {},
11978
- "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",
11979
- "examples": [
11980
- "$ sf hardis:project:deploy:notify --check-only --deploy-status valid --message \"This deployment check is valid\\n\\nYahooo !!\"",
11981
- "$ sf hardis:project:deploy:notify --check-only --deploy-status invalid --message \"This deployment check has failed !\\n\\Oh no !!\"",
11982
- "$ sf hardis:project:deploy:notify --deploy-status valid --message \"This deployment has been processed !\\n\\nYahooo !!\""
11983
- ],
11984
- "flags": {
11985
- "json": {
11986
- "description": "Format output as json.",
11987
- "helpGroup": "GLOBAL",
11988
- "name": "json",
11989
- "allowNo": false,
11990
- "type": "boolean"
11991
- },
11992
- "flags-dir": {
11993
- "helpGroup": "GLOBAL",
11994
- "name": "flags-dir",
11995
- "summary": "Import flag values from a directory.",
11996
- "hasDynamicHelp": false,
11997
- "multiple": false,
11998
- "type": "option"
11999
- },
12000
- "check-only": {
12001
- "char": "c",
12002
- "description": "Use this option to send notifications from a Deployment simulation job",
12003
- "name": "check-only",
12004
- "allowNo": false,
12005
- "type": "boolean"
12006
- },
12007
- "deploy-status": {
12008
- "char": "s",
12009
- "description": "Send success, failure or unknown (default) to indicate if the deployment or deployment simulation is in success or not",
12010
- "name": "deploy-status",
12011
- "default": "unknown",
12012
- "hasDynamicHelp": false,
12013
- "multiple": false,
12014
- "options": [
12015
- "valid",
12016
- "invalid",
12017
- "unknown"
12018
- ],
12019
- "type": "option"
12020
- },
12021
- "message": {
12022
- "char": "m",
12023
- "description": "Custom message that you want to be added in notifications (string or markdown format)",
12024
- "name": "message",
12025
- "default": "",
11785
+ "check-only": {
11786
+ "char": "c",
11787
+ "description": "Use this option to send notifications from a Deployment simulation job",
11788
+ "name": "check-only",
11789
+ "allowNo": false,
11790
+ "type": "boolean"
11791
+ },
11792
+ "deploy-status": {
11793
+ "char": "s",
11794
+ "description": "Send success, failure or unknown (default) to indicate if the deployment or deployment simulation is in success or not",
11795
+ "name": "deploy-status",
11796
+ "default": "unknown",
11797
+ "hasDynamicHelp": false,
11798
+ "multiple": false,
11799
+ "options": [
11800
+ "valid",
11801
+ "invalid",
11802
+ "unknown"
11803
+ ],
11804
+ "type": "option"
11805
+ },
11806
+ "message": {
11807
+ "char": "m",
11808
+ "description": "Custom message that you want to be added in notifications (string or markdown format)",
11809
+ "name": "message",
11810
+ "default": "",
12026
11811
  "hasDynamicHelp": false,
12027
11812
  "multiple": false,
12028
11813
  "type": "option"
@@ -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.16.1-alpha202512161824.0"
15722
+ "version": "6.16.1-beta202512161830.0"
15723
15723
  }
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.16.1-alpha202512161824.0",
6
+ "version": "6.16.1-beta202512161830.0",
7
7
  "dependencies": {
8
8
  "@actions/github": "^6.0.1",
9
9
  "@cparra/apexdocs": "^3.15.1",
@@ -188,7 +188,10 @@
188
188
  ]
189
189
  }
190
190
  },
191
- "repository": "https://github.com/hardisgroupcom/sfdx-hardis",
191
+ "repository": {
192
+ "type": "git",
193
+ "url": "git+https://github.com/hardisgroupcom/sfdx-hardis.git"
194
+ },
192
195
  "scripts": {
193
196
  "build": "wireit",
194
197
  "build:doc": "sf hardis:doc:plugin:generate",