sfdx-hardis 6.9.1-alpha202510261658.0 → 6.9.1-alpha202510262008.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 (28) hide show
  1. package/lib/common/actionsProvider/actionsProvider.d.ts +37 -0
  2. package/lib/common/actionsProvider/actionsProvider.js +56 -0
  3. package/lib/common/actionsProvider/actionsProvider.js.map +1 -0
  4. package/lib/common/actionsProvider/apexAction.d.ts +2 -3
  5. package/lib/common/actionsProvider/apexAction.js +2 -2
  6. package/lib/common/actionsProvider/apexAction.js.map +1 -1
  7. package/lib/common/actionsProvider/commandAction.d.ts +2 -3
  8. package/lib/common/actionsProvider/commandAction.js +2 -2
  9. package/lib/common/actionsProvider/commandAction.js.map +1 -1
  10. package/lib/common/actionsProvider/dataAction.d.ts +2 -3
  11. package/lib/common/actionsProvider/dataAction.js +2 -2
  12. package/lib/common/actionsProvider/dataAction.js.map +1 -1
  13. package/lib/common/actionsProvider/manualAction.d.ts +2 -3
  14. package/lib/common/actionsProvider/manualAction.js +2 -2
  15. package/lib/common/actionsProvider/manualAction.js.map +1 -1
  16. package/lib/common/actionsProvider/publishCommunityAction.d.ts +2 -3
  17. package/lib/common/actionsProvider/publishCommunityAction.js +2 -2
  18. package/lib/common/actionsProvider/publishCommunityAction.js.map +1 -1
  19. package/lib/common/utils/deployUtils.js +10 -3
  20. package/lib/common/utils/deployUtils.js.map +1 -1
  21. package/lib/common/utils/prePostCommandUtils.d.ts +0 -24
  22. package/lib/common/utils/prePostCommandUtils.js +31 -48
  23. package/lib/common/utils/prePostCommandUtils.js.map +1 -1
  24. package/oclif.manifest.json +478 -478
  25. package/package.json +1 -1
  26. package/lib/common/actionsProvider/actionsProviderRoot.d.ts +0 -17
  27. package/lib/common/actionsProvider/actionsProviderRoot.js +0 -24
  28. package/lib/common/actionsProvider/actionsProviderRoot.js.map +0 -1
@@ -5808,121 +5808,6 @@
5808
5808
  "import:files:org:hardis"
5809
5809
  ]
5810
5810
  },
5811
- "hardis:org:fix:listviewmine": {
5812
- "aliases": [],
5813
- "args": {},
5814
- "description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[![Invalid scope:Mine, not allowed ? Deploy your ListViews anyway !](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-invalid-scope-mine.jpg)](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
5815
- "examples": [
5816
- "$ sf hardis:org:fix:listviewmine",
5817
- "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
5818
- ],
5819
- "flags": {
5820
- "json": {
5821
- "description": "Format output as json.",
5822
- "helpGroup": "GLOBAL",
5823
- "name": "json",
5824
- "allowNo": false,
5825
- "type": "boolean"
5826
- },
5827
- "flags-dir": {
5828
- "helpGroup": "GLOBAL",
5829
- "name": "flags-dir",
5830
- "summary": "Import flag values from a directory.",
5831
- "hasDynamicHelp": false,
5832
- "multiple": false,
5833
- "type": "option"
5834
- },
5835
- "listviews": {
5836
- "char": "l",
5837
- "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
5838
- "name": "listviews",
5839
- "hasDynamicHelp": false,
5840
- "multiple": false,
5841
- "type": "option"
5842
- },
5843
- "debug": {
5844
- "char": "d",
5845
- "description": "Activate debug mode (more logs)",
5846
- "name": "debug",
5847
- "allowNo": false,
5848
- "type": "boolean"
5849
- },
5850
- "websocket": {
5851
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
5852
- "name": "websocket",
5853
- "hasDynamicHelp": false,
5854
- "multiple": false,
5855
- "type": "option"
5856
- },
5857
- "skipauth": {
5858
- "description": "Skip authentication check when a default username is required",
5859
- "name": "skipauth",
5860
- "allowNo": false,
5861
- "type": "boolean"
5862
- },
5863
- "target-org": {
5864
- "aliases": [
5865
- "targetusername",
5866
- "u"
5867
- ],
5868
- "char": "o",
5869
- "deprecateAliases": true,
5870
- "name": "target-org",
5871
- "noCacheDefault": true,
5872
- "required": true,
5873
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
5874
- "hasDynamicHelp": true,
5875
- "multiple": false,
5876
- "type": "option"
5877
- }
5878
- },
5879
- "hasDynamicHelp": true,
5880
- "hiddenAliases": [],
5881
- "id": "hardis:org:fix:listviewmine",
5882
- "pluginAlias": "sfdx-hardis",
5883
- "pluginName": "sfdx-hardis",
5884
- "pluginType": "core",
5885
- "strict": true,
5886
- "enableJsonFlag": true,
5887
- "title": "Fix listviews with ",
5888
- "requiresProject": true,
5889
- "isESM": true,
5890
- "relativePath": [
5891
- "lib",
5892
- "commands",
5893
- "hardis",
5894
- "org",
5895
- "fix",
5896
- "listviewmine.js"
5897
- ],
5898
- "aliasPermutations": [],
5899
- "permutations": [
5900
- "hardis:org:fix:listviewmine",
5901
- "org:hardis:fix:listviewmine",
5902
- "org:fix:hardis:listviewmine",
5903
- "org:fix:listviewmine:hardis",
5904
- "hardis:fix:org:listviewmine",
5905
- "fix:hardis:org:listviewmine",
5906
- "fix:org:hardis:listviewmine",
5907
- "fix:org:listviewmine:hardis",
5908
- "hardis:fix:listviewmine:org",
5909
- "fix:hardis:listviewmine:org",
5910
- "fix:listviewmine:hardis:org",
5911
- "fix:listviewmine:org:hardis",
5912
- "hardis:org:listviewmine:fix",
5913
- "org:hardis:listviewmine:fix",
5914
- "org:listviewmine:hardis:fix",
5915
- "org:listviewmine:fix:hardis",
5916
- "hardis:listviewmine:org:fix",
5917
- "listviewmine:hardis:org:fix",
5918
- "listviewmine:org:hardis:fix",
5919
- "listviewmine:org:fix:hardis",
5920
- "hardis:listviewmine:fix:org",
5921
- "listviewmine:hardis:fix:org",
5922
- "listviewmine:fix:hardis:org",
5923
- "listviewmine:fix:org:hardis"
5924
- ]
5925
- },
5926
5811
  "hardis:org:diagnose:audittrail": {
5927
5812
  "aliases": [],
5928
5813
  "args": {},
@@ -7186,6 +7071,121 @@
7186
7071
  "unusedusers:diagnose:org:hardis"
7187
7072
  ]
