sfdx-hardis 6.4.1-beta202509082207.0 → 6.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -1
- package/lib/commands/hardis/org/files/export.js +12 -1
- package/lib/commands/hardis/org/files/export.js.map +1 -1
- package/lib/commands/hardis/org/files/import.js +4 -2
- package/lib/commands/hardis/org/files/import.js.map +1 -1
- package/lib/commands/hardis/work/save.js +1 -1
- package/lib/commands/hardis/work/save.js.map +1 -1
- package/lib/common/utils/apiUtils.js +8 -3
- package/lib/common/utils/apiUtils.js.map +1 -1
- package/lib/common/utils/filesUtils.d.ts +48 -13
- package/lib/common/utils/filesUtils.js +379 -77
- package/lib/common/utils/filesUtils.js.map +1 -1
- package/lib/common/utils/index.d.ts +4 -0
- package/lib/common/utils/index.js +9 -0
- package/lib/common/utils/index.js.map +1 -1
- package/lib/common/websocketClient.d.ts +3 -0
- package/lib/common/websocketClient.js +23 -0
- package/lib/common/websocketClient.js.map +1 -1
- package/oclif.lock +39 -39
- package/oclif.manifest.json +677 -677
- package/package.json +6 -6
package/oclif.manifest.json
CHANGED
|
@@ -132,12 +132,13 @@
|
|
|
132
132
|
"clear:cache:hardis"
|
|
133
133
|
]
|
|
134
134
|
},
|
|
135
|
-
"hardis:
|
|
135
|
+
"hardis:auth:login": {
|
|
136
136
|
"aliases": [],
|
|
137
137
|
"args": {},
|
|
138
|
-
"description": "\n## Command Behavior\n\n**
|
|
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",
|
|
139
139
|
"examples": [
|
|
140
|
-
"$ sf hardis:
|
|
140
|
+
"$ sf hardis:auth:login",
|
|
141
|
+
"CI=true sf hardis:auth:login"
|
|
141
142
|
],
|
|
142
143
|
"flags": {
|
|
143
144
|
"json": {
|
|
@@ -155,20 +156,28 @@
|
|
|
155
156
|
"multiple": false,
|
|
156
157
|
"type": "option"
|
|
157
158
|
},
|
|
158
|
-
"
|
|
159
|
-
"char": "
|
|
160
|
-
"description": "
|
|
161
|
-
"name": "
|
|
162
|
-
"default": "project",
|
|
159
|
+
"instanceurl": {
|
|
160
|
+
"char": "r",
|
|
161
|
+
"description": "URL of org instance",
|
|
162
|
+
"name": "instanceurl",
|
|
163
163
|
"hasDynamicHelp": false,
|
|
164
164
|
"multiple": false,
|
|
165
|
-
"options": [
|
|
166
|
-
"project",
|
|
167
|
-
"branch",
|
|
168
|
-
"user"
|
|
169
|
-
],
|
|
170
165
|
"type": "option"
|
|
171
166
|
},
|
|
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
|
+
},
|
|
172
181
|
"debug": {
|
|
173
182
|
"char": "d",
|
|
174
183
|
"description": "Activate debug mode (more logs)",
|
|
@@ -192,39 +201,38 @@
|
|
|
192
201
|
},
|
|
193
202
|
"hasDynamicHelp": false,
|
|
194
203
|
"hiddenAliases": [],
|
|
195
|
-
"id": "hardis:
|
|
204
|
+
"id": "hardis:auth:login",
|
|
196
205
|
"pluginAlias": "sfdx-hardis",
|
|
197
206
|
"pluginName": "sfdx-hardis",
|
|
198
207
|
"pluginType": "core",
|
|
199
208
|
"strict": true,
|
|
200
209
|
"enableJsonFlag": true,
|
|
201
|
-
"title": "
|
|
210
|
+
"title": "Login",
|
|
202
211
|
"requiresProject": false,
|
|
203
212
|
"isESM": true,
|
|
204
213
|
"relativePath": [
|
|
205
214
|
"lib",
|
|
206
215
|
"commands",
|
|
207
216
|
"hardis",
|
|
208
|
-
"
|
|
209
|
-
"
|
|
217
|
+
"auth",
|
|
218
|
+
"login.js"
|
|
210
219
|
],
|
|
211
220
|
"aliasPermutations": [],
|
|
212
221
|
"permutations": [
|
|
213
|
-
"hardis:
|
|
214
|
-
"
|
|
215
|
-
"
|
|
216
|
-
"hardis:
|
|
217
|
-
"
|
|
218
|
-
"
|
|
222
|
+
"hardis:auth:login",
|
|
223
|
+
"auth:hardis:login",
|
|
224
|
+
"auth:login:hardis",
|
|
225
|
+
"hardis:login:auth",
|
|
226
|
+
"login:hardis:auth",
|
|
227
|
+
"login:auth:hardis"
|
|
219
228
|
]
|
|
220
229
|
},
|
|
221
|
-
"hardis:
|
|
230
|
+
"hardis:config:get": {
|
|
222
231
|
"aliases": [],
|
|
223
232
|
"args": {},
|
|
224
|
-
"description": "\n## Command Behavior\n\n**
|
|
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",
|
|
225
234
|
"examples": [
|
|
226
|
-
"$ sf hardis:
|
|
227
|
-
"CI=true sf hardis:auth:login"
|
|
235
|
+
"$ sf hardis:project:deploy:sources:metadata"
|
|
228
236
|
],
|
|
229
237
|
"flags": {
|
|
230
238
|
"json": {
|
|
@@ -242,28 +250,20 @@
|
|
|
242
250
|
"multiple": false,
|
|
243
251
|
"type": "option"
|
|
244
252
|
},
|
|
245
|
-
"
|
|
246
|
-
"char": "
|
|
247
|
-
"description": "
|
|
248
|
-
"name": "
|
|
253
|
+
"level": {
|
|
254
|
+
"char": "l",
|
|
255
|
+
"description": "project,branch or user",
|
|
256
|
+
"name": "level",
|
|
257
|
+
"default": "project",
|
|
249
258
|
"hasDynamicHelp": false,
|
|
250
259
|
"multiple": false,
|
|
260
|
+
"options": [
|
|
261
|
+
"project",
|
|
262
|
+
"branch",
|
|
263
|
+
"user"
|
|
264
|
+
],
|
|
251
265
|
"type": "option"
|
|
252
266
|
},
|
|
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:
|
|
290
|
+
"id": "hardis:config:get",
|
|
291
291
|
"pluginAlias": "sfdx-hardis",
|
|
292
292
|
"pluginName": "sfdx-hardis",
|
|
293
293
|
"pluginType": "core",
|
|
294
294
|
"strict": true,
|
|
295
295
|
"enableJsonFlag": true,
|
|
296
|
-
"title": "
|
|
296
|
+
"title": "Deploy metadata sources to org",
|
|
297
297
|
"requiresProject": false,
|
|
298
298
|
"isESM": true,
|
|
299
299
|
"relativePath": [
|
|
300
300
|
"lib",
|
|
301
301
|
"commands",
|
|
302
302
|
"hardis",
|
|
303
|
-
"
|
|
304
|
-
"
|
|
303
|
+
"config",
|
|
304
|
+
"get.js"
|
|
305
305
|
],
|
|
306
306
|
"aliasPermutations": [],
|
|
307
307
|
"permutations": [
|
|
308
|
-
"hardis:
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"hardis:
|
|
312
|
-
"
|
|
313
|
-
"
|
|
308
|
+
"hardis:config:get",
|
|
309
|
+
"config:hardis:get",
|
|
310
|
+
"config:get:hardis",
|
|
311
|
+
"hardis:get:config",
|
|
312
|
+
"get:hardis:config",
|
|
313
|
+
"get:config:hardis"
|
|
314
314
|
]
|
|
315
315
|
},
|
|
316
316
|
"hardis:doc:fieldusage": {
|
|
@@ -5538,121 +5538,6 @@
|
|
|
5538
5538
|
"import:data:org:hardis"
|
|
5539
5539
|
]
|
|
5540
5540
|
},
|
|
5541
|
-
"hardis:org:fix:listviewmine": {
|
|
5542
|
-
"aliases": [],
|
|
5543
|
-
"args": {},
|
|
5544
|
-
"description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[](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",
|
|
5545
|
-
"examples": [
|
|
5546
|
-
"$ sf hardis:org:fix:listviewmine",
|
|
5547
|
-
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
5548
|
-
],
|
|
5549
|
-
"flags": {
|
|
5550
|
-
"json": {
|
|
5551
|
-
"description": "Format output as json.",
|
|
5552
|
-
"helpGroup": "GLOBAL",
|
|
5553
|
-
"name": "json",
|
|
5554
|
-
"allowNo": false,
|
|
5555
|
-
"type": "boolean"
|
|
5556
|
-
},
|
|
5557
|
-
"flags-dir": {
|
|
5558
|
-
"helpGroup": "GLOBAL",
|
|
5559
|
-
"name": "flags-dir",
|
|
5560
|
-
"summary": "Import flag values from a directory.",
|
|
5561
|
-
"hasDynamicHelp": false,
|
|
5562
|
-
"multiple": false,
|
|
5563
|
-
"type": "option"
|
|
5564
|
-
},
|
|
5565
|
-
"listviews": {
|
|
5566
|
-
"char": "l",
|
|
5567
|
-
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
5568
|
-
"name": "listviews",
|
|
5569
|
-
"hasDynamicHelp": false,
|
|
5570
|
-
"multiple": false,
|
|
5571
|
-
"type": "option"
|
|
5572
|
-
},
|
|
5573
|
-
"debug": {
|
|
5574
|
-
"char": "d",
|
|
5575
|
-
"description": "Activate debug mode (more logs)",
|
|
5576
|
-
"name": "debug",
|
|
5577
|
-
"allowNo": false,
|
|
5578
|
-
"type": "boolean"
|
|
5579
|
-
},
|
|
5580
|
-
"websocket": {
|
|
5581
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5582
|
-
"name": "websocket",
|
|
5583
|
-
"hasDynamicHelp": false,
|
|
5584
|
-
"multiple": false,
|
|
5585
|
-
"type": "option"
|
|
5586
|
-
},
|
|
5587
|
-
"skipauth": {
|
|
5588
|
-
"description": "Skip authentication check when a default username is required",
|
|
5589
|
-
"name": "skipauth",
|
|
5590
|
-
"allowNo": false,
|
|
5591
|
-
"type": "boolean"
|
|
5592
|
-
},
|
|
5593
|
-
"target-org": {
|
|
5594
|
-
"aliases": [
|
|
5595
|
-
"targetusername",
|
|
5596
|
-
"u"
|
|
5597
|
-
],
|
|
5598
|
-
"char": "o",
|
|
5599
|
-
"deprecateAliases": true,
|
|
5600
|
-
"name": "target-org",
|
|
5601
|
-
"noCacheDefault": true,
|
|
5602
|
-
"required": true,
|
|
5603
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
5604
|
-
"hasDynamicHelp": true,
|
|
5605
|
-
"multiple": false,
|
|
5606
|
-
"type": "option"
|
|
5607
|
-
}
|
|
5608
|
-
},
|
|
5609
|
-
"hasDynamicHelp": true,
|
|
5610
|
-
"hiddenAliases": [],
|
|
5611
|
-
"id": "hardis:org:fix:listviewmine",
|
|
5612
|
-
"pluginAlias": "sfdx-hardis",
|
|
5613
|
-
"pluginName": "sfdx-hardis",
|
|
5614
|
-
"pluginType": "core",
|
|
5615
|
-
"strict": true,
|
|
5616
|
-
"enableJsonFlag": true,
|
|
5617
|
-
"title": "Fix listviews with ",
|
|
5618
|
-
"requiresProject": true,
|
|
5619
|
-
"isESM": true,
|
|
5620
|
-
"relativePath": [
|
|
5621
|
-
"lib",
|
|
5622
|
-
"commands",
|
|
5623
|
-
"hardis",
|
|
5624
|
-
"org",
|
|
5625
|
-
"fix",
|
|
5626
|
-
"listviewmine.js"
|
|
5627
|
-
],
|
|
5628
|
-
"aliasPermutations": [],
|
|
5629
|
-
"permutations": [
|
|
5630
|
-
"hardis:org:fix:listviewmine",
|
|
5631
|
-
"org:hardis:fix:listviewmine",
|
|
5632
|
-
"org:fix:hardis:listviewmine",
|
|
5633
|
-
"org:fix:listviewmine:hardis",
|
|
5634
|
-
"hardis:fix:org:listviewmine",
|
|
5635
|
-
"fix:hardis:org:listviewmine",
|
|
5636
|
-
"fix:org:hardis:listviewmine",
|
|
5637
|
-
"fix:org:listviewmine:hardis",
|
|
5638
|
-
"hardis:fix:listviewmine:org",
|
|
5639
|
-
"fix:hardis:listviewmine:org",
|
|
5640
|
-
"fix:listviewmine:hardis:org",
|
|
5641
|
-
"fix:listviewmine:org:hardis",
|
|
5642
|
-
"hardis:org:listviewmine:fix",
|
|
5643
|
-
"org:hardis:listviewmine:fix",
|
|
5644
|
-
"org:listviewmine:hardis:fix",
|
|
5645
|
-
"org:listviewmine:fix:hardis",
|
|
5646
|
-
"hardis:listviewmine:org:fix",
|
|
5647
|
-
"listviewmine:hardis:org:fix",
|
|
5648
|
-
"listviewmine:org:hardis:fix",
|
|
5649
|
-
"listviewmine:org:fix:hardis",
|
|
5650
|
-
"hardis:listviewmine:fix:org",
|
|
5651
|
-
"listviewmine:hardis:fix:org",
|
|
5652
|
-
"listviewmine:fix:hardis:org",
|
|
5653
|
-
"listviewmine:fix:org:hardis"
|
|
5654
|
-
]
|
|
5655
|
-
},
|
|
5656
5541
|
"hardis:org:diagnose:audittrail": {
|
|
5657
5542
|
"aliases": [],
|
|
5658
5543
|
"args": {},
|
|
@@ -6916,14 +6801,12 @@
|
|
|
6916
6801
|
"unusedusers:diagnose:org:hardis"
|
|
6917
6802
|
]
|
|
6918
6803
|
},
|
|
6919
|
-
"hardis:org:
|
|
6804
|
+
"hardis:org:files:export": {
|
|
6920
6805
|
"aliases": [],
|
|
6921
6806
|
"args": {},
|
|
6922
|
-
"description": "\n## Command Behavior\n\n**
|
|
6807
|
+
"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, and output naming conventions.\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[](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.\n- **File Download:** Downloads the actual file content from Salesforce.\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 and `promptFilesExportConfiguration` for customizing export options.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues or API limits.\n</details>\n",
|
|
6923
6808
|
"examples": [
|
|
6924
|
-
"$ sf hardis:org:
|
|
6925
|
-
"$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
|
|
6926
|
-
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
6809
|
+
"$ sf hardis:org:files:export"
|
|
6927
6810
|
],
|
|
6928
6811
|
"flags": {
|
|
6929
6812
|
"json": {
|
|
@@ -6941,142 +6824,22 @@
|
|
|
6941
6824
|
"multiple": false,
|
|
6942
6825
|
"type": "option"
|
|
6943
6826
|
},
|
|
6944
|
-
"
|
|
6945
|
-
"
|
|
6946
|
-
"
|
|
6827
|
+
"path": {
|
|
6828
|
+
"char": "p",
|
|
6829
|
+
"description": "Path to the file export project",
|
|
6830
|
+
"name": "path",
|
|
6947
6831
|
"hasDynamicHelp": false,
|
|
6948
6832
|
"multiple": false,
|
|
6949
6833
|
"type": "option"
|
|
6950
6834
|
},
|
|
6951
|
-
"
|
|
6952
|
-
"char": "
|
|
6953
|
-
"description": "
|
|
6954
|
-
"name": "
|
|
6955
|
-
"
|
|
6956
|
-
"
|
|
6957
|
-
|
|
6958
|
-
|
|
6959
|
-
"char": "n",
|
|
6960
|
-
"description": "Do not prompt for org username, use the default one",
|
|
6961
|
-
"name": "no-prompt",
|
|
6962
|
-
"allowNo": false,
|
|
6963
|
-
"type": "boolean"
|
|
6964
|
-
},
|
|
6965
|
-
"websocket": {
|
|
6966
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
6967
|
-
"name": "websocket",
|
|
6968
|
-
"hasDynamicHelp": false,
|
|
6969
|
-
"multiple": false,
|
|
6970
|
-
"type": "option"
|
|
6971
|
-
},
|
|
6972
|
-
"skipauth": {
|
|
6973
|
-
"description": "Skip authentication check when a default username is required",
|
|
6974
|
-
"name": "skipauth",
|
|
6975
|
-
"allowNo": false,
|
|
6976
|
-
"type": "boolean"
|
|
6977
|
-
},
|
|
6978
|
-
"target-org": {
|
|
6979
|
-
"aliases": [
|
|
6980
|
-
"targetusername",
|
|
6981
|
-
"u"
|
|
6982
|
-
],
|
|
6983
|
-
"char": "o",
|
|
6984
|
-
"deprecateAliases": true,
|
|
6985
|
-
"name": "target-org",
|
|
6986
|
-
"noCacheDefault": true,
|
|
6987
|
-
"required": true,
|
|
6988
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
6989
|
-
"hasDynamicHelp": true,
|
|
6990
|
-
"multiple": false,
|
|
6991
|
-
"type": "option"
|
|
6992
|
-
}
|
|
6993
|
-
},
|
|
6994
|
-
"hasDynamicHelp": true,
|
|
6995
|
-
"hiddenAliases": [],
|
|
6996
|
-
"id": "hardis:org:generate:packagexmlfull",
|
|
6997
|
-
"pluginAlias": "sfdx-hardis",
|
|
6998
|
-
"pluginName": "sfdx-hardis",
|
|
6999
|
-
"pluginType": "core",
|
|
7000
|
-
"strict": true,
|
|
7001
|
-
"enableJsonFlag": true,
|
|
7002
|
-
"title": "Generate Full Org package.xml",
|
|
7003
|
-
"requiresProject": false,
|
|
7004
|
-
"isESM": true,
|
|
7005
|
-
"relativePath": [
|
|
7006
|
-
"lib",
|
|
7007
|
-
"commands",
|
|
7008
|
-
"hardis",
|
|
7009
|
-
"org",
|
|
7010
|
-
"generate",
|
|
7011
|
-
"packagexmlfull.js"
|
|
7012
|
-
],
|
|
7013
|
-
"aliasPermutations": [],
|
|
7014
|
-
"permutations": [
|
|
7015
|
-
"hardis:org:generate:packagexmlfull",
|
|
7016
|
-
"org:hardis:generate:packagexmlfull",
|
|
7017
|
-
"org:generate:hardis:packagexmlfull",
|
|
7018
|
-
"org:generate:packagexmlfull:hardis",
|
|
7019
|
-
"hardis:generate:org:packagexmlfull",
|
|
7020
|
-
"generate:hardis:org:packagexmlfull",
|
|
7021
|
-
"generate:org:hardis:packagexmlfull",
|
|
7022
|
-
"generate:org:packagexmlfull:hardis",
|
|
7023
|
-
"hardis:generate:packagexmlfull:org",
|
|
7024
|
-
"generate:hardis:packagexmlfull:org",
|
|
7025
|
-
"generate:packagexmlfull:hardis:org",
|
|
7026
|
-
"generate:packagexmlfull:org:hardis",
|
|
7027
|
-
"hardis:org:packagexmlfull:generate",
|
|
7028
|
-
"org:hardis:packagexmlfull:generate",
|
|
7029
|
-
"org:packagexmlfull:hardis:generate",
|
|
7030
|
-
"org:packagexmlfull:generate:hardis",
|
|
7031
|
-
"hardis:packagexmlfull:org:generate",
|
|
7032
|
-
"packagexmlfull:hardis:org:generate",
|
|
7033
|
-
"packagexmlfull:org:hardis:generate",
|
|
7034
|
-
"packagexmlfull:org:generate:hardis",
|
|
7035
|
-
"hardis:packagexmlfull:generate:org",
|
|
7036
|
-
"packagexmlfull:hardis:generate:org",
|
|
7037
|
-
"packagexmlfull:generate:hardis:org",
|
|
7038
|
-
"packagexmlfull:generate:org:hardis"
|
|
7039
|
-
]
|
|
7040
|
-
},
|
|
7041
|
-
"hardis:org:files:export": {
|
|
7042
|
-
"aliases": [],
|
|
7043
|
-
"args": {},
|
|
7044
|
-
"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, and output naming conventions.\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[](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.\n- **File Download:** Downloads the actual file content from Salesforce.\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 and `promptFilesExportConfiguration` for customizing export options.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues or API limits.\n</details>\n",
|
|
7045
|
-
"examples": [
|
|
7046
|
-
"$ sf hardis:org:files:export"
|
|
7047
|
-
],
|
|
7048
|
-
"flags": {
|
|
7049
|
-
"json": {
|
|
7050
|
-
"description": "Format output as json.",
|
|
7051
|
-
"helpGroup": "GLOBAL",
|
|
7052
|
-
"name": "json",
|
|
7053
|
-
"allowNo": false,
|
|
7054
|
-
"type": "boolean"
|
|
7055
|
-
},
|
|
7056
|
-
"flags-dir": {
|
|
7057
|
-
"helpGroup": "GLOBAL",
|
|
7058
|
-
"name": "flags-dir",
|
|
7059
|
-
"summary": "Import flag values from a directory.",
|
|
7060
|
-
"hasDynamicHelp": false,
|
|
7061
|
-
"multiple": false,
|
|
7062
|
-
"type": "option"
|
|
7063
|
-
},
|
|
7064
|
-
"path": {
|
|
7065
|
-
"char": "p",
|
|
7066
|
-
"description": "Path to the file export project",
|
|
7067
|
-
"name": "path",
|
|
7068
|
-
"hasDynamicHelp": false,
|
|
7069
|
-
"multiple": false,
|
|
7070
|
-
"type": "option"
|
|
7071
|
-
},
|
|
7072
|
-
"chunksize": {
|
|
7073
|
-
"char": "c",
|
|
7074
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
7075
|
-
"name": "chunksize",
|
|
7076
|
-
"default": 1000,
|
|
7077
|
-
"hasDynamicHelp": false,
|
|
7078
|
-
"multiple": false,
|
|
7079
|
-
"type": "option"
|
|
6835
|
+
"chunksize": {
|
|
6836
|
+
"char": "c",
|
|
6837
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
6838
|
+
"name": "chunksize",
|
|
6839
|
+
"default": 1000,
|
|
6840
|
+
"hasDynamicHelp": false,
|
|
6841
|
+
"multiple": false,
|
|
6842
|
+
"type": "option"
|
|
7080
6843
|
},
|
|
7081
6844
|
"polltimeout": {
|
|
7082
6845
|
"char": "t",
|
|
@@ -7300,12 +7063,13 @@
|
|
|
7300
7063
|
"import:files:org:hardis"
|
|
7301
7064
|
]
|
|
7302
7065
|
},
|
|
7303
|
-
"hardis:org:
|
|
7066
|
+
"hardis:org:fix:listviewmine": {
|
|
7304
7067
|
"aliases": [],
|
|
7305
7068
|
"args": {},
|
|
7306
|
-
"description": "
|
|
7069
|
+
"description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[](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",
|
|
7307
7070
|
"examples": [
|
|
7308
|
-
"$ sf hardis:org:
|
|
7071
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
7072
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
7309
7073
|
],
|
|
7310
7074
|
"flags": {
|
|
7311
7075
|
"json": {
|
|
@@ -7323,6 +7087,14 @@
|
|
|
7323
7087
|
"multiple": false,
|
|
7324
7088
|
"type": "option"
|
|
7325
7089
|
},
|
|
7090
|
+
"listviews": {
|
|
7091
|
+
"char": "l",
|
|
7092
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
7093
|
+
"name": "listviews",
|
|
7094
|
+
"hasDynamicHelp": false,
|
|
7095
|
+
"multiple": false,
|
|
7096
|
+
"type": "option"
|
|
7097
|
+
},
|
|
7326
7098
|
"debug": {
|
|
7327
7099
|
"char": "d",
|
|
7328
7100
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7361,159 +7133,59 @@
|
|
|
7361
7133
|
},
|
|
7362
7134
|
"hasDynamicHelp": true,
|
|
7363
7135
|
"hiddenAliases": [],
|
|
7364
|
-
"id": "hardis:org:
|
|
7136
|
+
"id": "hardis:org:fix:listviewmine",
|
|
7365
7137
|
"pluginAlias": "sfdx-hardis",
|
|
7366
7138
|
"pluginName": "sfdx-hardis",
|
|
7367
7139
|
"pluginType": "core",
|
|
7368
7140
|
"strict": true,
|
|
7369
7141
|
"enableJsonFlag": true,
|
|
7370
|
-
"title": "
|
|
7371
|
-
"monitoringCommandsDefault": [
|
|
7372
|
-
{
|
|
7373
|
-
"key": "AUDIT_TRAIL",
|
|
7374
|
-
"title": "Detect suspect setup actions in major org",
|
|
7375
|
-
"command": "sf hardis:org:diagnose:audittrail",
|
|
7376
|
-
"frequency": "daily"
|
|
7377
|
-
},
|
|
7378
|
-
{
|
|
7379
|
-
"key": "LEGACY_API",
|
|
7380
|
-
"title": "Detect calls to deprecated API versions",
|
|
7381
|
-
"command": "sf hardis:org:diagnose:legacyapi",
|
|
7382
|
-
"frequency": "daily"
|
|
7383
|
-
},
|
|
7384
|
-
{
|
|
7385
|
-
"key": "ORG_LIMITS",
|
|
7386
|
-
"title": "Detect if org limits are close to be reached",
|
|
7387
|
-
"command": "sf hardis:org:monitor:limits",
|
|
7388
|
-
"frequency": "daily"
|
|
7389
|
-
},
|
|
7390
|
-
{
|
|
7391
|
-
"key": "UNSECURED_CONNECTED_APPS",
|
|
7392
|
-
"title": "Detect unsecured Connected Apps in an org",
|
|
7393
|
-
"command": "sf hardis:org:diagnose:unsecure-connected-apps",
|
|
7394
|
-
"frequency": "daily"
|
|
7395
|
-
},
|
|
7396
|
-
{
|
|
7397
|
-
"key": "LICENSES",
|
|
7398
|
-
"title": "Extract licenses information",
|
|
7399
|
-
"command": "sf hardis:org:diagnose:licenses",
|
|
7400
|
-
"frequency": "weekly"
|
|
7401
|
-
},
|
|
7402
|
-
{
|
|
7403
|
-
"key": "LINT_ACCESS",
|
|
7404
|
-
"title": "Detect custom elements with no access rights defined in permission sets",
|
|
7405
|
-
"command": "sf hardis:lint:access",
|
|
7406
|
-
"frequency": "weekly"
|
|
7407
|
-
},
|
|
7408
|
-
{
|
|
7409
|
-
"key": "UNUSED_LICENSES",
|
|
7410
|
-
"title": "Detect permission set licenses that are assigned to users that do not need them",
|
|
7411
|
-
"command": "sf hardis:org:diagnose:unusedlicenses",
|
|
7412
|
-
"frequency": "weekly"
|
|
7413
|
-
},
|
|
7414
|
-
{
|
|
7415
|
-
"key": "UNUSED_USERS",
|
|
7416
|
-
"title": "Detect active users without recent logins",
|
|
7417
|
-
"command": "sf hardis:org:diagnose:unusedusers",
|
|
7418
|
-
"frequency": "weekly"
|
|
7419
|
-
},
|
|
7420
|
-
{
|
|
7421
|
-
"key": "ACTIVE_USERS",
|
|
7422
|
-
"title": "Detect active users with recent logins",
|
|
7423
|
-
"command": "sf hardis:org:diagnose:unusedusers --returnactiveusers",
|
|
7424
|
-
"frequency": "weekly"
|
|
7425
|
-
},
|
|
7426
|
-
{
|
|
7427
|
-
"key": "ORG_INFO",
|
|
7428
|
-
"title": "Get org info + SF instance info + next major upgrade date",
|
|
7429
|
-
"command": "sf hardis:org:diagnose:instanceupgrade",
|
|
7430
|
-
"frequency": "weekly"
|
|
7431
|
-
},
|
|
7432
|
-
{
|
|
7433
|
-
"key": "RELEASE_UPDATES",
|
|
7434
|
-
"title": "Gather warnings about incoming and overdue Release Updates",
|
|
7435
|
-
"command": "sf hardis:org:diagnose:releaseupdates",
|
|
7436
|
-
"frequency": "weekly"
|
|
7437
|
-
},
|
|
7438
|
-
{
|
|
7439
|
-
"key": "UNUSED_METADATAS",
|
|
7440
|
-
"title": "Detect custom labels and custom permissions that are not in use",
|
|
7441
|
-
"command": "sf hardis:lint:unusedmetadatas",
|
|
7442
|
-
"frequency": "weekly"
|
|
7443
|
-
},
|
|
7444
|
-
{
|
|
7445
|
-
"key": "UNUSED_APEX_CLASSES",
|
|
7446
|
-
"title": "Detect unused Apex classes in an org",
|
|
7447
|
-
"command": "sf hardis:org:diagnose:unused-apex-classes",
|
|
7448
|
-
"frequency": "weekly"
|
|
7449
|
-
},
|
|
7450
|
-
{
|
|
7451
|
-
"key": "CONNECTED_APPS",
|
|
7452
|
-
"title": "Detect unused Connected Apps in an org",
|
|
7453
|
-
"command": "sf hardis:org:diagnose:unused-connected-apps",
|
|
7454
|
-
"frequency": "weekly"
|
|
7455
|
-
},
|
|
7456
|
-
{
|
|
7457
|
-
"key": "METADATA_STATUS",
|
|
7458
|
-
"title": "Detect inactive metadata",
|
|
7459
|
-
"command": "sf hardis:lint:metadatastatus",
|
|
7460
|
-
"frequency": "weekly"
|
|
7461
|
-
},
|
|
7462
|
-
{
|
|
7463
|
-
"key": "MISSING_ATTRIBUTES",
|
|
7464
|
-
"title": "Detect missing description on custom field",
|
|
7465
|
-
"command": "sf hardis:lint:missingattributes",
|
|
7466
|
-
"frequency": "weekly"
|
|
7467
|
-
}
|
|
7468
|
-
],
|
|
7142
|
+
"title": "Fix listviews with ",
|
|
7469
7143
|
"requiresProject": true,
|
|
7470
|
-
"triggerNotification": true,
|
|
7471
7144
|
"isESM": true,
|
|
7472
7145
|
"relativePath": [
|
|
7473
7146
|
"lib",
|
|
7474
7147
|
"commands",
|
|
7475
7148
|
"hardis",
|
|
7476
7149
|
"org",
|
|
7477
|
-
"
|
|
7478
|
-
"
|
|
7150
|
+
"fix",
|
|
7151
|
+
"listviewmine.js"
|
|
7479
7152
|
],
|
|
7480
7153
|
"aliasPermutations": [],
|
|
7481
7154
|
"permutations": [
|
|
7482
|
-
"hardis:org:
|
|
7483
|
-
"org:hardis:
|
|
7484
|
-
"org:
|
|
7485
|
-
"org:
|
|
7486
|
-
"hardis:
|
|
7487
|
-
"
|
|
7488
|
-
"
|
|
7489
|
-
"
|
|
7490
|
-
"hardis:
|
|
7491
|
-
"
|
|
7492
|
-
"
|
|
7493
|
-
"
|
|
7494
|
-
"hardis:org:
|
|
7495
|
-
"org:hardis:
|
|
7496
|
-
"org:
|
|
7497
|
-
"org:
|
|
7498
|
-
"hardis:
|
|
7499
|
-
"
|
|
7500
|
-
"
|
|
7501
|
-
"
|
|
7502
|
-
"hardis:
|
|
7503
|
-
"
|
|
7504
|
-
"
|
|
7505
|
-
"
|
|
7155
|
+
"hardis:org:fix:listviewmine",
|
|
7156
|
+
"org:hardis:fix:listviewmine",
|
|
7157
|
+
"org:fix:hardis:listviewmine",
|
|
7158
|
+
"org:fix:listviewmine:hardis",
|
|
7159
|
+
"hardis:fix:org:listviewmine",
|
|
7160
|
+
"fix:hardis:org:listviewmine",
|
|
7161
|
+
"fix:org:hardis:listviewmine",
|
|
7162
|
+
"fix:org:listviewmine:hardis",
|
|
7163
|
+
"hardis:fix:listviewmine:org",
|
|
7164
|
+
"fix:hardis:listviewmine:org",
|
|
7165
|
+
"fix:listviewmine:hardis:org",
|
|
7166
|
+
"fix:listviewmine:org:hardis",
|
|
7167
|
+
"hardis:org:listviewmine:fix",
|
|
7168
|
+
"org:hardis:listviewmine:fix",
|
|
7169
|
+
"org:listviewmine:hardis:fix",
|
|
7170
|
+
"org:listviewmine:fix:hardis",
|
|
7171
|
+
"hardis:listviewmine:org:fix",
|
|
7172
|
+
"listviewmine:hardis:org:fix",
|
|
7173
|
+
"listviewmine:org:hardis:fix",
|
|
7174
|
+
"listviewmine:org:fix:hardis",
|
|
7175
|
+
"hardis:listviewmine:fix:org",
|
|
7176
|
+
"listviewmine:hardis:fix:org",
|
|
7177
|
+
"listviewmine:fix:hardis:org",
|
|
7178
|
+
"listviewmine:fix:org:hardis"
|
|
7506
7179
|
]
|
|
7507
7180
|
},
|
|
7508
|
-
"hardis:org:
|
|
7181
|
+
"hardis:org:generate:packagexmlfull": {
|
|
7509
7182
|
"aliases": [],
|
|
7510
7183
|
"args": {},
|
|
7511
|
-
"description": "
|
|
7184
|
+
"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",
|
|
7512
7185
|
"examples": [
|
|
7513
|
-
"$ sf hardis:org:
|
|
7514
|
-
"$ sf hardis:org:
|
|
7515
|
-
"$ sf hardis:org:
|
|
7516
|
-
"$ sf hardis:org:monitor:backup --full --exclude-namespaces --full-apply-filters"
|
|
7186
|
+
"$ sf hardis:org:generate:packagexmlfull",
|
|
7187
|
+
"$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
|
|
7188
|
+
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
7517
7189
|
],
|
|
7518
7190
|
"flags": {
|
|
7519
7191
|
"json": {
|
|
@@ -7531,52 +7203,8 @@
|
|
|
7531
7203
|
"multiple": false,
|
|
7532
7204
|
"type": "option"
|
|
7533
7205
|
},
|
|
7534
|
-
"full": {
|
|
7535
|
-
"description": "Dot not take in account filtering using package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES. Efficient but much much slower !",
|
|
7536
|
-
"name": "full",
|
|
7537
|
-
"allowNo": false,
|
|
7538
|
-
"type": "boolean"
|
|
7539
|
-
},
|
|
7540
|
-
"max-by-chunk": {
|
|
7541
|
-
"char": "m",
|
|
7542
|
-
"description": "If mode --full is activated, maximum number of metadatas in a package.xml chunk",
|
|
7543
|
-
"name": "max-by-chunk",
|
|
7544
|
-
"default": 3000,
|
|
7545
|
-
"hasDynamicHelp": false,
|
|
7546
|
-
"multiple": false,
|
|
7547
|
-
"type": "option"
|
|
7548
|
-
},
|
|
7549
|
-
"exclude-namespaces": {
|
|
7550
|
-
"char": "e",
|
|
7551
|
-
"description": "If mode --full is activated, exclude namespaced metadatas",
|
|
7552
|
-
"name": "exclude-namespaces",
|
|
7553
|
-
"allowNo": false,
|
|
7554
|
-
"type": "boolean"
|
|
7555
|
-
},
|
|
7556
|
-
"full-apply-filters": {
|
|
7557
|
-
"char": "z",
|
|
7558
|
-
"description": "If mode --full is activated, apply filters of manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES anyway",
|
|
7559
|
-
"name": "full-apply-filters",
|
|
7560
|
-
"allowNo": false,
|
|
7561
|
-
"type": "boolean"
|
|
7562
|
-
},
|
|
7563
|
-
"start-chunk": {
|
|
7564
|
-
"description": "Use this parameter to troubleshoot a specific chunk. It will be used as the first chunk to retrieve",
|
|
7565
|
-
"name": "start-chunk",
|
|
7566
|
-
"default": 1,
|
|
7567
|
-
"hasDynamicHelp": false,
|
|
7568
|
-
"multiple": false,
|
|
7569
|
-
"type": "option"
|
|
7570
|
-
},
|
|
7571
|
-
"skip-doc": {
|
|
7572
|
-
"description": "Skip the generation of project documentation at the end of the command",
|
|
7573
|
-
"name": "skip-doc",
|
|
7574
|
-
"allowNo": false,
|
|
7575
|
-
"type": "boolean"
|
|
7576
|
-
},
|
|
7577
7206
|
"outputfile": {
|
|
7578
|
-
"
|
|
7579
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7207
|
+
"description": "Output package.xml file",
|
|
7580
7208
|
"name": "outputfile",
|
|
7581
7209
|
"hasDynamicHelp": false,
|
|
7582
7210
|
"multiple": false,
|
|
@@ -7589,6 +7217,13 @@
|
|
|
7589
7217
|
"allowNo": false,
|
|
7590
7218
|
"type": "boolean"
|
|
7591
7219
|
},
|
|
7220
|
+
"no-prompt": {
|
|
7221
|
+
"char": "n",
|
|
7222
|
+
"description": "Do not prompt for org username, use the default one",
|
|
7223
|
+
"name": "no-prompt",
|
|
7224
|
+
"allowNo": false,
|
|
7225
|
+
"type": "boolean"
|
|
7226
|
+
},
|
|
7592
7227
|
"websocket": {
|
|
7593
7228
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7594
7229
|
"name": "websocket",
|
|
@@ -7620,58 +7255,58 @@
|
|
|
7620
7255
|
},
|
|
7621
7256
|
"hasDynamicHelp": true,
|
|
7622
7257
|
"hiddenAliases": [],
|
|
7623
|
-
"id": "hardis:org:
|
|
7258
|
+
"id": "hardis:org:generate:packagexmlfull",
|
|
7624
7259
|
"pluginAlias": "sfdx-hardis",
|
|
7625
7260
|
"pluginName": "sfdx-hardis",
|
|
7626
7261
|
"pluginType": "core",
|
|
7627
7262
|
"strict": true,
|
|
7628
7263
|
"enableJsonFlag": true,
|
|
7629
|
-
"title": "
|
|
7630
|
-
"requiresProject":
|
|
7631
|
-
"triggerNotification": true,
|
|
7264
|
+
"title": "Generate Full Org package.xml",
|
|
7265
|
+
"requiresProject": false,
|
|
7632
7266
|
"isESM": true,
|
|
7633
7267
|
"relativePath": [
|
|
7634
7268
|
"lib",
|
|
7635
7269
|
"commands",
|
|
7636
7270
|
"hardis",
|
|
7637
7271
|
"org",
|
|
7638
|
-
"
|
|
7639
|
-
"
|
|
7272
|
+
"generate",
|
|
7273
|
+
"packagexmlfull.js"
|
|
7640
7274
|
],
|
|
7641
7275
|
"aliasPermutations": [],
|
|
7642
7276
|
"permutations": [
|
|
7643
|
-
"hardis:org:
|
|
7644
|
-
"org:hardis:
|
|
7645
|
-
"org:
|
|
7646
|
-
"org:
|
|
7647
|
-
"hardis:
|
|
7648
|
-
"
|
|
7649
|
-
"
|
|
7650
|
-
"
|
|
7651
|
-
"hardis:
|
|
7652
|
-
"
|
|
7653
|
-
"
|
|
7654
|
-
"
|
|
7655
|
-
"hardis:org:
|
|
7656
|
-
"org:hardis:
|
|
7657
|
-
"org:
|
|
7658
|
-
"org:
|
|
7659
|
-
"hardis:
|
|
7660
|
-
"
|
|
7661
|
-
"
|
|
7662
|
-
"
|
|
7663
|
-
"hardis:
|
|
7664
|
-
"
|
|
7665
|
-
"
|
|
7666
|
-
"
|
|
7277
|
+
"hardis:org:generate:packagexmlfull",
|
|
7278
|
+
"org:hardis:generate:packagexmlfull",
|
|
7279
|
+
"org:generate:hardis:packagexmlfull",
|
|
7280
|
+
"org:generate:packagexmlfull:hardis",
|
|
7281
|
+
"hardis:generate:org:packagexmlfull",
|
|
7282
|
+
"generate:hardis:org:packagexmlfull",
|
|
7283
|
+
"generate:org:hardis:packagexmlfull",
|
|
7284
|
+
"generate:org:packagexmlfull:hardis",
|
|
7285
|
+
"hardis:generate:packagexmlfull:org",
|
|
7286
|
+
"generate:hardis:packagexmlfull:org",
|
|
7287
|
+
"generate:packagexmlfull:hardis:org",
|
|
7288
|
+
"generate:packagexmlfull:org:hardis",
|
|
7289
|
+
"hardis:org:packagexmlfull:generate",
|
|
7290
|
+
"org:hardis:packagexmlfull:generate",
|
|
7291
|
+
"org:packagexmlfull:hardis:generate",
|
|
7292
|
+
"org:packagexmlfull:generate:hardis",
|
|
7293
|
+
"hardis:packagexmlfull:org:generate",
|
|
7294
|
+
"packagexmlfull:hardis:org:generate",
|
|
7295
|
+
"packagexmlfull:org:hardis:generate",
|
|
7296
|
+
"packagexmlfull:org:generate:hardis",
|
|
7297
|
+
"hardis:packagexmlfull:generate:org",
|
|
7298
|
+
"packagexmlfull:hardis:generate:org",
|
|
7299
|
+
"packagexmlfull:generate:hardis:org",
|
|
7300
|
+
"packagexmlfull:generate:org:hardis"
|
|
7667
7301
|
]
|
|
7668
7302
|
},
|
|
7669
|
-
"hardis:org:
|
|
7303
|
+
"hardis:org:purge:apexlog": {
|
|
7670
7304
|
"aliases": [],
|
|
7671
7305
|
"args": {},
|
|
7672
|
-
"description": "\n
|
|
7306
|
+
"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",
|
|
7673
7307
|
"examples": [
|
|
7674
|
-
"$ sf hardis:org:
|
|
7308
|
+
"$ sf hardis:org:purge:apexlog",
|
|
7309
|
+
"$ sf hardis:org:purge:apexlog --target-org nicolas.vuillamy@gmail.com"
|
|
7675
7310
|
],
|
|
7676
7311
|
"flags": {
|
|
7677
7312
|
"json": {
|
|
@@ -7689,13 +7324,12 @@
|
|
|
7689
7324
|
"multiple": false,
|
|
7690
7325
|
"type": "option"
|
|
7691
7326
|
},
|
|
7692
|
-
"
|
|
7693
|
-
"char": "
|
|
7694
|
-
"description": "
|
|
7695
|
-
"name": "
|
|
7696
|
-
"
|
|
7697
|
-
"
|
|
7698
|
-
"type": "option"
|
|
7327
|
+
"prompt": {
|
|
7328
|
+
"char": "z",
|
|
7329
|
+
"description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
|
|
7330
|
+
"name": "prompt",
|
|
7331
|
+
"allowNo": true,
|
|
7332
|
+
"type": "boolean"
|
|
7699
7333
|
},
|
|
7700
7334
|
"debug": {
|
|
7701
7335
|
"char": "d",
|
|
@@ -7735,59 +7369,59 @@
|
|
|
7735
7369
|
},
|
|
7736
7370
|
"hasDynamicHelp": true,
|
|
7737
7371
|
"hiddenAliases": [],
|
|
7738
|
-
"id": "hardis:org:
|
|
7372
|
+
"id": "hardis:org:purge:apexlog",
|
|
7739
7373
|
"pluginAlias": "sfdx-hardis",
|
|
7740
7374
|
"pluginName": "sfdx-hardis",
|
|
7741
7375
|
"pluginType": "core",
|
|
7742
7376
|
"strict": true,
|
|
7743
7377
|
"enableJsonFlag": true,
|
|
7744
|
-
"title": "
|
|
7745
|
-
"requiresProject":
|
|
7746
|
-
"triggerNotification": true,
|
|
7378
|
+
"title": "Purge Apex Logs",
|
|
7379
|
+
"requiresProject": false,
|
|
7747
7380
|
"isESM": true,
|
|
7748
7381
|
"relativePath": [
|
|
7749
7382
|
"lib",
|
|
7750
7383
|
"commands",
|
|
7751
7384
|
"hardis",
|
|
7752
7385
|
"org",
|
|
7753
|
-
"
|
|
7754
|
-
"
|
|
7386
|
+
"purge",
|
|
7387
|
+
"apexlog.js"
|
|
7755
7388
|
],
|
|
7756
7389
|
"aliasPermutations": [],
|
|
7757
7390
|
"permutations": [
|
|
7758
|
-
"hardis:org:
|
|
7759
|
-
"org:hardis:
|
|
7760
|
-
"org:
|
|
7761
|
-
"org:
|
|
7762
|
-
"hardis:
|
|
7763
|
-
"
|
|
7764
|
-
"
|
|
7765
|
-
"
|
|
7766
|
-
"hardis:
|
|
7767
|
-
"
|
|
7768
|
-
"
|
|
7769
|
-
"
|
|
7770
|
-
"hardis:org:
|
|
7771
|
-
"org:hardis:
|
|
7772
|
-
"org:
|
|
7773
|
-
"org:
|
|
7774
|
-
"hardis:
|
|
7775
|
-
"
|
|
7776
|
-
"
|
|
7777
|
-
"
|
|
7778
|
-
"hardis:
|
|
7779
|
-
"
|
|
7780
|
-
"
|
|
7781
|
-
"
|
|
7391
|
+
"hardis:org:purge:apexlog",
|
|
7392
|
+
"org:hardis:purge:apexlog",
|
|
7393
|
+
"org:purge:hardis:apexlog",
|
|
7394
|
+
"org:purge:apexlog:hardis",
|
|
7395
|
+
"hardis:purge:org:apexlog",
|
|
7396
|
+
"purge:hardis:org:apexlog",
|
|
7397
|
+
"purge:org:hardis:apexlog",
|
|
7398
|
+
"purge:org:apexlog:hardis",
|
|
7399
|
+
"hardis:purge:apexlog:org",
|
|
7400
|
+
"purge:hardis:apexlog:org",
|
|
7401
|
+
"purge:apexlog:hardis:org",
|
|
7402
|
+
"purge:apexlog:org:hardis",
|
|
7403
|
+
"hardis:org:apexlog:purge",
|
|
7404
|
+
"org:hardis:apexlog:purge",
|
|
7405
|
+
"org:apexlog:hardis:purge",
|
|
7406
|
+
"org:apexlog:purge:hardis",
|
|
7407
|
+
"hardis:apexlog:org:purge",
|
|
7408
|
+
"apexlog:hardis:org:purge",
|
|
7409
|
+
"apexlog:org:hardis:purge",
|
|
7410
|
+
"apexlog:org:purge:hardis",
|
|
7411
|
+
"hardis:apexlog:purge:org",
|
|
7412
|
+
"apexlog:hardis:purge:org",
|
|
7413
|
+
"apexlog:purge:hardis:org",
|
|
7414
|
+
"apexlog:purge:org:hardis"
|
|
7782
7415
|
]
|
|
7783
7416
|
},
|
|
7784
|
-
"hardis:org:purge:
|
|
7417
|
+
"hardis:org:purge:flow": {
|
|
7785
7418
|
"aliases": [],
|
|
7786
7419
|
"args": {},
|
|
7787
|
-
"description": "\n**Purges
|
|
7420
|
+
"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",
|
|
7788
7421
|
"examples": [
|
|
7789
|
-
"$ sf hardis:org:purge:
|
|
7790
|
-
"$ sf hardis:org:purge:
|
|
7422
|
+
"$ sf hardis:org:purge:flow",
|
|
7423
|
+
"$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --no-prompt --delete-flow-interviews",
|
|
7424
|
+
"$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --status \"Obsolete,Draft,InvalidDraft\" --name TestFlow"
|
|
7791
7425
|
],
|
|
7792
7426
|
"flags": {
|
|
7793
7427
|
"json": {
|
|
@@ -7812,16 +7446,420 @@
|
|
|
7812
7446
|
"allowNo": true,
|
|
7813
7447
|
"type": "boolean"
|
|
7814
7448
|
},
|
|
7815
|
-
"
|
|
7816
|
-
"char": "
|
|
7817
|
-
"description": "
|
|
7818
|
-
"name": "
|
|
7819
|
-
"
|
|
7820
|
-
"
|
|
7821
|
-
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
"
|
|
7449
|
+
"name": {
|
|
7450
|
+
"char": "n",
|
|
7451
|
+
"description": "Filter according to Name criteria",
|
|
7452
|
+
"name": "name",
|
|
7453
|
+
"hasDynamicHelp": false,
|
|
7454
|
+
"multiple": false,
|
|
7455
|
+
"type": "option"
|
|
7456
|
+
},
|
|
7457
|
+
"status": {
|
|
7458
|
+
"char": "s",
|
|
7459
|
+
"description": "Filter according to Status criteria",
|
|
7460
|
+
"name": "status",
|
|
7461
|
+
"hasDynamicHelp": false,
|
|
7462
|
+
"multiple": false,
|
|
7463
|
+
"type": "option"
|
|
7464
|
+
},
|
|
7465
|
+
"delete-flow-interviews": {
|
|
7466
|
+
"char": "w",
|
|
7467
|
+
"description": "If the presence of Flow interviews prevent to delete flows versions, delete them before retrying to delete flow versions",
|
|
7468
|
+
"name": "delete-flow-interviews",
|
|
7469
|
+
"allowNo": false,
|
|
7470
|
+
"type": "boolean"
|
|
7471
|
+
},
|
|
7472
|
+
"allowpurgefailure": {
|
|
7473
|
+
"char": "f",
|
|
7474
|
+
"description": "Allows purges to fail without exiting with 1. Use --no-allowpurgefailure to disable",
|
|
7475
|
+
"name": "allowpurgefailure",
|
|
7476
|
+
"allowNo": true,
|
|
7477
|
+
"type": "boolean"
|
|
7478
|
+
},
|
|
7479
|
+
"instanceurl": {
|
|
7480
|
+
"char": "r",
|
|
7481
|
+
"description": "URL of org instance",
|
|
7482
|
+
"name": "instanceurl",
|
|
7483
|
+
"default": "https://login.salesforce.com",
|
|
7484
|
+
"hasDynamicHelp": false,
|
|
7485
|
+
"multiple": false,
|
|
7486
|
+
"type": "option"
|
|
7487
|
+
},
|
|
7488
|
+
"debug": {
|
|
7489
|
+
"char": "d",
|
|
7490
|
+
"description": "Activate debug mode (more logs)",
|
|
7491
|
+
"name": "debug",
|
|
7492
|
+
"allowNo": false,
|
|
7493
|
+
"type": "boolean"
|
|
7494
|
+
},
|
|
7495
|
+
"websocket": {
|
|
7496
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7497
|
+
"name": "websocket",
|
|
7498
|
+
"hasDynamicHelp": false,
|
|
7499
|
+
"multiple": false,
|
|
7500
|
+
"type": "option"
|
|
7501
|
+
},
|
|
7502
|
+
"skipauth": {
|
|
7503
|
+
"description": "Skip authentication check when a default username is required",
|
|
7504
|
+
"name": "skipauth",
|
|
7505
|
+
"allowNo": false,
|
|
7506
|
+
"type": "boolean"
|
|
7507
|
+
},
|
|
7508
|
+
"target-org": {
|
|
7509
|
+
"aliases": [
|
|
7510
|
+
"targetusername",
|
|
7511
|
+
"u"
|
|
7512
|
+
],
|
|
7513
|
+
"char": "o",
|
|
7514
|
+
"deprecateAliases": true,
|
|
7515
|
+
"name": "target-org",
|
|
7516
|
+
"noCacheDefault": true,
|
|
7517
|
+
"required": true,
|
|
7518
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
7519
|
+
"hasDynamicHelp": true,
|
|
7520
|
+
"multiple": false,
|
|
7521
|
+
"type": "option"
|
|
7522
|
+
}
|
|
7523
|
+
},
|
|
7524
|
+
"hasDynamicHelp": true,
|
|
7525
|
+
"hiddenAliases": [],
|
|
7526
|
+
"id": "hardis:org:purge:flow",
|
|
7527
|
+
"pluginAlias": "sfdx-hardis",
|
|
7528
|
+
"pluginName": "sfdx-hardis",
|
|
7529
|
+
"pluginType": "core",
|
|
7530
|
+
"strict": true,
|
|
7531
|
+
"enableJsonFlag": true,
|
|
7532
|
+
"title": "Purge Flow versions",
|
|
7533
|
+
"requiresProject": false,
|
|
7534
|
+
"isESM": true,
|
|
7535
|
+
"relativePath": [
|
|
7536
|
+
"lib",
|
|
7537
|
+
"commands",
|
|
7538
|
+
"hardis",
|
|
7539
|
+
"org",
|
|
7540
|
+
"purge",
|
|
7541
|
+
"flow.js"
|
|
7542
|
+
],
|
|
7543
|
+
"aliasPermutations": [],
|
|
7544
|
+
"permutations": [
|
|
7545
|
+
"hardis:org:purge:flow",
|
|
7546
|
+
"org:hardis:purge:flow",
|
|
7547
|
+
"org:purge:hardis:flow",
|
|
7548
|
+
"org:purge:flow:hardis",
|
|
7549
|
+
"hardis:purge:org:flow",
|
|
7550
|
+
"purge:hardis:org:flow",
|
|
7551
|
+
"purge:org:hardis:flow",
|
|
7552
|
+
"purge:org:flow:hardis",
|
|
7553
|
+
"hardis:purge:flow:org",
|
|
7554
|
+
"purge:hardis:flow:org",
|
|
7555
|
+
"purge:flow:hardis:org",
|
|
7556
|
+
"purge:flow:org:hardis",
|
|
7557
|
+
"hardis:org:flow:purge",
|
|
7558
|
+
"org:hardis:flow:purge",
|
|
7559
|
+
"org:flow:hardis:purge",
|
|
7560
|
+
"org:flow:purge:hardis",
|
|
7561
|
+
"hardis:flow:org:purge",
|
|
7562
|
+
"flow:hardis:org:purge",
|
|
7563
|
+
"flow:org:hardis:purge",
|
|
7564
|
+
"flow:org:purge:hardis",
|
|
7565
|
+
"hardis:flow:purge:org",
|
|
7566
|
+
"flow:hardis:purge:org",
|
|
7567
|
+
"flow:purge:hardis:org",
|
|
7568
|
+
"flow:purge:org:hardis"
|
|
7569
|
+
]
|
|
7570
|
+
},
|
|
7571
|
+
"hardis:org:monitor:all": {
|
|
7572
|
+
"aliases": [],
|
|
7573
|
+
"args": {},
|
|
7574
|
+
"description": "Monitor org, generate reports and sends notifications\n\nYou can disable some commands defining either a **monitoringDisable** property in `.sfdx-hardis.yml`, or a comma separated list in env variable **MONITORING_DISABLE**\n\nExample in .sfdx-hardis.yml:\n \n```yaml\nmonitoringDisable:\n - METADATA_STATUS\n - MISSING_ATTRIBUTES\n - UNUSED_METADATAS\n```\n \nExample in env var:\n\n```sh\nMONITORING_DISABLE=METADATA_STATUS,MISSING_ATTRIBUTES,UNUSED_METADATAS\n```\n\nA [default list of monitoring commands](https://sfdx-hardis.cloudity.com/salesforce-monitoring-home/#monitoring-commands) is used, if you want to override it you can define property **monitoringCommands** in your .sfdx-hardis.yml file\n\nExample:\n\n```yaml\nmonitoringCommands:\n - title: My Custom command\n command: sf my:custom:command\n - title: My Custom command 2\n command: sf my:other:custom:command\n```\n\nYou can force the daily run of all commands by defining env var `MONITORING_IGNORE_FREQUENCY=true`\n\nThe default list of commands is the following:\n\n| Key | Description | Command | Frequency |\n| :---: | :---- | :---- | :-----: |\n| [AUDIT_TRAIL](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | Detect suspect setup actions in major org | [sf hardis:org:diagnose:audittrail](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | daily |\n| [LEGACY_API](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | Detect calls to deprecated API versions | [sf hardis:org:diagnose:legacyapi](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | daily |\n| [ORG_LIMITS](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | Detect if org limits are close to be reached | [sf hardis:org:monitor:limits](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | daily |\n| [UNSECURED_CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | Detect unsecured Connected Apps in an org | [sf hardis:org:diagnose:unsecure-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | daily |\n| [LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | Extract licenses information | [sf hardis:org:diagnose:licenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | weekly |\n| [LINT_ACCESS](https://sfdx-hardis.cloudity.com/hardis/lint/access) | Detect custom elements with no access rights defined in permission sets | [sf hardis:lint:access](https://sfdx-hardis.cloudity.com/hardis/lint/access) | weekly |\n| [UNUSED_LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | Detect permission set licenses that are assigned to users that do not need them | [sf hardis:org:diagnose:unusedlicenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | weekly |\n| [UNUSED_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users without recent logins | [sf hardis:org:diagnose:unusedusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ACTIVE_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users with recent logins | [sf hardis:org:diagnose:unusedusers --returnactiveusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ORG_INFO](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | Get org info + SF instance info + next major upgrade date | [sf hardis:org:diagnose:instanceupgrade](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | weekly |\n| [RELEASE_UPDATES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | Gather warnings about incoming and overdue Release Updates | [sf hardis:org:diagnose:releaseupdates](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | weekly |\n| [UNUSED_METADATAS](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | Detect custom labels and custom permissions that are not in use | [sf hardis:lint:unusedmetadatas](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | weekly |\n| [UNUSED_APEX_CLASSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | Detect unused Apex classes in an org | [sf hardis:org:diagnose:unused-apex-classes](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | weekly |\n| [CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | Detect unused Connected Apps in an org | [sf hardis:org:diagnose:unused-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | weekly |\n| [METADATA_STATUS](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | Detect inactive metadata | [sf hardis:lint:metadatastatus](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | weekly |\n| [MISSING_ATTRIBUTES](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | Detect missing description on custom field | [sf hardis:lint:missingattributes](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | weekly |\n\n",
|
|
7575
|
+
"examples": [
|
|
7576
|
+
"$ sf hardis:org:monitor:all"
|
|
7577
|
+
],
|
|
7578
|
+
"flags": {
|
|
7579
|
+
"json": {
|
|
7580
|
+
"description": "Format output as json.",
|
|
7581
|
+
"helpGroup": "GLOBAL",
|
|
7582
|
+
"name": "json",
|
|
7583
|
+
"allowNo": false,
|
|
7584
|
+
"type": "boolean"
|
|
7585
|
+
},
|
|
7586
|
+
"flags-dir": {
|
|
7587
|
+
"helpGroup": "GLOBAL",
|
|
7588
|
+
"name": "flags-dir",
|
|
7589
|
+
"summary": "Import flag values from a directory.",
|
|
7590
|
+
"hasDynamicHelp": false,
|
|
7591
|
+
"multiple": false,
|
|
7592
|
+
"type": "option"
|
|
7593
|
+
},
|
|
7594
|
+
"debug": {
|
|
7595
|
+
"char": "d",
|
|
7596
|
+
"description": "Activate debug mode (more logs)",
|
|
7597
|
+
"name": "debug",
|
|
7598
|
+
"allowNo": false,
|
|
7599
|
+
"type": "boolean"
|
|
7600
|
+
},
|
|
7601
|
+
"websocket": {
|
|
7602
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7603
|
+
"name": "websocket",
|
|
7604
|
+
"hasDynamicHelp": false,
|
|
7605
|
+
"multiple": false,
|
|
7606
|
+
"type": "option"
|
|
7607
|
+
},
|
|
7608
|
+
"skipauth": {
|
|
7609
|
+
"description": "Skip authentication check when a default username is required",
|
|
7610
|
+
"name": "skipauth",
|
|
7611
|
+
"allowNo": false,
|
|
7612
|
+
"type": "boolean"
|
|
7613
|
+
},
|
|
7614
|
+
"target-org": {
|
|
7615
|
+
"aliases": [
|
|
7616
|
+
"targetusername",
|
|
7617
|
+
"u"
|
|
7618
|
+
],
|
|
7619
|
+
"char": "o",
|
|
7620
|
+
"deprecateAliases": true,
|
|
7621
|
+
"name": "target-org",
|
|
7622
|
+
"noCacheDefault": true,
|
|
7623
|
+
"required": true,
|
|
7624
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
7625
|
+
"hasDynamicHelp": true,
|
|
7626
|
+
"multiple": false,
|
|
7627
|
+
"type": "option"
|
|
7628
|
+
}
|
|
7629
|
+
},
|
|
7630
|
+
"hasDynamicHelp": true,
|
|
7631
|
+
"hiddenAliases": [],
|
|
7632
|
+
"id": "hardis:org:monitor:all",
|
|
7633
|
+
"pluginAlias": "sfdx-hardis",
|
|
7634
|
+
"pluginName": "sfdx-hardis",
|
|
7635
|
+
"pluginType": "core",
|
|
7636
|
+
"strict": true,
|
|
7637
|
+
"enableJsonFlag": true,
|
|
7638
|
+
"title": "Monitor org",
|
|
7639
|
+
"monitoringCommandsDefault": [
|
|
7640
|
+
{
|
|
7641
|
+
"key": "AUDIT_TRAIL",
|
|
7642
|
+
"title": "Detect suspect setup actions in major org",
|
|
7643
|
+
"command": "sf hardis:org:diagnose:audittrail",
|
|
7644
|
+
"frequency": "daily"
|
|
7645
|
+
},
|
|
7646
|
+
{
|
|
7647
|
+
"key": "LEGACY_API",
|
|
7648
|
+
"title": "Detect calls to deprecated API versions",
|
|
7649
|
+
"command": "sf hardis:org:diagnose:legacyapi",
|
|
7650
|
+
"frequency": "daily"
|
|
7651
|
+
},
|
|
7652
|
+
{
|
|
7653
|
+
"key": "ORG_LIMITS",
|
|
7654
|
+
"title": "Detect if org limits are close to be reached",
|
|
7655
|
+
"command": "sf hardis:org:monitor:limits",
|
|
7656
|
+
"frequency": "daily"
|
|
7657
|
+
},
|
|
7658
|
+
{
|
|
7659
|
+
"key": "UNSECURED_CONNECTED_APPS",
|
|
7660
|
+
"title": "Detect unsecured Connected Apps in an org",
|
|
7661
|
+
"command": "sf hardis:org:diagnose:unsecure-connected-apps",
|
|
7662
|
+
"frequency": "daily"
|
|
7663
|
+
},
|
|
7664
|
+
{
|
|
7665
|
+
"key": "LICENSES",
|
|
7666
|
+
"title": "Extract licenses information",
|
|
7667
|
+
"command": "sf hardis:org:diagnose:licenses",
|
|
7668
|
+
"frequency": "weekly"
|
|
7669
|
+
},
|
|
7670
|
+
{
|
|
7671
|
+
"key": "LINT_ACCESS",
|
|
7672
|
+
"title": "Detect custom elements with no access rights defined in permission sets",
|
|
7673
|
+
"command": "sf hardis:lint:access",
|
|
7674
|
+
"frequency": "weekly"
|
|
7675
|
+
},
|
|
7676
|
+
{
|
|
7677
|
+
"key": "UNUSED_LICENSES",
|
|
7678
|
+
"title": "Detect permission set licenses that are assigned to users that do not need them",
|
|
7679
|
+
"command": "sf hardis:org:diagnose:unusedlicenses",
|
|
7680
|
+
"frequency": "weekly"
|
|
7681
|
+
},
|
|
7682
|
+
{
|
|
7683
|
+
"key": "UNUSED_USERS",
|
|
7684
|
+
"title": "Detect active users without recent logins",
|
|
7685
|
+
"command": "sf hardis:org:diagnose:unusedusers",
|
|
7686
|
+
"frequency": "weekly"
|
|
7687
|
+
},
|
|
7688
|
+
{
|
|
7689
|
+
"key": "ACTIVE_USERS",
|
|
7690
|
+
"title": "Detect active users with recent logins",
|
|
7691
|
+
"command": "sf hardis:org:diagnose:unusedusers --returnactiveusers",
|
|
7692
|
+
"frequency": "weekly"
|
|
7693
|
+
},
|
|
7694
|
+
{
|
|
7695
|
+
"key": "ORG_INFO",
|
|
7696
|
+
"title": "Get org info + SF instance info + next major upgrade date",
|
|
7697
|
+
"command": "sf hardis:org:diagnose:instanceupgrade",
|
|
7698
|
+
"frequency": "weekly"
|
|
7699
|
+
},
|
|
7700
|
+
{
|
|
7701
|
+
"key": "RELEASE_UPDATES",
|
|
7702
|
+
"title": "Gather warnings about incoming and overdue Release Updates",
|
|
7703
|
+
"command": "sf hardis:org:diagnose:releaseupdates",
|
|
7704
|
+
"frequency": "weekly"
|
|
7705
|
+
},
|
|
7706
|
+
{
|
|
7707
|
+
"key": "UNUSED_METADATAS",
|
|
7708
|
+
"title": "Detect custom labels and custom permissions that are not in use",
|
|
7709
|
+
"command": "sf hardis:lint:unusedmetadatas",
|
|
7710
|
+
"frequency": "weekly"
|
|
7711
|
+
},
|
|
7712
|
+
{
|
|
7713
|
+
"key": "UNUSED_APEX_CLASSES",
|
|
7714
|
+
"title": "Detect unused Apex classes in an org",
|
|
7715
|
+
"command": "sf hardis:org:diagnose:unused-apex-classes",
|
|
7716
|
+
"frequency": "weekly"
|
|
7717
|
+
},
|
|
7718
|
+
{
|
|
7719
|
+
"key": "CONNECTED_APPS",
|
|
7720
|
+
"title": "Detect unused Connected Apps in an org",
|
|
7721
|
+
"command": "sf hardis:org:diagnose:unused-connected-apps",
|
|
7722
|
+
"frequency": "weekly"
|
|
7723
|
+
},
|
|
7724
|
+
{
|
|
7725
|
+
"key": "METADATA_STATUS",
|
|
7726
|
+
"title": "Detect inactive metadata",
|
|
7727
|
+
"command": "sf hardis:lint:metadatastatus",
|
|
7728
|
+
"frequency": "weekly"
|
|
7729
|
+
},
|
|
7730
|
+
{
|
|
7731
|
+
"key": "MISSING_ATTRIBUTES",
|
|
7732
|
+
"title": "Detect missing description on custom field",
|
|
7733
|
+
"command": "sf hardis:lint:missingattributes",
|
|
7734
|
+
"frequency": "weekly"
|
|
7735
|
+
}
|
|
7736
|
+
],
|
|
7737
|
+
"requiresProject": true,
|
|
7738
|
+
"triggerNotification": true,
|
|
7739
|
+
"isESM": true,
|
|
7740
|
+
"relativePath": [
|
|
7741
|
+
"lib",
|
|
7742
|
+
"commands",
|
|
7743
|
+
"hardis",
|
|
7744
|
+
"org",
|
|
7745
|
+
"monitor",
|
|
7746
|
+
"all.js"
|
|
7747
|
+
],
|
|
7748
|
+
"aliasPermutations": [],
|
|
7749
|
+
"permutations": [
|
|
7750
|
+
"hardis:org:monitor:all",
|
|
7751
|
+
"org:hardis:monitor:all",
|
|
7752
|
+
"org:monitor:hardis:all",
|
|
7753
|
+
"org:monitor:all:hardis",
|
|
7754
|
+
"hardis:monitor:org:all",
|
|
7755
|
+
"monitor:hardis:org:all",
|
|
7756
|
+
"monitor:org:hardis:all",
|
|
7757
|
+
"monitor:org:all:hardis",
|
|
7758
|
+
"hardis:monitor:all:org",
|
|
7759
|
+
"monitor:hardis:all:org",
|
|
7760
|
+
"monitor:all:hardis:org",
|
|
7761
|
+
"monitor:all:org:hardis",
|
|
7762
|
+
"hardis:org:all:monitor",
|
|
7763
|
+
"org:hardis:all:monitor",
|
|
7764
|
+
"org:all:hardis:monitor",
|
|
7765
|
+
"org:all:monitor:hardis",
|
|
7766
|
+
"hardis:all:org:monitor",
|
|
7767
|
+
"all:hardis:org:monitor",
|
|
7768
|
+
"all:org:hardis:monitor",
|
|
7769
|
+
"all:org:monitor:hardis",
|
|
7770
|
+
"hardis:all:monitor:org",
|
|
7771
|
+
"all:hardis:monitor:org",
|
|
7772
|
+
"all:monitor:hardis:org",
|
|
7773
|
+
"all:monitor:org:hardis"
|
|
7774
|
+
]
|
|
7775
|
+
},
|
|
7776
|
+
"hardis:org:monitor:backup": {
|
|
7777
|
+
"aliases": [],
|
|
7778
|
+
"args": {},
|
|
7779
|
+
"description": "Retrieve sfdx sources in the context of a monitoring backup\n\nThe command exists in 2 modes: filtered(default & recommended) and full.\n\n## Filtered mode (default, better performances)\n\nAutomatically skips metadatas from installed packages with namespace. \n\nYou can remove more metadata types from backup, especially in case you have too many metadatas and that provokes a crash, using:\n\n- Manual update of `manifest/package-skip-items.xml` config file (then commit & push in the same branch)\n\n - Works with full wildcard (`<members>*</members>`) , named metadata (`<members>Account.Name</members>`) or partial wildcards names (`<members>pi__*</members>` , `<members>*__dlm</members>` , or `<members>prefix*suffix</members>`)\n\n- Environment variable MONITORING_BACKUP_SKIP_METADATA_TYPES (example: `MONITORING_BACKUP_SKIP_METADATA_TYPES=CustomLabel,StaticResource,Translation`): that will be applied to all monitoring branches.\n\n## Full mode\n\nActivate it with **--full** parameter, or variable MONITORING_BACKUP_MODE_FULL=true\n\nIgnores filters (namespaces items & manifest/package-skip-items.xml) to retrieve ALL metadatas, including those you might not care about (reports, translations...)\n\nAs we can retrieve only 10000 files by call, the list of all metadatas will be chunked to make multiple calls (and take more time than filtered mode)\n\n- if you use `--full-apply-filters` , manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES filters will be applied anyway\n- if you use `--exclude-namespaces` , namespaced items will be ignored\n\n_With those both options, it's like if you are not using --full, but with chunked metadata download_\n\n## In CI/CD\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-metadata-backup/) and can output Grafana, Slack and MsTeams Notifications.\n\n## Troubleshooting\n\nIf you have unknown errors (it happens !), you can investigate using the full command with smaller chunks.\n\nExample: `sf hardis:org:monitor:backup --full --exclude-namespaces --full-apply-filters --max-by-chunk 500`\n\nIt will allow you the identify the responsible metadata and ignore it using package-skip-items.xml or MONITORING_BACKUP_SKIP_METADATA_TYPES env variable.\n\n## Documentation\n\n[Doc generation (including visual flows)](https://sfdx-hardis.cloudity.com/hardis/doc/project2markdown/) is triggered at the end of the command.\n\nIf you want to also upload HTML Documentation on your Salesforce Org as static resource, use variable **SFDX_HARDIS_DOC_DEPLOY_TO_ORG=\"true\"**\n\nIf you want to also upload HTML Documentation on Cloudflare, use variable **SFDX_HARDIS_DOC_DEPLOY_TO_CLOUDFLARE=\"true\"**\n\n- If you want to generate the documentation in multiple languages, define variable SFDX_DOC_LANGUAGES (ex: SFDX_DOC_LANGUAGES=en,fr,de)\n- You can define one Cloudflare site by language, for example with the following variables:\n - CLOUDFLARE_PROJECT_NAME_EN=cloudity-demo-english\n - CLOUDFLARE_PROJECT_NAME_FR=cloudity-demo-french\n - CLOUDFLARE_PROJECT_NAME_DE=cloudity-demo-german\n\nIf Flow history doc always display a single state, you probably need to update your workflow configuration:\n\n- on Gitlab: Env variable [`GIT_FETCH_EXTRA_FLAGS: --depth 10000`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)\n- on GitHub: [`fetch-depth: 0`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)\n- on Azure: [`fetchDepth: \"0\"`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)\n- on Bitbucket: [`step: clone: depth: full`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)\n",
|
|
7780
|
+
"examples": [
|
|
7781
|
+
"$ sf hardis:org:monitor:backup",
|
|
7782
|
+
"$ sf hardis:org:monitor:backup --full",
|
|
7783
|
+
"$ sf hardis:org:monitor:backup --full --exclude-namespaces",
|
|
7784
|
+
"$ sf hardis:org:monitor:backup --full --exclude-namespaces --full-apply-filters"
|
|
7785
|
+
],
|
|
7786
|
+
"flags": {
|
|
7787
|
+
"json": {
|
|
7788
|
+
"description": "Format output as json.",
|
|
7789
|
+
"helpGroup": "GLOBAL",
|
|
7790
|
+
"name": "json",
|
|
7791
|
+
"allowNo": false,
|
|
7792
|
+
"type": "boolean"
|
|
7793
|
+
},
|
|
7794
|
+
"flags-dir": {
|
|
7795
|
+
"helpGroup": "GLOBAL",
|
|
7796
|
+
"name": "flags-dir",
|
|
7797
|
+
"summary": "Import flag values from a directory.",
|
|
7798
|
+
"hasDynamicHelp": false,
|
|
7799
|
+
"multiple": false,
|
|
7800
|
+
"type": "option"
|
|
7801
|
+
},
|
|
7802
|
+
"full": {
|
|
7803
|
+
"description": "Dot not take in account filtering using package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES. Efficient but much much slower !",
|
|
7804
|
+
"name": "full",
|
|
7805
|
+
"allowNo": false,
|
|
7806
|
+
"type": "boolean"
|
|
7807
|
+
},
|
|
7808
|
+
"max-by-chunk": {
|
|
7809
|
+
"char": "m",
|
|
7810
|
+
"description": "If mode --full is activated, maximum number of metadatas in a package.xml chunk",
|
|
7811
|
+
"name": "max-by-chunk",
|
|
7812
|
+
"default": 3000,
|
|
7813
|
+
"hasDynamicHelp": false,
|
|
7814
|
+
"multiple": false,
|
|
7815
|
+
"type": "option"
|
|
7816
|
+
},
|
|
7817
|
+
"exclude-namespaces": {
|
|
7818
|
+
"char": "e",
|
|
7819
|
+
"description": "If mode --full is activated, exclude namespaced metadatas",
|
|
7820
|
+
"name": "exclude-namespaces",
|
|
7821
|
+
"allowNo": false,
|
|
7822
|
+
"type": "boolean"
|
|
7823
|
+
},
|
|
7824
|
+
"full-apply-filters": {
|
|
7825
|
+
"char": "z",
|
|
7826
|
+
"description": "If mode --full is activated, apply filters of manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES anyway",
|
|
7827
|
+
"name": "full-apply-filters",
|
|
7828
|
+
"allowNo": false,
|
|
7829
|
+
"type": "boolean"
|
|
7830
|
+
},
|
|
7831
|
+
"start-chunk": {
|
|
7832
|
+
"description": "Use this parameter to troubleshoot a specific chunk. It will be used as the first chunk to retrieve",
|
|
7833
|
+
"name": "start-chunk",
|
|
7834
|
+
"default": 1,
|
|
7835
|
+
"hasDynamicHelp": false,
|
|
7836
|
+
"multiple": false,
|
|
7837
|
+
"type": "option"
|
|
7838
|
+
},
|
|
7839
|
+
"skip-doc": {
|
|
7840
|
+
"description": "Skip the generation of project documentation at the end of the command",
|
|
7841
|
+
"name": "skip-doc",
|
|
7842
|
+
"allowNo": false,
|
|
7843
|
+
"type": "boolean"
|
|
7844
|
+
},
|
|
7845
|
+
"outputfile": {
|
|
7846
|
+
"char": "f",
|
|
7847
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7848
|
+
"name": "outputfile",
|
|
7849
|
+
"hasDynamicHelp": false,
|
|
7850
|
+
"multiple": false,
|
|
7851
|
+
"type": "option"
|
|
7852
|
+
},
|
|
7853
|
+
"debug": {
|
|
7854
|
+
"char": "d",
|
|
7855
|
+
"description": "Activate debug mode (more logs)",
|
|
7856
|
+
"name": "debug",
|
|
7857
|
+
"allowNo": false,
|
|
7858
|
+
"type": "boolean"
|
|
7859
|
+
},
|
|
7860
|
+
"websocket": {
|
|
7861
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7862
|
+
"name": "websocket",
|
|
7825
7863
|
"hasDynamicHelp": false,
|
|
7826
7864
|
"multiple": false,
|
|
7827
7865
|
"type": "option"
|
|
@@ -7850,59 +7888,58 @@
|
|
|
7850
7888
|
},
|
|
7851
7889
|
"hasDynamicHelp": true,
|
|
7852
7890
|
"hiddenAliases": [],
|
|
7853
|
-
"id": "hardis:org:
|
|
7891
|
+
"id": "hardis:org:monitor:backup",
|
|
7854
7892
|
"pluginAlias": "sfdx-hardis",
|
|
7855
7893
|
"pluginName": "sfdx-hardis",
|
|
7856
7894
|
"pluginType": "core",
|
|
7857
7895
|
"strict": true,
|
|
7858
7896
|
"enableJsonFlag": true,
|
|
7859
|
-
"title": "
|
|
7860
|
-
"requiresProject":
|
|
7897
|
+
"title": "Backup DX sources",
|
|
7898
|
+
"requiresProject": true,
|
|
7899
|
+
"triggerNotification": true,
|
|
7861
7900
|
"isESM": true,
|
|
7862
7901
|
"relativePath": [
|
|
7863
7902
|
"lib",
|
|
7864
7903
|
"commands",
|
|
7865
7904
|
"hardis",
|
|
7866
7905
|
"org",
|
|
7867
|
-
"
|
|
7868
|
-
"
|
|
7906
|
+
"monitor",
|
|
7907
|
+
"backup.js"
|
|
7869
7908
|
],
|
|
7870
7909
|
"aliasPermutations": [],
|
|
7871
7910
|
"permutations": [
|
|
7872
|
-
"hardis:org:
|
|
7873
|
-
"org:hardis:
|
|
7874
|
-
"org:
|
|
7875
|
-
"org:
|
|
7876
|
-
"hardis:
|
|
7877
|
-
"
|
|
7878
|
-
"
|
|
7879
|
-
"
|
|
7880
|
-
"hardis:
|
|
7881
|
-
"
|
|
7882
|
-
"
|
|
7883
|
-
"
|
|
7884
|
-
"hardis:org:
|
|
7885
|
-
"org:hardis:
|
|
7886
|
-
"org:
|
|
7887
|
-
"org:
|
|
7888
|
-
"hardis:
|
|
7889
|
-
"
|
|
7890
|
-
"
|
|
7891
|
-
"
|
|
7892
|
-
"hardis:
|
|
7893
|
-
"
|
|
7894
|
-
"
|
|
7895
|
-
"
|
|
7911
|
+
"hardis:org:monitor:backup",
|
|
7912
|
+
"org:hardis:monitor:backup",
|
|
7913
|
+
"org:monitor:hardis:backup",
|
|
7914
|
+
"org:monitor:backup:hardis",
|
|
7915
|
+
"hardis:monitor:org:backup",
|
|
7916
|
+
"monitor:hardis:org:backup",
|
|
7917
|
+
"monitor:org:hardis:backup",
|
|
7918
|
+
"monitor:org:backup:hardis",
|
|
7919
|
+
"hardis:monitor:backup:org",
|
|
7920
|
+
"monitor:hardis:backup:org",
|
|
7921
|
+
"monitor:backup:hardis:org",
|
|
7922
|
+
"monitor:backup:org:hardis",
|
|
7923
|
+
"hardis:org:backup:monitor",
|
|
7924
|
+
"org:hardis:backup:monitor",
|
|
7925
|
+
"org:backup:hardis:monitor",
|
|
7926
|
+
"org:backup:monitor:hardis",
|
|
7927
|
+
"hardis:backup:org:monitor",
|
|
7928
|
+
"backup:hardis:org:monitor",
|
|
7929
|
+
"backup:org:hardis:monitor",
|
|
7930
|
+
"backup:org:monitor:hardis",
|
|
7931
|
+
"hardis:backup:monitor:org",
|
|
7932
|
+
"backup:hardis:monitor:org",
|
|
7933
|
+
"backup:monitor:hardis:org",
|
|
7934
|
+
"backup:monitor:org:hardis"
|
|
7896
7935
|
]
|
|
7897
7936
|
},
|
|
7898
|
-
"hardis:org:
|
|
7937
|
+
"hardis:org:monitor:limits": {
|
|
7899
7938
|
"aliases": [],
|
|
7900
7939
|
"args": {},
|
|
7901
|
-
"description": "\n
|
|
7940
|
+
"description": "\n## Command Behavior\n\n**Checks the current usage of various Salesforce org limits and sends notifications if thresholds are exceeded.**\n\nThis command is a critical component of proactive Salesforce org management, helping administrators and developers monitor resource consumption and prevent hitting critical limits that could impact performance or functionality. It provides early warnings when limits are approaching their capacity.\n\nKey functionalities:\n\n- **Limit Retrieval:** Fetches a comprehensive list of all Salesforce org limits using the Salesforce CLI.\n- **Usage Calculation:** Calculates the percentage of each limit that is currently being used.\n- **Threshold-Based Alerting:** Assigns a severity (success, warning, or error) to each limit based on configurable thresholds:\n - **Warning:** If usage exceeds 50% (configurable via `LIMIT_THRESHOLD_WARNING` environment variable).\n - **Error:** If usage exceeds 75% (configurable via `LIMIT_THRESHOLD_ERROR` environment variable).\n- **CSV Report Generation:** Generates a CSV file containing all org limits, their current usage, maximum allowed, and calculated percentage used, along with the assigned severity.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of limits that have exceeded the warning or error thresholds.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-limits/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce CLI Integration:** It executes the `sf org limits list` command to retrieve the current org limits. It parses the JSON output of this command.\n- **Data Processing:** It iterates through the retrieved limits, calculates the `used` and `percentUsed` values, and assigns a `severity` (success, warning, error) based on the configured thresholds.\n- **Environment Variable Configuration:** Reads `LIMIT_THRESHOLD_WARNING` and `LIMIT_THRESHOLD_ERROR` environment variables to set the warning and error thresholds for limit usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of org limits.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and detailed metrics for each limit, which can be consumed by monitoring dashboards like Grafana.\n- **Exit Code Management:** Sets the process exit code to 1 if any limit is in an 'error' state, indicating a critical issue.\n</details>\n",
|
|
7902
7941
|
"examples": [
|
|
7903
|
-
"$ sf hardis:org:
|
|
7904
|
-
"$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --no-prompt --delete-flow-interviews",
|
|
7905
|
-
"$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --status \"Obsolete,Draft,InvalidDraft\" --name TestFlow"
|
|
7942
|
+
"$ sf hardis:org:monitor:limits"
|
|
7906
7943
|
],
|
|
7907
7944
|
"flags": {
|
|
7908
7945
|
"json": {
|
|
@@ -7920,48 +7957,10 @@
|
|
|
7920
7957
|
"multiple": false,
|
|
7921
7958
|
"type": "option"
|
|
7922
7959
|
},
|
|
7923
|
-
"
|
|
7924
|
-
"char": "z",
|
|
7925
|
-
"description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
|
|
7926
|
-
"name": "prompt",
|
|
7927
|
-
"allowNo": true,
|
|
7928
|
-
"type": "boolean"
|
|
7929
|
-
},
|
|
7930
|
-
"name": {
|
|
7931
|
-
"char": "n",
|
|
7932
|
-
"description": "Filter according to Name criteria",
|
|
7933
|
-
"name": "name",
|
|
7934
|
-
"hasDynamicHelp": false,
|
|
7935
|
-
"multiple": false,
|
|
7936
|
-
"type": "option"
|
|
7937
|
-
},
|
|
7938
|
-
"status": {
|
|
7939
|
-
"char": "s",
|
|
7940
|
-
"description": "Filter according to Status criteria",
|
|
7941
|
-
"name": "status",
|
|
7942
|
-
"hasDynamicHelp": false,
|
|
7943
|
-
"multiple": false,
|
|
7944
|
-
"type": "option"
|
|
7945
|
-
},
|
|
7946
|
-
"delete-flow-interviews": {
|
|
7947
|
-
"char": "w",
|
|
7948
|
-
"description": "If the presence of Flow interviews prevent to delete flows versions, delete them before retrying to delete flow versions",
|
|
7949
|
-
"name": "delete-flow-interviews",
|
|
7950
|
-
"allowNo": false,
|
|
7951
|
-
"type": "boolean"
|
|
7952
|
-
},
|
|
7953
|
-
"allowpurgefailure": {
|
|
7960
|
+
"outputfile": {
|
|
7954
7961
|
"char": "f",
|
|
7955
|
-
"description": "
|
|
7956
|
-
"name": "
|
|
7957
|
-
"allowNo": true,
|
|
7958
|
-
"type": "boolean"
|
|
7959
|
-
},
|
|
7960
|
-
"instanceurl": {
|
|
7961
|
-
"char": "r",
|
|
7962
|
-
"description": "URL of org instance",
|
|
7963
|
-
"name": "instanceurl",
|
|
7964
|
-
"default": "https://login.salesforce.com",
|
|
7962
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7963
|
+
"name": "outputfile",
|
|
7965
7964
|
"hasDynamicHelp": false,
|
|
7966
7965
|
"multiple": false,
|
|
7967
7966
|
"type": "option"
|
|
@@ -8004,49 +8003,50 @@
|
|
|
8004
8003
|
},
|
|
8005
8004
|
"hasDynamicHelp": true,
|
|
8006
8005
|
"hiddenAliases": [],
|
|
8007
|
-
"id": "hardis:org:
|
|
8006
|
+
"id": "hardis:org:monitor:limits",
|
|
8008
8007
|
"pluginAlias": "sfdx-hardis",
|
|
8009
8008
|
"pluginName": "sfdx-hardis",
|
|
8010
8009
|
"pluginType": "core",
|
|
8011
8010
|
"strict": true,
|
|
8012
8011
|
"enableJsonFlag": true,
|
|
8013
|
-
"title": "
|
|
8014
|
-
"requiresProject":
|
|
8012
|
+
"title": "Check org limits",
|
|
8013
|
+
"requiresProject": true,
|
|
8014
|
+
"triggerNotification": true,
|
|
8015
8015
|
"isESM": true,
|
|
8016
8016
|
"relativePath": [
|
|
8017
8017
|
"lib",
|
|
8018
8018
|
"commands",
|
|
8019
8019
|
"hardis",
|
|
8020
8020
|
"org",
|
|
8021
|
-
"
|
|
8022
|
-
"
|
|
8021
|
+
"monitor",
|
|
8022
|
+
"limits.js"
|
|
8023
8023
|
],
|
|
8024
8024
|
"aliasPermutations": [],
|
|
8025
8025
|
"permutations": [
|
|
8026
|
-
"hardis:org:
|
|
8027
|
-
"org:hardis:
|
|
8028
|
-
"org:
|
|
8029
|
-
"org:
|
|
8030
|
-
"hardis:
|
|
8031
|
-
"
|
|
8032
|
-
"
|
|
8033
|
-
"
|
|
8034
|
-
"hardis:
|
|
8035
|
-
"
|
|
8036
|
-
"
|
|
8037
|
-
"
|
|
8038
|
-
"hardis:org:
|
|
8039
|
-
"org:hardis:
|
|
8040
|
-
"org:
|
|
8041
|
-
"org:
|
|
8042
|
-
"hardis:
|
|
8043
|
-
"
|
|
8044
|
-
"
|
|
8045
|
-
"
|
|
8046
|
-
"hardis:
|
|
8047
|
-
"
|
|
8048
|
-
"
|
|
8049
|
-
"
|
|
8026
|
+
"hardis:org:monitor:limits",
|
|
8027
|
+
"org:hardis:monitor:limits",
|
|
8028
|
+
"org:monitor:hardis:limits",
|
|
8029
|
+
"org:monitor:limits:hardis",
|
|
8030
|
+
"hardis:monitor:org:limits",
|
|
8031
|
+
"monitor:hardis:org:limits",
|
|
8032
|
+
"monitor:org:hardis:limits",
|
|
8033
|
+
"monitor:org:limits:hardis",
|
|
8034
|
+
"hardis:monitor:limits:org",
|
|
8035
|
+
"monitor:hardis:limits:org",
|
|
8036
|
+
"monitor:limits:hardis:org",
|
|
8037
|
+
"monitor:limits:org:hardis",
|
|
8038
|
+
"hardis:org:limits:monitor",
|
|
8039
|
+
"org:hardis:limits:monitor",
|
|
8040
|
+
"org:limits:hardis:monitor",
|
|
8041
|
+
"org:limits:monitor:hardis",
|
|
8042
|
+
"hardis:limits:org:monitor",
|
|
8043
|
+
"limits:hardis:org:monitor",
|
|
8044
|
+
"limits:org:hardis:monitor",
|
|
8045
|
+
"limits:org:monitor:hardis",
|
|
8046
|
+
"hardis:limits:monitor:org",
|
|
8047
|
+
"limits:hardis:monitor:org",
|
|
8048
|
+
"limits:monitor:hardis:org",
|
|
8049
|
+
"limits:monitor:org:hardis"
|
|
8050
8050
|
]
|
|
8051
8051
|
},
|
|
8052
8052
|
"hardis:org:refresh:after-refresh": {
|
|
@@ -15271,5 +15271,5 @@
|
|
|
15271
15271
|
]
|
|
15272
15272
|
}
|
|
15273
15273
|
},
|
|
15274
|
-
"version": "6.4.
|
|
15274
|
+
"version": "6.4.2"
|
|
15275
15275
|
}
|