sfdx-hardis 6.9.1-alpha202510261312.0 → 6.9.1-alpha202510261844.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.
@@ -132,13 +132,12 @@
132
132
  "clear:cache:hardis"
133
133
  ]
134
134
  },
135
- "hardis:auth:login": {
135
+ "hardis:config:get": {
136
136
  "aliases": [],
137
137
  "args": {},
138
- "description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n</details>\n",
138
+ "description": "\n## Command Behavior\n\n**Retrieves and displays the sfdx-hardis configuration for a specified level.**\n\nThis command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.\n\n- **Configuration levels:** It can retrieve configuration from three different levels:\n - **Project:** The configuration defined in the project's `.sfdx-hardis.yml` file.\n - **Branch:** The configuration defined in a branch-specific configuration file (e.g., `.sfdx-hardis.production.yml`).\n - **User:** The global user-level configuration.\n\n## Technical explanations\n\nThe command's logic is straightforward:\n\n- **`getConfig` function:** It calls the `getConfig` utility function, passing the desired configuration level as an argument.\n- **Configuration loading:** The `getConfig` function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON.\n- **Output:** The retrieved configuration is then displayed to the user as a JSON string.\n",
139
139
  "examples": [
140
- "$ sf hardis:auth:login",
141
- "CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
140
+ "$ sf hardis:project:deploy:sources:metadata"
142
141
  ],
143
142
  "flags": {
144
143
  "json": {
@@ -156,28 +155,20 @@
156
155
  "multiple": false,
157
156
  "type": "option"
158
157
  },
159
- "instanceurl": {
160
- "char": "r",
161
- "description": "URL of org instance",
162
- "name": "instanceurl",
158
+ "level": {
159
+ "char": "l",
160
+ "description": "project,branch or user",
161
+ "name": "level",
162
+ "default": "project",
163
163
  "hasDynamicHelp": false,
164
164
  "multiple": false,
165
+ "options": [
166
+ "project",
167
+ "branch",
168
+ "user"
169
+ ],
165
170
  "type": "option"
166
171
  },
167
- "devhub": {
168
- "char": "h",
169
- "description": "Also connect associated DevHub",
170
- "name": "devhub",
171
- "allowNo": false,
172
- "type": "boolean"
173
- },
174
- "scratchorg": {
175
- "char": "s",
176
- "description": "Scratch org",
177
- "name": "scratchorg",
178
- "allowNo": false,
179
- "type": "boolean"
180
- },
181
172
  "debug": {
182
173
  "char": "d",
183
174
  "description": "Activate debug mode (more logs)",
@@ -201,38 +192,39 @@
201
192
  },
202
193
  "hasDynamicHelp": false,
203
194
  "hiddenAliases": [],
204
- "id": "hardis:auth:login",
195
+ "id": "hardis:config:get",
205
196
  "pluginAlias": "sfdx-hardis",
206
197
  "pluginName": "sfdx-hardis",
207
198
  "pluginType": "core",
208
199
  "strict": true,
209
200
  "enableJsonFlag": true,
210
- "title": "Login",
201
+ "title": "Deploy metadata sources to org",
211
202
  "requiresProject": false,
212
203
  "isESM": true,
213
204
  "relativePath": [
214
205
  "lib",
215
206
  "commands",
216
207
  "hardis",
217
- "auth",
218
- "login.js"
208
+ "config",
209
+ "get.js"
219
210
  ],
220
211
  "aliasPermutations": [],
221
212
  "permutations": [
222
- "hardis:auth:login",
223
- "auth:hardis:login",
224
- "auth:login:hardis",
225
- "hardis:login:auth",
226
- "login:hardis:auth",
227
- "login:auth:hardis"
213
+ "hardis:config:get",
214
+ "config:hardis:get",
215
+ "config:get:hardis",
216
+ "hardis:get:config",
217
+ "get:hardis:config",
218
+ "get:config:hardis"
228
219
  ]
229
220
  },
230
- "hardis:config:get": {
221
+ "hardis:auth:login": {
231
222
  "aliases": [],
232
223
  "args": {},
233
- "description": "\n## Command Behavior\n\n**Retrieves and displays the sfdx-hardis configuration for a specified level.**\n\nThis command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.\n\n- **Configuration levels:** It can retrieve configuration from three different levels:\n - **Project:** The configuration defined in the project's `.sfdx-hardis.yml` file.\n - **Branch:** The configuration defined in a branch-specific configuration file (e.g., `.sfdx-hardis.production.yml`).\n - **User:** The global user-level configuration.\n\n## Technical explanations\n\nThe command's logic is straightforward:\n\n- **`getConfig` function:** It calls the `getConfig` utility function, passing the desired configuration level as an argument.\n- **Configuration loading:** The `getConfig` function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON.\n- **Output:** The retrieved configuration is then displayed to the user as a JSON string.\n",
224
+ "description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n</details>\n",
234
225
  "examples": [
235
- "$ sf hardis:project:deploy:sources:metadata"
226
+ "$ sf hardis:auth:login",
227
+ "CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
236
228
  ],
237
229
  "flags": {
238
230
  "json": {
@@ -250,20 +242,28 @@
250
242
  "multiple": false,
251
243
  "type": "option"
252
244
  },
253
- "level": {
254
- "char": "l",
255
- "description": "project,branch or user",
256
- "name": "level",
257
- "default": "project",
245
+ "instanceurl": {
246
+ "char": "r",
247
+ "description": "URL of org instance",
248
+ "name": "instanceurl",
258
249
  "hasDynamicHelp": false,
259
250
  "multiple": false,
260
- "options": [
261
- "project",
262
- "branch",
263
- "user"
264
- ],
265
251
  "type": "option"
266
252
  },
253
+ "devhub": {
254
+ "char": "h",
255
+ "description": "Also connect associated DevHub",
256
+ "name": "devhub",
257
+ "allowNo": false,
258
+ "type": "boolean"
259
+ },
260
+ "scratchorg": {
261
+ "char": "s",
262
+ "description": "Scratch org",
263
+ "name": "scratchorg",
264
+ "allowNo": false,
265
+ "type": "boolean"
266
+ },
267
267
  "debug": {
268
268
  "char": "d",
269
269
  "description": "Activate debug mode (more logs)",
@@ -287,30 +287,30 @@
287
287
  },
288
288
  "hasDynamicHelp": false,
289
289
  "hiddenAliases": [],
290
- "id": "hardis:config:get",
290
+ "id": "hardis:auth:login",
291
291
  "pluginAlias": "sfdx-hardis",
292
292
  "pluginName": "sfdx-hardis",
293
293
  "pluginType": "core",
294
294
  "strict": true,
295
295
  "enableJsonFlag": true,
296
- "title": "Deploy metadata sources to org",
296
+ "title": "Login",
297
297
  "requiresProject": false,
298
298
  "isESM": true,
299
299
  "relativePath": [
300
300
  "lib",
301
301
  "commands",
302
302
  "hardis",
303
- "config",
304
- "get.js"
303
+ "auth",
304
+ "login.js"
305
305
  ],
306
306
  "aliasPermutations": [],
307
307
  "permutations": [
308
- "hardis:config:get",
309
- "config:hardis:get",
310
- "config:get:hardis",
311
- "hardis:get:config",
312
- "get:hardis:config",
313
- "get:config:hardis"
308
+ "hardis:auth:login",
309
+ "auth:hardis:login",
310
+ "auth:login:hardis",
311
+ "hardis:login:auth",
312
+ "login:hardis:auth",
313
+ "login:auth:hardis"
314
314
  ]
315
315
  },
316
316
  "hardis:doc:fieldusage": {
@@ -6802,13 +6802,12 @@
6802
6802
  "unusedusers:diagnose:org:hardis"
6803
6803
  ]
6804
6804
  },
6805
- "hardis:org:fix:listviewmine": {
6805
+ "hardis:org:files:export": {
6806
6806
  "aliases": [],
6807
6807
  "args": {},
6808
- "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",
6808
+ "description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
6809
6809
  "examples": [
6810
- "$ sf hardis:org:fix:listviewmine",
6811
- "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
6810
+ "$ sf hardis:org:files:export"
6812
6811
  ],
6813
6812
  "flags": {
6814
6813
  "json": {
@@ -6826,14 +6825,48 @@
6826
6825
  "multiple": false,
6827
6826
  "type": "option"
6828
6827
  },
6829
- "listviews": {
6830
- "char": "l",
6831
- "description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
6832
- "name": "listviews",
6828
+ "path": {
6829
+ "char": "p",
6830
+ "description": "Path to the file export project",
6831
+ "name": "path",
6832
+ "hasDynamicHelp": false,
6833
+ "multiple": false,
6834
+ "type": "option"
6835
+ },
6836
+ "chunksize": {
6837
+ "char": "c",
6838
+ "description": "Number of records to add in a chunk before it is processed",
6839
+ "name": "chunksize",
6840
+ "default": 1000,
6841
+ "hasDynamicHelp": false,
6842
+ "multiple": false,
6843
+ "type": "option"
6844
+ },
6845
+ "polltimeout": {
6846
+ "char": "t",
6847
+ "description": "Timeout in MS for Bulk API calls",
6848
+ "name": "polltimeout",
6849
+ "default": 300000,
6850
+ "hasDynamicHelp": false,
6851
+ "multiple": false,
6852
+ "type": "option"
6853
+ },
6854
+ "startchunknumber": {
6855
+ "char": "s",
6856
+ "description": "Chunk number to start from",
6857
+ "name": "startchunknumber",
6858
+ "default": 0,
6833
6859
  "hasDynamicHelp": false,
6834
6860
  "multiple": false,
6835
6861
  "type": "option"
6836
6862
  },
6863
+ "resume": {
6864
+ "char": "r",
6865
+ "description": "Resume previous export by checking existing files (default in CI)",
6866
+ "name": "resume",
6867
+ "allowNo": false,
6868
+ "type": "boolean"
6869
+ },
6837
6870
  "debug": {
6838
6871
  "char": "d",
6839
6872
  "description": "Activate debug mode (more logs)",
@@ -6872,59 +6905,57 @@
6872
6905
  },
6873
6906
  "hasDynamicHelp": true,
6874
6907
  "hiddenAliases": [],
6875
- "id": "hardis:org:fix:listviewmine",
6908
+ "id": "hardis:org:files:export",
6876
6909
  "pluginAlias": "sfdx-hardis",
6877
6910
  "pluginName": "sfdx-hardis",
6878
6911
  "pluginType": "core",
6879
6912
  "strict": true,
6880
6913
  "enableJsonFlag": true,
6881
- "title": "Fix listviews with ",
6882
- "requiresProject": true,
6914
+ "title": "Export files",
6915
+ "requiresProject": false,
6883
6916
  "isESM": true,
6884
6917
  "relativePath": [
6885
6918
  "lib",
6886
6919
  "commands",
6887
6920
  "hardis",
6888
6921
  "org",
6889
- "fix",
6890
- "listviewmine.js"
6922
+ "files",
6923
+ "export.js"
6891
6924
  ],
6892
6925
  "aliasPermutations": [],
6893
6926
  "permutations": [
6894
- "hardis:org:fix:listviewmine",
6895
- "org:hardis:fix:listviewmine",
6896
- "org:fix:hardis:listviewmine",
6897
- "org:fix:listviewmine:hardis",
6898
- "hardis:fix:org:listviewmine",
6899
- "fix:hardis:org:listviewmine",
6900
- "fix:org:hardis:listviewmine",
6901
- "fix:org:listviewmine:hardis",
6902
- "hardis:fix:listviewmine:org",
6903
- "fix:hardis:listviewmine:org",
6904
- "fix:listviewmine:hardis:org",
6905
- "fix:listviewmine:org:hardis",
6906
- "hardis:org:listviewmine:fix",
6907
- "org:hardis:listviewmine:fix",
6908
- "org:listviewmine:hardis:fix",
6909
- "org:listviewmine:fix:hardis",
6910
- "hardis:listviewmine:org:fix",
6911
- "listviewmine:hardis:org:fix",
6912
- "listviewmine:org:hardis:fix",
6913
- "listviewmine:org:fix:hardis",
6914
- "hardis:listviewmine:fix:org",
6915
- "listviewmine:hardis:fix:org",
6916
- "listviewmine:fix:hardis:org",
6917
- "listviewmine:fix:org:hardis"
6927
+ "hardis:org:files:export",
6928
+ "org:hardis:files:export",
6929
+ "org:files:hardis:export",
6930
+ "org:files:export:hardis",
6931
+ "hardis:files:org:export",
6932
+ "files:hardis:org:export",
6933
+ "files:org:hardis:export",
6934
+ "files:org:export:hardis",
6935
+ "hardis:files:export:org",
6936
+ "files:hardis:export:org",
6937
+ "files:export:hardis:org",
6938
+ "files:export:org:hardis",
6939
+ "hardis:org:export:files",
6940
+ "org:hardis:export:files",
6941
+ "org:export:hardis:files",
6942
+ "org:export:files:hardis",
6943
+ "hardis:export:org:files",
6944
+ "export:hardis:org:files",
6945
+ "export:org:hardis:files",
6946
+ "export:org:files:hardis",
6947
+ "hardis:export:files:org",
6948
+ "export:hardis:files:org",
6949
+ "export:files:hardis:org",
6950
+ "export:files:org:hardis"
6918
6951
  ]
6919
6952
  },
6920
- "hardis:org:generate:packagexmlfull": {
6953
+ "hardis:org:files:import": {
6921
6954
  "aliases": [],
6922
6955
  "args": {},
6923
- "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",
6956
+ "description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
6924
6957
  "examples": [
6925
- "$ sf hardis:org:generate:packagexmlfull",
6926
- "$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
6927
- "$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
6958
+ "$ sf hardis:org:files:import"
6928
6959
  ],
6929
6960
  "flags": {
6930
6961
  "json": {
@@ -6942,13 +6973,21 @@
6942
6973
  "multiple": false,
6943
6974
  "type": "option"
6944
6975
  },
6945
- "outputfile": {
6946
- "description": "Output package.xml file",
6947
- "name": "outputfile",
6976
+ "path": {
6977
+ "char": "p",
6978
+ "description": "Path to the file export project",
6979
+ "name": "path",
6948
6980
  "hasDynamicHelp": false,
6949
6981
  "multiple": false,
6950
6982
  "type": "option"
6951
6983
  },
6984
+ "overwrite": {
6985
+ "char": "f",
6986
+ "description": "Override existing files (doubles the number of API calls)",
6987
+ "name": "overwrite",
6988
+ "allowNo": false,
6989
+ "type": "boolean"
6990
+ },
6952
6991
  "debug": {
6953
6992
  "char": "d",
6954
6993
  "description": "Activate debug mode (more logs)",
@@ -6956,13 +6995,6 @@
6956
6995
  "allowNo": false,
6957
6996
  "type": "boolean"
6958
6997
  },
6959
- "no-prompt": {
6960
- "char": "n",
6961
- "description": "Do not prompt for org username, use the default one",
6962
- "name": "no-prompt",
6963
- "allowNo": false,
6964
- "type": "boolean"
6965
- },
6966
6998
  "websocket": {
6967
6999
  "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
6968
7000
  "name": "websocket",
@@ -6994,13 +7026,13 @@
6994
7026
  },
6995
7027
  "hasDynamicHelp": true,
6996
7028
  "hiddenAliases": [],
6997
- "id": "hardis:org:generate:packagexmlfull",
7029
+ "id": "hardis:org:files:import",
6998
7030
  "pluginAlias": "sfdx-hardis",
6999
7031
  "pluginName": "sfdx-hardis",
7000
7032
  "pluginType": "core",
7001
7033
  "strict": true,
7002
7034
  "enableJsonFlag": true,
7003
- "title": "Generate Full Org package.xml",
7035
+ "title": "Import files",
7004
7036
  "requiresProject": false,
7005
7037
  "isESM": true,
7006
7038
  "relativePath": [
@@ -7008,43 +7040,44 @@
7008
7040
  "commands",
7009
7041
  "hardis",
7010
7042
  "org",
7011
- "generate",
7012
- "packagexmlfull.js"
7043
+ "files",
7044
+ "import.js"
7013
7045
  ],
7014
7046
  "aliasPermutations": [],
7015
7047
  "permutations": [
7016
- "hardis:org:generate:packagexmlfull",
7017
- "org:hardis:generate:packagexmlfull",
7018
- "org:generate:hardis:packagexmlfull",
7019
- "org:generate:packagexmlfull:hardis",
7020
- "hardis:generate:org:packagexmlfull",
7021
- "generate:hardis:org:packagexmlfull",
7022
- "generate:org:hardis:packagexmlfull",
7023
- "generate:org:packagexmlfull:hardis",
7024
- "hardis:generate:packagexmlfull:org",
7025
- "generate:hardis:packagexmlfull:org",
7026
- "generate:packagexmlfull:hardis:org",
7027
- "generate:packagexmlfull:org:hardis",
7028
- "hardis:org:packagexmlfull:generate",
7029
- "org:hardis:packagexmlfull:generate",
7030
- "org:packagexmlfull:hardis:generate",
7031
- "org:packagexmlfull:generate:hardis",
7032
- "hardis:packagexmlfull:org:generate",
7033
- "packagexmlfull:hardis:org:generate",
7034
- "packagexmlfull:org:hardis:generate",
7035
- "packagexmlfull:org:generate:hardis",
7036
- "hardis:packagexmlfull:generate:org",
7037
- "packagexmlfull:hardis:generate:org",
7038
- "packagexmlfull:generate:hardis:org",
7039
- "packagexmlfull:generate:org:hardis"
7048
+ "hardis:org:files:import",
7049
+ "org:hardis:files:import",
7050
+ "org:files:hardis:import",
7051
+ "org:files:import:hardis",
7052
+ "hardis:files:org:import",
7053
+ "files:hardis:org:import",
7054
+ "files:org:hardis:import",
7055
+ "files:org:import:hardis",
7056
+ "hardis:files:import:org",
7057
+ "files:hardis:import:org",
7058
+ "files:import:hardis:org",
7059
+ "files:import:org:hardis",
7060
+ "hardis:org:import:files",
7061
+ "org:hardis:import:files",
7062
+ "org:import:hardis:files",
7063
+ "org:import:files:hardis",
7064
+ "hardis:import:org:files",
7065
+ "import:hardis:org:files",
7066
+ "import:org:hardis:files",
7067
+ "import:org:files:hardis",
7068
+ "hardis:import:files:org",
7069
+ "import:hardis:files:org",
7070
+ "import:files:hardis:org",
7071
+ "import:files:org:hardis"
7040
7072
  ]
7041
7073
  },
7042
- "hardis:org:files:export": {
7074
+ "hardis:org:fix:listviewmine": {
7043
7075
  "aliases": [],
7044
7076
  "args": {},
7045
- "description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
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",
7046
7078
  "examples": [
7047
- "$ sf hardis:org:files:export"
7079
+ "$ sf hardis:org:fix:listviewmine",
7080
+ "$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
7048
7081
  ],
7049
7082
  "flags": {
7050
7083
  "json": {
@@ -7062,48 +7095,14 @@
7062
7095
  "multiple": false,
7063
7096
  "type": "option"
7064
7097
  },
7065
- "path": {
7066
- "char": "p",
7067
- "description": "Path to the file export project",
7068
- "name": "path",
7069
- "hasDynamicHelp": false,
7070
- "multiple": false,
7071
- "type": "option"
7072
- },
7073
- "chunksize": {
7074
- "char": "c",
7075
- "description": "Number of records to add in a chunk before it is processed",
7076
- "name": "chunksize",
7077
- "default": 1000,
7078
- "hasDynamicHelp": false,
7079
- "multiple": false,
7080
- "type": "option"
7081
- },
7082
- "polltimeout": {
7083
- "char": "t",
7084
- "description": "Timeout in MS for Bulk API calls",
7085
- "name": "polltimeout",
7086
- "default": 300000,
7087
- "hasDynamicHelp": false,
7088
- "multiple": false,
7089
- "type": "option"
7090
- },
7091
- "startchunknumber": {
7092
- "char": "s",
7093
- "description": "Chunk number to start from",
7094
- "name": "startchunknumber",
7095
- "default": 0,
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",
7096
7102
  "hasDynamicHelp": false,
7097
7103
  "multiple": false,
7098
7104
  "type": "option"
7099
7105
  },
7100
- "resume": {
7101
- "char": "r",
7102
- "description": "Resume previous export by checking existing files (default in CI)",
7103
- "name": "resume",
7104
- "allowNo": false,
7105
- "type": "boolean"
7106
- },
7107
7106
  "debug": {
7108
7107
  "char": "d",
7109
7108
  "description": "Activate debug mode (more logs)",
@@ -7142,57 +7141,59 @@
7142
7141
  },
7143
7142
  "hasDynamicHelp": true,
7144
7143
  "hiddenAliases": [],
7145
- "id": "hardis:org:files:export",
7144
+ "id": "hardis:org:fix:listviewmine",
7146
7145
  "pluginAlias": "sfdx-hardis",
7147
7146
  "pluginName": "sfdx-hardis",
7148
7147
  "pluginType": "core",
7149
7148
  "strict": true,
7150
7149
  "enableJsonFlag": true,
7151
- "title": "Export files",
7152
- "requiresProject": false,
7150
+ "title": "Fix listviews with ",
7151
+ "requiresProject": true,
7153
7152
  "isESM": true,
7154
7153
  "relativePath": [
7155
7154
  "lib",
7156
7155
  "commands",
7157
7156
  "hardis",
7158
7157
  "org",
7159
- "files",
7160
- "export.js"
7158
+ "fix",
7159
+ "listviewmine.js"
7161
7160
  ],
7162
7161
  "aliasPermutations": [],
7163
7162
  "permutations": [
7164
- "hardis:org:files:export",
7165
- "org:hardis:files:export",
7166
- "org:files:hardis:export",
7167
- "org:files:export:hardis",
7168
- "hardis:files:org:export",
7169
- "files:hardis:org:export",
7170
- "files:org:hardis:export",
7171
- "files:org:export:hardis",
7172
- "hardis:files:export:org",
7173
- "files:hardis:export:org",
7174
- "files:export:hardis:org",
7175
- "files:export:org:hardis",
7176
- "hardis:org:export:files",
7177
- "org:hardis:export:files",
7178
- "org:export:hardis:files",
7179
- "org:export:files:hardis",
7180
- "hardis:export:org:files",
7181
- "export:hardis:org:files",
7182
- "export:org:hardis:files",
7183
- "export:org:files:hardis",
7184
- "hardis:export:files:org",
7185
- "export:hardis:files:org",
7186
- "export:files:hardis:org",
7187
- "export:files:org:hardis"
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"
7188
7187
  ]
7189
7188
  },
7190
- "hardis:org:files:import": {
7189
+ "hardis:org:generate:packagexmlfull": {
7191
7190
  "aliases": [],
7192
7191
  "args": {},
7193
- "description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[![How to mass download notes and attachments files from a Salesforce org](https://github.com/hardisgroupcom/sfdx-hardis/raw/main/docs/assets/images/article-mass-download.jpg)](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
7192
+ "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",
7194
7193
  "examples": [
7195
- "$ sf hardis:org:files:import"
7194
+ "$ sf hardis:org:generate:packagexmlfull",
7195
+ "$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
7196
+ "$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
7196
7197
  ],
7197
7198
  "flags": {
7198
7199
  "json": {
@@ -7210,21 +7211,13 @@
7210
7211
  "multiple": false,
7211
7212
  "type": "option"
7212
7213
  },
7213
- "path": {
7214
- "char": "p",
7215
- "description": "Path to the file export project",
7216
- "name": "path",
7214
+ "outputfile": {
7215
+ "description": "Output package.xml file",
7216
+ "name": "outputfile",
7217
7217
  "hasDynamicHelp": false,
7218
7218
  "multiple": false,
7219
7219
  "type": "option"
7220
7220
  },
7221
- "overwrite": {
7222
- "char": "f",
7223
- "description": "Override existing files (doubles the number of API calls)",
7224
- "name": "overwrite",
7225
- "allowNo": false,
7226
- "type": "boolean"
7227
- },
7228
7221
  "debug": {
7229
7222
  "char": "d",
7230
7223
  "description": "Activate debug mode (more logs)",
@@ -7232,6 +7225,13 @@
7232
7225
  "allowNo": false,
7233
7226
  "type": "boolean"
7234
7227
  },
7228
+ "no-prompt": {
7229
+ "char": "n",
7230
+ "description": "Do not prompt for org username, use the default one",
7231
+ "name": "no-prompt",
7232
+ "allowNo": false,
7233
+ "type": "boolean"
7234
+ },
7235
7235
  "websocket": {
7236
7236
  "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
7237
7237
  "name": "websocket",
@@ -7263,13 +7263,13 @@
7263
7263
  },
7264
7264
  "hasDynamicHelp": true,
7265
7265
  "hiddenAliases": [],
7266
- "id": "hardis:org:files:import",
7266
+ "id": "hardis:org:generate:packagexmlfull",
7267
7267
  "pluginAlias": "sfdx-hardis",
7268
7268
  "pluginName": "sfdx-hardis",
7269
7269
  "pluginType": "core",
7270
7270
  "strict": true,
7271
7271
  "enableJsonFlag": true,
7272
- "title": "Import files",
7272
+ "title": "Generate Full Org package.xml",
7273
7273
  "requiresProject": false,
7274
7274
  "isESM": true,
7275
7275
  "relativePath": [
@@ -7277,35 +7277,35 @@
7277
7277
  "commands",
7278
7278
  "hardis",
7279
7279
  "org",
7280
- "files",
7281
- "import.js"
7280
+ "generate",
7281
+ "packagexmlfull.js"
7282
7282
  ],
7283
7283
  "aliasPermutations": [],
7284
7284
  "permutations": [
7285
- "hardis:org:files:import",
7286
- "org:hardis:files:import",
7287
- "org:files:hardis:import",
7288
- "org:files:import:hardis",
7289
- "hardis:files:org:import",
7290
- "files:hardis:org:import",
7291
- "files:org:hardis:import",
7292
- "files:org:import:hardis",
7293
- "hardis:files:import:org",
7294
- "files:hardis:import:org",
7295
- "files:import:hardis:org",
7296
- "files:import:org:hardis",
7297
- "hardis:org:import:files",
7298
- "org:hardis:import:files",
7299
- "org:import:hardis:files",
7300
- "org:import:files:hardis",
7301
- "hardis:import:org:files",
7302
- "import:hardis:org:files",
7303
- "import:org:hardis:files",
7304
- "import:org:files:hardis",
7305
- "hardis:import:files:org",
7306
- "import:hardis:files:org",
7307
- "import:files:hardis:org",
7308
- "import:files:org:hardis"
7285
+ "hardis:org:generate:packagexmlfull",
7286
+ "org:hardis:generate:packagexmlfull",
7287
+ "org:generate:hardis:packagexmlfull",
7288
+ "org:generate:packagexmlfull:hardis",
7289
+ "hardis:generate:org:packagexmlfull",
7290
+ "generate:hardis:org:packagexmlfull",
7291
+ "generate:org:hardis:packagexmlfull",
7292
+ "generate:org:packagexmlfull:hardis",
7293
+ "hardis:generate:packagexmlfull:org",
7294
+ "generate:hardis:packagexmlfull:org",
7295
+ "generate:packagexmlfull:hardis:org",
7296
+ "generate:packagexmlfull:org:hardis",
7297
+ "hardis:org:packagexmlfull:generate",
7298
+ "org:hardis:packagexmlfull:generate",
7299
+ "org:packagexmlfull:hardis:generate",
7300
+ "org:packagexmlfull:generate:hardis",
7301
+ "hardis:packagexmlfull:org:generate",
7302
+ "packagexmlfull:hardis:org:generate",
7303
+ "packagexmlfull:org:hardis:generate",
7304
+ "packagexmlfull:org:generate:hardis",
7305
+ "hardis:packagexmlfull:generate:org",
7306
+ "packagexmlfull:hardis:generate:org",
7307
+ "packagexmlfull:generate:hardis:org",
7308
+ "packagexmlfull:generate:org:hardis"
7309
7309
  ]
7310
7310
  },
7311
7311
  "hardis:org:monitor:all": {
@@ -9690,6 +9690,109 @@
9690
9690
  "remotesites:audit:project:hardis"
9691
9691
  ]
9692
9692
  },
9693
+ "hardis:project:convert:profilestopermsets": {
9694
+ "aliases": [],
9695
+ "args": {},
9696
+ "description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
9697
+ "examples": [
9698
+ "$ sf hardis:project:convert:profilestopermsets"
9699
+ ],
9700
+ "flags": {
9701
+ "json": {
9702
+ "description": "Format output as json.",
9703
+ "helpGroup": "GLOBAL",
9704
+ "name": "json",
9705
+ "allowNo": false,
9706
+ "type": "boolean"
9707
+ },
9708
+ "flags-dir": {
9709
+ "helpGroup": "GLOBAL",
9710
+ "name": "flags-dir",
9711
+ "summary": "Import flag values from a directory.",
9712
+ "hasDynamicHelp": false,
9713
+ "multiple": false,
9714
+ "type": "option"
9715
+ },
9716
+ "except": {
9717
+ "char": "e",
9718
+ "description": "List of filters",
9719
+ "name": "except",
9720
+ "default": [],
9721
+ "hasDynamicHelp": false,
9722
+ "multiple": true,
9723
+ "type": "option"
9724
+ },
9725
+ "debug": {
9726
+ "char": "d",
9727
+ "description": "Activate debug mode (more logs)",
9728
+ "name": "debug",
9729
+ "allowNo": false,
9730
+ "type": "boolean"
9731
+ },
9732
+ "websocket": {
9733
+ "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
9734
+ "name": "websocket",
9735
+ "hasDynamicHelp": false,
9736
+ "multiple": false,
9737
+ "type": "option"
9738
+ },
9739
+ "skipauth": {
9740
+ "description": "Skip authentication check when a default username is required",
9741
+ "name": "skipauth",
9742
+ "allowNo": false,
9743
+ "type": "boolean"
9744
+ }
9745
+ },
9746
+ "hasDynamicHelp": false,
9747
+ "hiddenAliases": [],
9748
+ "id": "hardis:project:convert:profilestopermsets",
9749
+ "pluginAlias": "sfdx-hardis",
9750
+ "pluginName": "sfdx-hardis",
9751
+ "pluginType": "core",
9752
+ "strict": true,
9753
+ "enableJsonFlag": true,
9754
+ "title": "Convert Profiles into Permission Sets",
9755
+ "requiresProject": true,
9756
+ "requiresSfdxPlugins": [
9757
+ "shane-sfdx-plugins"
9758
+ ],
9759
+ "isESM": true,
9760
+ "relativePath": [
9761
+ "lib",
9762
+ "commands",
9763
+ "hardis",
9764
+ "project",
9765
+ "convert",
9766
+ "profilestopermsets.js"
9767
+ ],
9768
+ "aliasPermutations": [],
9769
+ "permutations": [
9770
+ "hardis:project:convert:profilestopermsets",
9771
+ "project:hardis:convert:profilestopermsets",
9772
+ "project:convert:hardis:profilestopermsets",
9773
+ "project:convert:profilestopermsets:hardis",
9774
+ "hardis:convert:project:profilestopermsets",
9775
+ "convert:hardis:project:profilestopermsets",
9776
+ "convert:project:hardis:profilestopermsets",
9777
+ "convert:project:profilestopermsets:hardis",
9778
+ "hardis:convert:profilestopermsets:project",
9779
+ "convert:hardis:profilestopermsets:project",
9780
+ "convert:profilestopermsets:hardis:project",
9781
+ "convert:profilestopermsets:project:hardis",
9782
+ "hardis:project:profilestopermsets:convert",
9783
+ "project:hardis:profilestopermsets:convert",
9784
+ "project:profilestopermsets:hardis:convert",
9785
+ "project:profilestopermsets:convert:hardis",
9786
+ "hardis:profilestopermsets:project:convert",
9787
+ "profilestopermsets:hardis:project:convert",
9788
+ "profilestopermsets:project:hardis:convert",
9789
+ "profilestopermsets:project:convert:hardis",
9790
+ "hardis:profilestopermsets:convert:project",
9791
+ "profilestopermsets:hardis:convert:project",
9792
+ "profilestopermsets:convert:hardis:project",
9793
+ "profilestopermsets:convert:project:hardis"
9794
+ ]
9795
+ },
9693
9796
  "hardis:project:configure:auth": {
9694
9797
  "aliases": [],
9695
9798
  "args": {},
@@ -9819,109 +9922,6 @@
9819
9922
  "auth:configure:project:hardis"
9820
9923
  ]
9821
9924
  },
9822
- "hardis:project:convert:profilestopermsets": {
9823
- "aliases": [],
9824
- "args": {},
9825
- "description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
9826
- "examples": [
9827
- "$ sf hardis:project:convert:profilestopermsets"
9828
- ],
9829
- "flags": {
9830
- "json": {
9831
- "description": "Format output as json.",
9832
- "helpGroup": "GLOBAL",
9833
- "name": "json",
9834
- "allowNo": false,
9835
- "type": "boolean"
9836
- },
9837
- "flags-dir": {
9838
- "helpGroup": "GLOBAL",
9839
- "name": "flags-dir",
9840
- "summary": "Import flag values from a directory.",
9841
- "hasDynamicHelp": false,
9842
- "multiple": false,
9843
- "type": "option"
9844
- },
9845
- "except": {
9846
- "char": "e",
9847
- "description": "List of filters",
9848
- "name": "except",
9849
- "default": [],
9850
- "hasDynamicHelp": false,
9851
- "multiple": true,
9852
- "type": "option"
9853
- },
9854
- "debug": {
9855
- "char": "d",
9856
- "description": "Activate debug mode (more logs)",
9857
- "name": "debug",
9858
- "allowNo": false,
9859
- "type": "boolean"
9860
- },
9861
- "websocket": {
9862
- "description": "Websocket host:port for VsCode SFDX Hardis UI integration",
9863
- "name": "websocket",
9864
- "hasDynamicHelp": false,
9865
- "multiple": false,
9866
- "type": "option"
9867
- },
9868
- "skipauth": {
9869
- "description": "Skip authentication check when a default username is required",
9870
- "name": "skipauth",
9871
- "allowNo": false,
9872
- "type": "boolean"
9873
- }
9874
- },
9875
- "hasDynamicHelp": false,
9876
- "hiddenAliases": [],
9877
- "id": "hardis:project:convert:profilestopermsets",
9878
- "pluginAlias": "sfdx-hardis",
9879
- "pluginName": "sfdx-hardis",
9880
- "pluginType": "core",
9881
- "strict": true,
9882
- "enableJsonFlag": true,
9883
- "title": "Convert Profiles into Permission Sets",
9884
- "requiresProject": true,
9885
- "requiresSfdxPlugins": [
9886
- "shane-sfdx-plugins"
9887
- ],
9888
- "isESM": true,
9889
- "relativePath": [
9890
- "lib",
9891
- "commands",
9892
- "hardis",
9893
- "project",
9894
- "convert",
9895
- "profilestopermsets.js"
9896
- ],
9897
- "aliasPermutations": [],
9898
- "permutations": [
9899
- "hardis:project:convert:profilestopermsets",
9900
- "project:hardis:convert:profilestopermsets",
9901
- "project:convert:hardis:profilestopermsets",
9902
- "project:convert:profilestopermsets:hardis",
9903
- "hardis:convert:project:profilestopermsets",
9904
- "convert:hardis:project:profilestopermsets",
9905
- "convert:project:hardis:profilestopermsets",
9906
- "convert:project:profilestopermsets:hardis",
9907
- "hardis:convert:profilestopermsets:project",
9908
- "convert:hardis:profilestopermsets:project",
9909
- "convert:profilestopermsets:hardis:project",
9910
- "convert:profilestopermsets:project:hardis",
9911
- "hardis:project:profilestopermsets:convert",
9912
- "project:hardis:profilestopermsets:convert",
9913
- "project:profilestopermsets:hardis:convert",
9914
- "project:profilestopermsets:convert:hardis",
9915
- "hardis:profilestopermsets:project:convert",
9916
- "profilestopermsets:hardis:project:convert",
9917
- "profilestopermsets:project:hardis:convert",
9918
- "profilestopermsets:project:convert:hardis",
9919
- "hardis:profilestopermsets:convert:project",
9920
- "profilestopermsets:hardis:convert:project",
9921
- "profilestopermsets:convert:hardis:project",
9922
- "profilestopermsets:convert:project:hardis"
9923
- ]
9924
- },
9925
9925
  "hardis:project:clean:emptyitems": {
9926
9926
  "aliases": [],
9927
9927
  "args": {},
@@ -15370,5 +15370,5 @@
15370
15370
  ]
15371
15371
  }
15372
15372
  },
15373
- "version": "6.9.1-alpha202510261312.0"
15373
+ "version": "6.9.1-alpha202510261844.0"
15374
15374
  }