7188
7073
  },
7074
+ "hardis:org:fix:listviewmine": {
7075
+ "aliases": [],
7076
+ "args": {},
7077
+ "description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[![Invalid scope:Mine, not allowed ? Deploy your ListViews anyway !](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-invalid-scope-mine.jpg)](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
7078
+ "examples": [
7079
+ "$ sf hardis:org:fix:listviewmine",
7080
+ "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
7081
+ ],
7082
+ "flags": {
7083
+ "json": {
7084
+ "description": "Format output as json.",
7085
+ "helpGroup": "GLOBAL",
7086
+ "name": "json",
7087
+ "allowNo": false,
7088
+ "type": "boolean"
7089
+ },
7090
+ "flags-dir": {
7091
+ "helpGroup": "GLOBAL",
7092
+ "name": "flags-dir",
7093
+ "summary": "Import flag values from a directory.",
7094
+ "hasDynamicHelp": false,
7095
+ "multiple": false,
7096
+ "type": "option"
7097
+ },
7098
+ "listviews": {
7099
+ "char": "l",
7100
+ "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
7101
+ "name": "listviews",
7102
+ "hasDynamicHelp": false,
7103
+ "multiple": false,
7104
+ "type": "option"
7105
+ },
7106
+ "debug": {
7107
+ "char": "d",
7108
+ "description": "Activate debug mode (more logs)",
7109
+ "name": "debug",
7110
+ "allowNo": false,
7111
+ "type": "boolean"
7112
+ },
7113
+ "websocket": {
7114
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
7115
+ "name": "websocket",
7116
+ "hasDynamicHelp": false,
7117
+ "multiple": false,
7118
+ "type": "option"
7119
+ },
7120
+ "skipauth": {
7121
+ "description": "Skip authentication check when a default username is required",
7122
+ "name": "skipauth",
7123
+ "allowNo": false,
7124
+ "type": "boolean"
7125
+ },
7126
+ "target-org": {
7127
+ "aliases": [
7128
+ "targetusername",
7129
+ "u"
7130
+ ],
7131
+ "char": "o",
7132
+ "deprecateAliases": true,
7133
+ "name": "target-org",
7134
+ "noCacheDefault": true,
7135
+ "required": true,
7136
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
7137
+ "hasDynamicHelp": true,
7138
+ "multiple": false,
7139
+ "type": "option"
7140
+ }
7141
+ },
7142
+ "hasDynamicHelp": true,
7143
+ "hiddenAliases": [],
7144
+ "id": "hardis:org:fix:listviewmine",
7145
+ "pluginAlias": "sfdx-hardis",
7146
+ "pluginName": "sfdx-hardis",
7147
+ "pluginType": "core",
7148
+ "strict": true,
7149
+ "enableJsonFlag": true,
7150
+ "title": "Fix listviews with ",
7151
+ "requiresProject": true,
7152
+ "isESM": true,
7153
+ "relativePath": [
7154
+ "lib",
7155
+ "commands",
7156
+ "hardis",
7157
+ "org",
7158
+ "fix",
7159
+ "listviewmine.js"
7160
+ ],
7161
+ "aliasPermutations": [],
7162
+ "permutations": [
7163
+ "hardis:org:fix:listviewmine",
7164
+ "org:hardis:fix:listviewmine",
7165
+ "org:fix:hardis:listviewmine",
7166
+ "org:fix:listviewmine:hardis",
7167
+ "hardis:fix:org:listviewmine",
7168
+ "fix:hardis:org:listviewmine",
7169
+ "fix:org:hardis:listviewmine",
7170
+ "fix:org:listviewmine:hardis",
7171
+ "hardis:fix:listviewmine:org",
7172
+ "fix:hardis:listviewmine:org",
7173
+ "fix:listviewmine:hardis:org",
7174
+ "fix:listviewmine:org:hardis",
7175
+ "hardis:org:listviewmine:fix",
7176
+ "org:hardis:listviewmine:fix",
7177
+ "org:listviewmine:hardis:fix",
7178
+ "org:listviewmine:fix:hardis",
7179
+ "hardis:listviewmine:org:fix",
7180
+ "listviewmine:hardis:org:fix",
7181
+ "listviewmine:org:hardis:fix",
7182
+ "listviewmine:org:fix:hardis",
7183
+ "hardis:listviewmine:fix:org",
7184
+ "listviewmine:hardis:fix:org",
7185
+ "listviewmine:fix:hardis:org",
7186
+ "listviewmine:fix:org:hardis"
7187
+ ]
7188
+ },
7189
7189
  "hardis:org:generate:packagexmlfull": {
7190
7190
  "aliases": [],
7191
7191
  "args": {},
@@ -7789,13 +7789,16 @@
7789
7789
  "limits:monitor:org:hardis"
7790
7790
  ]
7791
7791
  },
7792
- "hardis:org:purge:apexlog": {
7792
+ "hardis:org:refresh:after-refresh": {
7793
7793
  "aliases": [],
7794
7794
  "args": {},
7795
- "description": "\n**Purges Apex debug logs from a Salesforce org.**\n\nThis command provides a quick and efficient way to clear out accumulated Apex debug logs from your Salesforce environment. This is particularly useful for:\n\n- **Storage Management:** Freeing up valuable data storage space in your Salesforce org.\n- **Performance Optimization:** Reducing the overhead associated with large volumes of debug logs.\n- **Troubleshooting:** Ensuring that new debug logs are generated cleanly without interference from old, irrelevant logs.\n\nKey functionalities:\n\n- **Log Identification:** Queries the `ApexLog` object to identify all existing debug logs.\n- **Confirmation Prompt:** Before deletion, it prompts for user confirmation, displaying the number of Apex logs that will be deleted.\n- **Bulk Deletion:** Uses the Salesforce Bulk API to efficiently delete a large number of Apex logs.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query:** It executes a SOQL query (`SELECT Id FROM ApexLog LIMIT 50000`) to retrieve the IDs of Apex logs to be deleted. The limit is set to 50,000 to handle large volumes of logs.\n- **CSV Export:** The retrieved log IDs are temporarily exported to a CSV file (`ApexLogsToDelete_*.csv`) in the `./tmp` directory.\n- **User Confirmation:** It uses the `prompts` library to ask for user confirmation before proceeding with the deletion, displaying the count of logs to be purged.\n- **Bulk API Deletion:** It then uses the Salesforce CLI's `sf data delete bulk` command, pointing to the generated CSV file, to perform the mass deletion of Apex logs.\n- **File System Operations:** It uses `fs-extra` to create the temporary directory and manage the CSV file.\n- **Error Handling:** Includes error handling for the query and deletion operations.\n</details>\n",
7795
+ "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",
7796
7796
  "examples": [
7797
- "$ sf hardis:org:purge:apexlog",
7798
- "$ sf hardis:org:purge:apexlog --target-org nicolas.vuillamy@gmail.com"
7797
+ "$ sf hardis:org:refresh:after-refresh",
7798
+ "$ sf hardis:org:refresh:after-refresh --name \"MyConnectedApp\" // Process specific app, no selection prompt",
7799
+ "$ sf hardis:org:refresh:after-refresh --name \"App1,App2,App3\" // Process multiple apps, no selection prompt",
7800
+ "$ sf hardis:org:refresh:after-refresh --all // Process all apps, no selection prompt",
7801
+ "$ sf hardis:org:refresh:after-refresh --target-org myDevOrg"
7799
7802
  ],
7800
7803
  "flags": {
7801
7804
  "json": {
@@ -7813,286 +7816,15 @@
7813
7816
  "multiple": false,
7814
7817
  "type": "option"
7815
7818
  },
7816
- "prompt": {
7817
- "char": "z",
7818
- "description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
7819
- "name": "prompt",
7820
- "allowNo": true,
7821
- "type": "boolean"
7822
- },
7823
- "debug": {
7824
- "char": "d",
7825
- "description": "Activate debug mode (more logs)",
7826
- "name": "debug",
7827
- "allowNo": false,
7828
- "type": "boolean"
7829
- },
7830
- "websocket": {
7831
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
7832
- "name": "websocket",
7833
- "hasDynamicHelp": false,
7834
- "multiple": false,
7835
- "type": "option"
7836
- },
7837
- "skipauth": {
7838
- "description": "Skip authentication check when a default username is required",
7839
- "name": "skipauth",
7840
- "allowNo": false,
7841
- "type": "boolean"
7842
- },
7843
- "target-org": {
7844
- "aliases": [
7845
- "targetusername",
7846
- "u"
7847
- ],
7848
- "char": "o",
7849
- "deprecateAliases": true,
7850
- "name": "target-org",
7851
- "noCacheDefault": true,
7852
- "required": true,
7853
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
7854
- "hasDynamicHelp": true,
7855
- "multiple": false,
7856
- "type": "option"
7857
- }
7858
- },
7859
- "hasDynamicHelp": true,
7860
- "hiddenAliases": [],
7861
- "id": "hardis:org:purge:apexlog",
7862
- "pluginAlias": "sfdx-hardis",
7863
- "pluginName": "sfdx-hardis",
7864
- "pluginType": "core",
7865
- "strict": true,
7866
- "enableJsonFlag": true,
7867
- "title": "Purge Apex Logs",
7868
- "requiresProject": false,
7869
- "isESM": true,
7870
- "relativePath": [
7871
- "lib",
7872
- "commands",
7873
- "hardis",
7874
- "org",
7875
- "purge",
7876
- "apexlog.js"
7877
- ],
7878
- "aliasPermutations": [],
7879
- "permutations": [
7880
- "hardis:org:purge:apexlog",
7881
- "org:hardis:purge:apexlog",
7882
- "org:purge:hardis:apexlog",
7883
- "org:purge:apexlog:hardis",
7884
- "hardis:purge:org:apexlog",
7885
- "purge:hardis:org:apexlog",
7886
- "purge:org:hardis:apexlog",
7887
- "purge:org:apexlog:hardis",
7888
- "hardis:purge:apexlog:org",
7889
- "purge:hardis:apexlog:org",
7890
- "purge:apexlog:hardis:org",
7891
- "purge:apexlog:org:hardis",
7892
- "hardis:org:apexlog:purge",
7893
- "org:hardis:apexlog:purge",
7894
- "org:apexlog:hardis:purge",
7895
- "org:apexlog:purge:hardis",
7896
- "hardis:apexlog:org:purge",
7897
- "apexlog:hardis:org:purge",
7898
- "apexlog:org:hardis:purge",
7899
- "apexlog:org:purge:hardis",
7900
- "hardis:apexlog:purge:org",
7901
- "apexlog:hardis:purge:org",
7902
- "apexlog:purge:hardis:org",
7903
- "apexlog:purge:org:hardis"
7904
- ]
7905
- },
7906
- "hardis:org:purge:flow": {
7907
- "aliases": [],
7908
- "args": {},
7909
- "description": "\n**Purges old or unwanted Flow versions from a Salesforce org, with an option to delete related Flow Interviews.**\n\nThis command helps maintain a clean and performant Salesforce org by removing obsolete Flow versions. Over time, multiple versions of Flows can accumulate, consuming storage and potentially impacting performance. This tool provides a controlled way to clean up these versions.\n\nKey functionalities:\n\n- **Targeted Flow Selection:** Allows you to filter Flow versions to delete by name (`--name`) and status (`--status`, e.g., `Obsolete`, `Draft`, `Inactive`).\n- **Flow Interview Deletion:** If a Flow version cannot be deleted due to active Flow Interviews, the `--delete-flow-interviews` flag (or interactive prompt) allows you to delete these interviews first, then retry the Flow version deletion.\n- **Confirmation Prompt:** In interactive mode, it prompts for confirmation before proceeding with the deletion of Flow versions and Flow Interviews.\n- **Partial Success Handling:** The `--allowpurgefailure` flag (default `true`) allows the command to continue even if some deletions fail, reporting the errors.\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 `Flow` object (using the Tooling API) to list Flow versions based on the provided filters (name, status, manageable state).\n- **Bulk Deletion (Tooling API):** It uses `bulkDeleteTooling` to perform mass deletions of Flow versions. If deletion fails due to active interviews, it extracts the interview IDs.\n- **Flow Interview Management:** If `delete-flow-interviews` is enabled, it queries `FlowInterview` objects, performs bulk deletion of the identified interviews using `bulkDelete`, and then retries the Flow version deletion.\n- **Interactive Prompts:** Uses the `prompts` library to interact with the user for selecting Flows, statuses, and confirming deletion actions.\n- **Error Reporting:** Logs detailed error messages for failed deletions, including the specific reasons.\n- **Command-Line Execution:** Uses `execSfdxJson` to execute Salesforce CLI commands for querying Flow data.\n</details>\n",
7910
- "examples": [
7911
- "$ sf hardis:org:purge:flow",
7912
- "$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --no-prompt --delete-flow-interviews",
7913
- "$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --status \"Obsolete,Draft,InvalidDraft\" --name TestFlow"
7914
- ],
7915
- "flags": {
7916
- "json": {
7917
- "description": "Format output as json.",
7918
- "helpGroup": "GLOBAL",
7919
- "name": "json",
7920
- "allowNo": false,
7921
- "type": "boolean"
7922
- },
7923
- "flags-dir": {
7924
- "helpGroup": "GLOBAL",
7925
- "name": "flags-dir",
7926
- "summary": "Import flag values from a directory.",
7927
- "hasDynamicHelp": false,
7928
- "multiple": false,
7929
- "type": "option"
7930
- },
7931
- "prompt": {
7932
- "char": "z",
7933
- "description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
7934
- "name": "prompt",
7935
- "allowNo": true,
7936
- "type": "boolean"
7937
- },
7938
- "name": {
7939
- "char": "n",
7940
- "description": "Filter according to Name criteria",
7941
- "name": "name",
7942
- "hasDynamicHelp": false,
7943
- "multiple": false,
7944
- "type": "option"
7945
- },
7946
- "status": {
7947
- "char": "s",
7948
- "description": "Filter according to Status criteria",
7949
- "name": "status",
7950
- "hasDynamicHelp": false,
7951
- "multiple": false,
7952
- "type": "option"
7953
- },
7954
- "delete-flow-interviews": {
7955
- "char": "w",
7956
- "description": "If the presence of Flow interviews prevent to delete flows versions, delete them before retrying to delete flow versions",
7957
- "name": "delete-flow-interviews",
7958
- "allowNo": false,
7959
- "type": "boolean"
7960
- },
7961
- "allowpurgefailure": {
7962
- "char": "f",
7963
- "description": "Allows purges to fail without exiting with 1. Use --no-allowpurgefailure to disable",
7964
- "name": "allowpurgefailure",
7965
- "allowNo": true,
7966
- "type": "boolean"
7967
- },
7968
- "instanceurl": {
7969
- "char": "r",
7970
- "description": "URL of org instance",
7971
- "name": "instanceurl",
7972
- "default": "https://login.salesforce.com",
7973
- "hasDynamicHelp": false,
7974
- "multiple": false,
7975
- "type": "option"
7976
- },
7977
- "debug": {
7978
- "char": "d",
7979
- "description": "Activate debug mode (more logs)",
7980
- "name": "debug",
7981
- "allowNo": false,
7982
- "type": "boolean"
7983
- },
7984
- "websocket": {
7985
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
7986
- "name": "websocket",
7987
- "hasDynamicHelp": false,
7988
- "multiple": false,
7989
- "type": "option"
7990
- },
7991
- "skipauth": {
7992
- "description": "Skip authentication check when a default username is required",
7993
- "name": "skipauth",
7994
- "allowNo": false,
7995
- "type": "boolean"
7996
- },
7997
- "target-org": {
7998
- "aliases": [
7999
- "targetusername",
8000
- "u"
8001
- ],
8002
- "char": "o",
8003
- "deprecateAliases": true,
8004
- "name": "target-org",
8005
- "noCacheDefault": true,
8006
- "required": true,
8007
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
8008
- "hasDynamicHelp": true,
8009
- "multiple": false,
8010
- "type": "option"
8011
- }
8012
- },
8013
- "hasDynamicHelp": true,
8014
- "hiddenAliases": [],
8015
- "id": "hardis:org:purge:flow",
8016
- "pluginAlias": "sfdx-hardis",
8017
- "pluginName": "sfdx-hardis",
8018
- "pluginType": "core",
8019
- "strict": true,
8020
- "enableJsonFlag": true,
8021
- "title": "Purge Flow versions",
8022
- "requiresProject": false,
8023
- "isESM": true,
8024
- "relativePath": [
8025
- "lib",
8026
- "commands",
8027
- "hardis",
8028
- "org",
8029
- "purge",
8030
- "flow.js"
8031
- ],
8032
- "aliasPermutations": [],
8033
- "permutations": [
8034
- "hardis:org:purge:flow",
8035
- "org:hardis:purge:flow",
8036
- "org:purge:hardis:flow",
8037
- "org:purge:flow:hardis",
8038
- "hardis:purge:org:flow",
8039
- "purge:hardis:org:flow",
8040
- "purge:org:hardis:flow",
8041
- "purge:org:flow:hardis",
8042
- "hardis:purge:flow:org",
8043
- "purge:hardis:flow:org",
8044
- "purge:flow:hardis:org",
8045
- "purge:flow:org:hardis",
8046
- "hardis:org:flow:purge",
8047
- "org:hardis:flow:purge",
8048
- "org:flow:hardis:purge",
8049
- "org:flow:purge:hardis",
8050
- "hardis:flow:org:purge",
8051
- "flow:hardis:org:purge",
8052
- "flow:org:hardis:purge",
8053
- "flow:org:purge:hardis",
8054
- "hardis:flow:purge:org",
8055
- "flow:hardis:purge:org",
8056
- "flow:purge:hardis:org",
8057
- "flow:purge:org:hardis"
8058
- ]
8059
- },
8060
- "hardis:org:refresh:after-refresh": {
8061
- "aliases": [],
8062
- "args": {},
8063
- "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",
8064
- "examples": [
8065
- "$ sf hardis:org:refresh:after-refresh",
8066
- "$ sf hardis:org:refresh:after-refresh --name \"MyConnectedApp\" // Process specific app, no selection prompt",
8067
- "$ sf hardis:org:refresh:after-refresh --name \"App1,App2,App3\" // Process multiple apps, no selection prompt",
8068
- "$ sf hardis:org:refresh:after-refresh --all // Process all apps, no selection prompt",
8069
- "$ sf hardis:org:refresh:after-refresh --target-org myDevOrg"
8070
- ],
8071
- "flags": {
8072
- "json": {
8073
- "description": "Format output as json.",
8074
- "helpGroup": "GLOBAL",
8075
- "name": "json",
8076
- "allowNo": false,
8077
- "type": "boolean"
8078
- },
8079
- "flags-dir": {
8080
- "helpGroup": "GLOBAL",
8081
- "name": "flags-dir",
8082
- "summary": "Import flag values from a directory.",
8083
- "hasDynamicHelp": false,
8084
- "multiple": false,
8085
- "type": "option"
8086
- },
8087
- "target-org": {
8088
- "char": "o",
8089
- "name": "target-org",
8090
- "noCacheDefault": true,
8091
- "required": true,
8092
- "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
8093
- "hasDynamicHelp": true,
8094
- "multiple": false,
8095
- "type": "option"
7819
+ "target-org": {
7820
+ "char": "o",
7821
+ "name": "target-org",
7822
+ "noCacheDefault": true,
7823
+ "required": true,
7824
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
7825
+ "hasDynamicHelp": true,
7826
+ "multiple": false,
7827
+ "type": "option"
8096
7828
  },
8097
7829
  "name": {
8098
7830
  "char": "n",
@@ -8296,13 +8028,13 @@
8296
8028
  "before-refresh:refresh:org:hardis"
8297
8029
  ]
8298
8030
  },
8299
- "hardis:org:retrieve:packageconfig": {
8031
+ "hardis:org:purge:apexlog": {
8300
8032
  "aliases": [],
8301
8033
  "args": {},
8302
- "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",
8034
+ "description": "\n**Purges Apex debug logs from a Salesforce org.**\n\nThis command provides a quick and efficient way to clear out accumulated Apex debug logs from your Salesforce environment. This is particularly useful for:\n\n- **Storage Management:** Freeing up valuable data storage space in your Salesforce org.\n- **Performance Optimization:** Reducing the overhead associated with large volumes of debug logs.\n- **Troubleshooting:** Ensuring that new debug logs are generated cleanly without interference from old, irrelevant logs.\n\nKey functionalities:\n\n- **Log Identification:** Queries the `ApexLog` object to identify all existing debug logs.\n- **Confirmation Prompt:** Before deletion, it prompts for user confirmation, displaying the number of Apex logs that will be deleted.\n- **Bulk Deletion:** Uses the Salesforce Bulk API to efficiently delete a large number of Apex logs.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query:** It executes a SOQL query (`SELECT Id FROM ApexLog LIMIT 50000`) to retrieve the IDs of Apex logs to be deleted. The limit is set to 50,000 to handle large volumes of logs.\n- **CSV Export:** The retrieved log IDs are temporarily exported to a CSV file (`ApexLogsToDelete_*.csv`) in the `./tmp` directory.\n- **User Confirmation:** It uses the `prompts` library to ask for user confirmation before proceeding with the deletion, displaying the count of logs to be purged.\n- **Bulk API Deletion:** It then uses the Salesforce CLI's `sf data delete bulk` command, pointing to the generated CSV file, to perform the mass deletion of Apex logs.\n- **File System Operations:** It uses `fs-extra` to create the temporary directory and manage the CSV file.\n- **Error Handling:** Includes error handling for the query and deletion operations.\n</details>\n",
8303
8035
  "examples": [
8304
- "$ sf hardis:org:retrieve:packageconfig",
8305
- "sf hardis:org:retrieve:packageconfig -u myOrg"
8036
+ "$ sf hardis:org:purge:apexlog",
8037
+ "$ sf hardis:org:purge:apexlog --target-org nicolas.vuillamy@gmail.com"
8306
8038
  ],
8307
8039
  "flags": {
8308
8040
  "json": {
@@ -8320,6 +8052,167 @@
8320
8052
  "multiple": false,
8321
8053
  "type": "option"
8322
8054
  },
8055
+ "prompt": {
8056
+ "char": "z",
8057
+ "description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
8058
+ "name": "prompt",
8059
+ "allowNo": true,
8060
+ "type": "boolean"
8061
+ },
8062
+ "debug": {
8063
+ "char": "d",
8064
+ "description": "Activate debug mode (more logs)",
8065
+ "name": "debug",
8066
+ "allowNo": false,
8067
+ "type": "boolean"
8068
+ },
8069
+ "websocket": {
8070
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
8071
+ "name": "websocket",
8072
+ "hasDynamicHelp": false,
8073
+ "multiple": false,
8074
+ "type": "option"
8075
+ },
8076
+ "skipauth": {
8077
+ "description": "Skip authentication check when a default username is required",
8078
+ "name": "skipauth",
8079
+ "allowNo": false,
8080
+ "type": "boolean"
8081
+ },
8082
+ "target-org": {
8083
+ "aliases": [
8084
+ "targetusername",
8085
+ "u"
8086
+ ],
8087
+ "char": "o",
8088
+ "deprecateAliases": true,
8089
+ "name": "target-org",
8090
+ "noCacheDefault": true,
8091
+ "required": true,
8092
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
8093
+ "hasDynamicHelp": true,
8094
+ "multiple": false,
8095
+ "type": "option"
8096
+ }
8097
+ },
8098
+ "hasDynamicHelp": true,
8099
+ "hiddenAliases": [],
8100
+ "id": "hardis:org:purge:apexlog",
8101
+ "pluginAlias": "sfdx-hardis",
8102
+ "pluginName": "sfdx-hardis",
8103
+ "pluginType": "core",
8104
+ "strict": true,
8105
+ "enableJsonFlag": true,
8106
+ "title": "Purge Apex Logs",
8107
+ "requiresProject": false,
8108
+ "isESM": true,
8109
+ "relativePath": [
8110
+ "lib",
8111
+ "commands",
8112
+ "hardis",
8113
+ "org",
8114
+ "purge",
8115
+ "apexlog.js"
8116
+ ],
8117
+ "aliasPermutations": [],
8118
+ "permutations": [
8119
+ "hardis:org:purge:apexlog",
8120
+ "org:hardis:purge:apexlog",
8121
+ "org:purge:hardis:apexlog",
8122
+ "org:purge:apexlog:hardis",
8123
+ "hardis:purge:org:apexlog",
8124
+ "purge:hardis:org:apexlog",
8125
+ "purge:org:hardis:apexlog",
8126
+ "purge:org:apexlog:hardis",
8127
+ "hardis:purge:apexlog:org",
8128
+ "purge:hardis:apexlog:org",
8129
+ "purge:apexlog:hardis:org",
8130
+ "purge:apexlog:org:hardis",
8131
+ "hardis:org:apexlog:purge",
8132
+ "org:hardis:apexlog:purge",
8133
+ "org:apexlog:hardis:purge",
8134
+ "org:apexlog:purge:hardis",
8135
+ "hardis:apexlog:org:purge",
8136
+ "apexlog:hardis:org:purge",
8137
+ "apexlog:org:hardis:purge",
8138
+ "apexlog:org:purge:hardis",
8139
+ "hardis:apexlog:purge:org",
8140
+ "apexlog:hardis:purge:org",
8141
+ "apexlog:purge:hardis:org",
8142
+ "apexlog:purge:org:hardis"
8143
+ ]
8144
+ },
8145
+ "hardis:org:purge:flow": {
8146
+ "aliases": [],
8147
+ "args": {},
8148
+ "description": "\n**Purges old or unwanted Flow versions from a Salesforce org, with an option to delete related Flow Interviews.**\n\nThis command helps maintain a clean and performant Salesforce org by removing obsolete Flow versions. Over time, multiple versions of Flows can accumulate, consuming storage and potentially impacting performance. This tool provides a controlled way to clean up these versions.\n\nKey functionalities:\n\n- **Targeted Flow Selection:** Allows you to filter Flow versions to delete by name (`--name`) and status (`--status`, e.g., `Obsolete`, `Draft`, `Inactive`).\n- **Flow Interview Deletion:** If a Flow version cannot be deleted due to active Flow Interviews, the `--delete-flow-interviews` flag (or interactive prompt) allows you to delete these interviews first, then retry the Flow version deletion.\n- **Confirmation Prompt:** In interactive mode, it prompts for confirmation before proceeding with the deletion of Flow versions and Flow Interviews.\n- **Partial Success Handling:** The `--allowpurgefailure` flag (default `true`) allows the command to continue even if some deletions fail, reporting the errors.\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 `Flow` object (using the Tooling API) to list Flow versions based on the provided filters (name, status, manageable state).\n- **Bulk Deletion (Tooling API):** It uses `bulkDeleteTooling` to perform mass deletions of Flow versions. If deletion fails due to active interviews, it extracts the interview IDs.\n- **Flow Interview Management:** If `delete-flow-interviews` is enabled, it queries `FlowInterview` objects, performs bulk deletion of the identified interviews using `bulkDelete`, and then retries the Flow version deletion.\n- **Interactive Prompts:** Uses the `prompts` library to interact with the user for selecting Flows, statuses, and confirming deletion actions.\n- **Error Reporting:** Logs detailed error messages for failed deletions, including the specific reasons.\n- **Command-Line Execution:** Uses `execSfdxJson` to execute Salesforce CLI commands for querying Flow data.\n</details>\n",
8149
+ "examples": [
8150
+ "$ sf hardis:org:purge:flow",
8151
+ "$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --no-prompt --delete-flow-interviews",
8152
+ "$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --status \"Obsolete,Draft,InvalidDraft\" --name TestFlow"
8153
+ ],
8154
+ "flags": {
8155
+ "json": {
8156
+ "description": "Format output as json.",
8157
+ "helpGroup": "GLOBAL",
8158
+ "name": "json",
8159
+ "allowNo": false,
8160
+ "type": "boolean"
8161
+ },
8162
+ "flags-dir": {
8163
+ "helpGroup": "GLOBAL",
8164
+ "name": "flags-dir",
8165
+ "summary": "Import flag values from a directory.",
8166
+ "hasDynamicHelp": false,
8167
+ "multiple": false,
8168
+ "type": "option"
8169
+ },
8170
+ "prompt": {
8171
+ "char": "z",
8172
+ "description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
8173
+ "name": "prompt",
8174
+ "allowNo": true,
8175
+ "type": "boolean"
8176
+ },
8177
+ "name": {
8178
+ "char": "n",
8179
+ "description": "Filter according to Name criteria",
8180
+ "name": "name",
8181
+ "hasDynamicHelp": false,
8182
+ "multiple": false,
8183
+ "type": "option"
8184
+ },
8185
+ "status": {
8186
+ "char": "s",
8187
+ "description": "Filter according to Status criteria",
8188
+ "name": "status",
8189
+ "hasDynamicHelp": false,
8190
+ "multiple": false,
8191
+ "type": "option"
8192
+ },
8193
+ "delete-flow-interviews": {
8194
+ "char": "w",
8195
+ "description": "If the presence of Flow interviews prevent to delete flows versions, delete them before retrying to delete flow versions",
8196
+ "name": "delete-flow-interviews",
8197
+ "allowNo": false,
8198
+ "type": "boolean"
8199
+ },
8200
+ "allowpurgefailure": {
8201
+ "char": "f",
8202
+ "description": "Allows purges to fail without exiting with 1. Use --no-allowpurgefailure to disable",
8203
+ "name": "allowpurgefailure",
8204
+ "allowNo": true,
8205
+ "type": "boolean"
8206
+ },
8207
+ "instanceurl": {
8208
+ "char": "r",
8209
+ "description": "URL of org instance",
8210
+ "name": "instanceurl",
8211
+ "default": "https://login.salesforce.com",
8212
+ "hasDynamicHelp": false,
8213
+ "multiple": false,
8214
+ "type": "option"
8215
+ },
8323
8216
  "debug": {
8324
8217
  "char": "d",
8325
8218
  "description": "Activate debug mode (more logs)",
@@ -8358,13 +8251,13 @@
8358
8251
  },
8359
8252
  "hasDynamicHelp": true,
8360
8253
  "hiddenAliases": [],
8361
- "id": "hardis:org:retrieve:packageconfig",
8254
+ "id": "hardis:org:purge:flow",
8362
8255
  "pluginAlias": "sfdx-hardis",
8363
8256
  "pluginName": "sfdx-hardis",
8364
8257
  "pluginType": "core",
8365
8258
  "strict": true,
8366
8259
  "enableJsonFlag": true,
8367
- "title": "Retrieve package configuration from an org",
8260
+ "title": "Purge Flow versions",
8368
8261
  "requiresProject": false,
8369
8262
  "isESM": true,
8370
8263
  "relativePath": [
@@ -8372,43 +8265,44 @@
8372
8265
  "commands",
8373
8266
  "hardis",
8374
8267
  "org",
8375
- "retrieve",
8376
- "packageconfig.js"
8268
+ "purge",
8269
+ "flow.js"
8377
8270
  ],
8378
8271
  "aliasPermutations": [],
8379
8272
  "permutations": [
8380
- "hardis:org:retrieve:packageconfig",
8381
- "org:hardis:retrieve:packageconfig",
8382
- "org:retrieve:hardis:packageconfig",
8383
- "org:retrieve:packageconfig:hardis",
8384
- "hardis:retrieve:org:packageconfig",
8385
- "retrieve:hardis:org:packageconfig",
8386
- "retrieve:org:hardis:packageconfig",
8387
- "retrieve:org:packageconfig:hardis",
8388
- "hardis:retrieve:packageconfig:org",
8389
- "retrieve:hardis:packageconfig:org",
8390
- "retrieve:packageconfig:hardis:org",
8391
- "retrieve:packageconfig:org:hardis",
8392
- "hardis:org:packageconfig:retrieve",
8393
- "org:hardis:packageconfig:retrieve",
8394
- "org:packageconfig:hardis:retrieve",
8395
- "org:packageconfig:retrieve:hardis",
8396
- "hardis:packageconfig:org:retrieve",
8397
- "packageconfig:hardis:org:retrieve",
8398
- "packageconfig:org:hardis:retrieve",
8399
- "packageconfig:org:retrieve:hardis",
8400
- "hardis:packageconfig:retrieve:org",
8401
- "packageconfig:hardis:retrieve:org",
8402
- "packageconfig:retrieve:hardis:org",
8403
- "packageconfig:retrieve:org:hardis"
8273
+ "hardis:org:purge:flow",
8274
+ "org:hardis:purge:flow",
8275
+ "org:purge:hardis:flow",
8276
+ "org:purge:flow:hardis",
8277
+ "hardis:purge:org:flow",
8278
+ "purge:hardis:org:flow",
8279
+ "purge:org:hardis:flow",
8280
+ "purge:org:flow:hardis",
8281
+ "hardis:purge:flow:org",
8282
+ "purge:hardis:flow:org",
8283
+ "purge:flow:hardis:org",
8284
+ "purge:flow:org:hardis",
8285
+ "hardis:org:flow:purge",
8286
+ "org:hardis:flow:purge",
8287
+ "org:flow:hardis:purge",
8288
+ "org:flow:purge:hardis",
8289
+ "hardis:flow:org:purge",
8290
+ "flow:hardis:org:purge",
8291
+ "flow:org:hardis:purge",
8292
+ "flow:org:purge:hardis",
8293
+ "hardis:flow:purge:org",
8294
+ "flow:hardis:purge:org",
8295
+ "flow:purge:hardis:org",
8296
+ "flow:purge:org:hardis"
8404
8297
  ]
8405
8298
  },
8406
- "hardis:org:test:apex": {
8299
+ "hardis:org:retrieve:packageconfig": {
8407
8300
  "aliases": [],
8408
8301
  "args": {},
8409
- "description": "Run apex tests in Salesforce org\n\nIf following configuration is defined, it will fail if apex coverage target is not reached:\n\n- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide`\n- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide`\n\nYou can override env var SFDX_TEST_WAIT_MINUTES to wait more than 120 minutes.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-apex-tests/) and can output Grafana, Slack and MsTeams Notifications.\n",
8302
+ "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",
8410
8303
  "examples": [
8411
- "$ sf hardis:org:test:apex"
8304
+ "$ sf hardis:org:retrieve:packageconfig",
8305
+ "sf hardis:org:retrieve:packageconfig -u myOrg"
8412
8306
  ],
8413
8307
  "flags": {
8414
8308
  "json": {
@@ -8426,21 +8320,6 @@
8426
8320
  "multiple": false,
8427
8321
  "type": "option"
8428
8322
  },
8429
- "testlevel": {
8430
- "char": "l",
8431
- "description": "Level of tests to apply to validate deployment",
8432
- "name": "testlevel",
8433
- "default": "RunLocalTests",
8434
- "hasDynamicHelp": false,
8435
- "multiple": false,
8436
- "options": [
8437
- "NoTestRun",
8438
- "RunSpecifiedTests",
8439
- "RunLocalTests",
8440
- "RunAllTestsInOrg"
8441
- ],
8442
- "type": "option"
8443
- },
8444
8323
  "debug": {
8445
8324
  "char": "d",
8446
8325
  "description": "Activate debug mode (more logs)",
@@ -8479,48 +8358,49 @@
8479
8358
  },
8480
8359
  "hasDynamicHelp": true,
8481
8360
  "hiddenAliases": [],
8482
- "id": "hardis:org:test:apex",
8361
+ "id": "hardis:org:retrieve:packageconfig",
8483
8362
  "pluginAlias": "sfdx-hardis",
8484
8363
  "pluginName": "sfdx-hardis",
8485
8364
  "pluginType": "core",
8486
8365
  "strict": true,
8487
8366
  "enableJsonFlag": true,
8488
- "title": "Run apex tests",
8367
+ "title": "Retrieve package configuration from an org",
8368
+ "requiresProject": false,
8489
8369
  "isESM": true,
8490
8370
  "relativePath": [
8491
8371
  "lib",
8492
8372
  "commands",
8493
8373
  "hardis",
8494
8374
  "org",
8495
- "test",
8496
- "apex.js"
8375
+ "retrieve",
8376
+ "packageconfig.js"
8497
8377
  ],
8498
8378
  "aliasPermutations": [],
8499
8379
  "permutations": [
8500
- "hardis:org:test:apex",
8501
- "org:hardis:test:apex",
8502
- "org:test:hardis:apex",
8503
- "org:test:apex:hardis",
8504
- "hardis:test:org:apex",
8505
- "test:hardis:org:apex",
8506
- "test:org:hardis:apex",
8507
- "test:org:apex:hardis",
8508
- "hardis:test:apex:org",
8509
- "test:hardis:apex:org",
8510
- "test:apex:hardis:org",
8511
- "test:apex:org:hardis",
8512
- "hardis:org:apex:test",
8513
- "org:hardis:apex:test",
8514
- "org:apex:hardis:test",
8515
- "org:apex:test:hardis",
8516
- "hardis:apex:org:test",
8517
- "apex:hardis:org:test",
8518
- "apex:org:hardis:test",
8519
- "apex:org:test:hardis",
8520
- "hardis:apex:test:org",
8521
- "apex:hardis:test:org",
8522
- "apex:test:hardis:org",
8523
- "apex:test:org:hardis"
8380
+ "hardis:org:retrieve:packageconfig",
8381
+ "org:hardis:retrieve:packageconfig",
8382
+ "org:retrieve:hardis:packageconfig",
8383
+ "org:retrieve:packageconfig:hardis",
8384
+ "hardis:retrieve:org:packageconfig",
8385
+ "retrieve:hardis:org:packageconfig",
8386
+ "retrieve:org:hardis:packageconfig",
8387
+ "retrieve:org:packageconfig:hardis",
8388
+ "hardis:retrieve:packageconfig:org",
8389
+ "retrieve:hardis:packageconfig:org",
8390
+ "retrieve:packageconfig:hardis:org",
8391
+ "retrieve:packageconfig:org:hardis",
8392
+ "hardis:org:packageconfig:retrieve",
8393
+ "org:hardis:packageconfig:retrieve",
8394
+ "org:packageconfig:hardis:retrieve",
8395
+ "org:packageconfig:retrieve:hardis",
8396
+ "hardis:packageconfig:org:retrieve",
8397
+ "packageconfig:hardis:org:retrieve",
8398
+ "packageconfig:org:hardis:retrieve",
8399
+ "packageconfig:org:retrieve:hardis",
8400
+ "hardis:packageconfig:retrieve:org",
8401
+ "packageconfig:hardis:retrieve:org",
8402
+ "packageconfig:retrieve:hardis:org",
8403
+ "packageconfig:retrieve:org:hardis"
8524
8404
  ]
8525
8405
  },
8526
8406
  "hardis:org:user:activateinvalid": {
@@ -8923,6 +8803,126 @@
8923
8803
  "unfreeze:user:org:hardis"
8924
8804
  ]
8925
8805
  },
8806
+ "hardis:org:test:apex": {
8807
+ "aliases": [],
8808
+ "args": {},
8809
+ "description": "Run apex tests in Salesforce org\n\nIf following configuration is defined, it will fail if apex coverage target is not reached:\n\n- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide`\n- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide`\n\nYou can override env var SFDX_TEST_WAIT_MINUTES to wait more than 120 minutes.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-apex-tests/) and can output Grafana, Slack and MsTeams Notifications.\n",
8810
+ "examples": [
8811
+ "$ sf hardis:org:test:apex"
8812
+ ],
8813
+ "flags": {
8814
+ "json": {
8815
+ "description": "Format output as json.",
8816
+ "helpGroup": "GLOBAL",
8817
+ "name": "json",
8818
+ "allowNo": false,
8819
+ "type": "boolean"
8820
+ },
8821
+ "flags-dir": {
8822
+ "helpGroup": "GLOBAL",
8823
+ "name": "flags-dir",
8824
+ "summary": "Import flag values from a directory.",
8825
+ "hasDynamicHelp": false,
8826
+ "multiple": false,
8827
+ "type": "option"
8828
+ },
8829
+ "testlevel": {
8830
+ "char": "l",
8831
+ "description": "Level of tests to apply to validate deployment",
8832
+ "name": "testlevel",
8833
+ "default": "RunLocalTests",
8834
+ "hasDynamicHelp": false,
8835
+ "multiple": false,
8836
+ "options": [
8837
+ "NoTestRun",
8838
+ "RunSpecifiedTests",
8839
+ "RunLocalTests",
8840
+ "RunAllTestsInOrg"
8841
+ ],
8842
+ "type": "option"
8843
+ },
8844
+ "debug": {
8845
+ "char": "d",
8846
+ "description": "Activate debug mode (more logs)",
8847
+ "name": "debug",
8848
+ "allowNo": false,
8849
+ "type": "boolean"
8850
+ },
8851
+ "websocket": {
8852
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
8853
+ "name": "websocket",
8854
+ "hasDynamicHelp": false,
8855
+ "multiple": false,
8856
+ "type": "option"
8857
+ },
8858
+ "skipauth": {
8859
+ "description": "Skip authentication check when a default username is required",
8860
+ "name": "skipauth",
8861
+ "allowNo": false,
8862
+ "type": "boolean"
8863
+ },
8864
+ "target-org": {
8865
+ "aliases": [
8866
+ "targetusername",
8867
+ "u"
8868
+ ],
8869
+ "char": "o",
8870
+ "deprecateAliases": true,
8871
+ "name": "target-org",
8872
+ "noCacheDefault": true,
8873
+ "required": true,
8874
+ "summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
8875
+ "hasDynamicHelp": true,
8876
+ "multiple": false,
8877
+ "type": "option"
8878
+ }
8879
+ },
8880
+ "hasDynamicHelp": true,
8881
+ "hiddenAliases": [],
8882
+ "id": "hardis:org:test:apex",
8883
+ "pluginAlias": "sfdx-hardis",
8884
+ "pluginName": "sfdx-hardis",
8885
+ "pluginType": "core",
8886
+ "strict": true,
8887
+ "enableJsonFlag": true,
8888
+ "title": "Run apex tests",
8889
+ "isESM": true,
8890
+ "relativePath": [
8891
+ "lib",
8892
+ "commands",
8893
+ "hardis",
8894
+ "org",
8895
+ "test",
8896
+ "apex.js"
8897
+ ],
8898
+ "aliasPermutations": [],
8899
+ "permutations": [
8900
+ "hardis:org:test:apex",
8901
+ "org:hardis:test:apex",
8902
+ "org:test:hardis:apex",
8903
+ "org:test:apex:hardis",
8904
+ "hardis:test:org:apex",
8905
+ "test:hardis:org:apex",
8906
+ "test:org:hardis:apex",
8907
+ "test:org:apex:hardis",
8908
+ "hardis:test:apex:org",
8909
+ "test:hardis:apex:org",
8910
+ "test:apex:hardis:org",
8911
+ "test:apex:org:hardis",
8912
+ "hardis:org:apex:test",
8913
+ "org:hardis:apex:test",
8914
+ "org:apex:hardis:test",
8915
+ "org:apex:test:hardis",
8916
+ "hardis:apex:org:test",
8917
+ "apex:hardis:org:test",
8918
+ "apex:org:hardis:test",
8919
+ "apex:org:test:hardis",
8920
+ "hardis:apex:test:org",
8921
+ "apex:hardis:test:org",
8922
+ "apex:test:hardis:org",
8923
+ "apex:test:org:hardis"
8924
+ ]
8925
+ },
8926
8926
  "hardis:package:version:create": {
8927
8927
  "aliases": [],
8928
8928
  "args": {},
@@ -15370,5 +15370,5 @@
15370
15370
  ]
15371
15371
  }
15372
15372
  },
15373
- "version": "6.9.1-alpha202510261658.0"
15373
+ "version": "6.9.1-alpha202510262008.0"
15374
15374
  }