sfdx-hardis 6.3.4-beta202509081032.0 → 6.4.1-beta202509082207.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/oclif.manifest.json +940 -940
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -132,13 +132,12 @@
|
|
|
132
132
|
"clear:cache:hardis"
|
|
133
133
|
]
|
|
134
134
|
},
|
|
135
|
-
"hardis:
|
|
135
|
+
"hardis:config:get": {
|
|
136
136
|
"aliases": [],
|
|
137
137
|
"args": {},
|
|
138
|
-
"description": "\n## Command Behavior\n\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:
|
|
141
|
-
"CI=true 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
|
-
"
|
|
160
|
-
"char": "
|
|
161
|
-
"description": "
|
|
162
|
-
"name": "
|
|
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:
|
|
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": "
|
|
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
|
-
"
|
|
218
|
-
"
|
|
208
|
+
"config",
|
|
209
|
+
"get.js"
|
|
219
210
|
],
|
|
220
211
|
"aliasPermutations": [],
|
|
221
212
|
"permutations": [
|
|
222
|
-
"hardis:
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"hardis:
|
|
226
|
-
"
|
|
227
|
-
"
|
|
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:
|
|
221
|
+
"hardis:auth:login": {
|
|
231
222
|
"aliases": [],
|
|
232
223
|
"args": {},
|
|
233
|
-
"description": "\n## Command Behavior\n\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:
|
|
226
|
+
"$ sf hardis:auth:login",
|
|
227
|
+
"CI=true 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
|
-
"
|
|
254
|
-
"char": "
|
|
255
|
-
"description": "
|
|
256
|
-
"name": "
|
|
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:
|
|
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": "
|
|
296
|
+
"title": "Login",
|
|
297
297
|
"requiresProject": false,
|
|
298
298
|
"isESM": true,
|
|
299
299
|
"relativePath": [
|
|
300
300
|
"lib",
|
|
301
301
|
"commands",
|
|
302
302
|
"hardis",
|
|
303
|
-
"
|
|
304
|
-
"
|
|
303
|
+
"auth",
|
|
304
|
+
"login.js"
|
|
305
305
|
],
|
|
306
306
|
"aliasPermutations": [],
|
|
307
307
|
"permutations": [
|
|
308
|
-
"hardis:
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"hardis:
|
|
312
|
-
"
|
|
313
|
-
"
|
|
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": {
|
|
@@ -5538,12 +5538,13 @@
|
|
|
5538
5538
|
"import:data:org:hardis"
|
|
5539
5539
|
]
|
|
5540
5540
|
},
|
|
5541
|
-
"hardis:org:
|
|
5541
|
+
"hardis:org:fix:listviewmine": {
|
|
5542
5542
|
"aliases": [],
|
|
5543
5543
|
"args": {},
|
|
5544
|
-
"description": "
|
|
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
5545
|
"examples": [
|
|
5546
|
-
"$ sf hardis:org:
|
|
5546
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
5547
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
5547
5548
|
],
|
|
5548
5549
|
"flags": {
|
|
5549
5550
|
"json": {
|
|
@@ -5561,37 +5562,10 @@
|
|
|
5561
5562
|
"multiple": false,
|
|
5562
5563
|
"type": "option"
|
|
5563
5564
|
},
|
|
5564
|
-
"
|
|
5565
|
-
"char": "
|
|
5566
|
-
"description": "
|
|
5567
|
-
"name": "
|
|
5568
|
-
"hasDynamicHelp": false,
|
|
5569
|
-
"multiple": false,
|
|
5570
|
-
"type": "option"
|
|
5571
|
-
},
|
|
5572
|
-
"chunksize": {
|
|
5573
|
-
"char": "c",
|
|
5574
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
5575
|
-
"name": "chunksize",
|
|
5576
|
-
"default": 1000,
|
|
5577
|
-
"hasDynamicHelp": false,
|
|
5578
|
-
"multiple": false,
|
|
5579
|
-
"type": "option"
|
|
5580
|
-
},
|
|
5581
|
-
"polltimeout": {
|
|
5582
|
-
"char": "t",
|
|
5583
|
-
"description": "Timeout in MS for Bulk API calls",
|
|
5584
|
-
"name": "polltimeout",
|
|
5585
|
-
"default": 300000,
|
|
5586
|
-
"hasDynamicHelp": false,
|
|
5587
|
-
"multiple": false,
|
|
5588
|
-
"type": "option"
|
|
5589
|
-
},
|
|
5590
|
-
"startchunknumber": {
|
|
5591
|
-
"char": "s",
|
|
5592
|
-
"description": "Chunk number to start from",
|
|
5593
|
-
"name": "startchunknumber",
|
|
5594
|
-
"default": 0,
|
|
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",
|
|
5595
5569
|
"hasDynamicHelp": false,
|
|
5596
5570
|
"multiple": false,
|
|
5597
5571
|
"type": "option"
|
|
@@ -5634,57 +5608,60 @@
|
|
|
5634
5608
|
},
|
|
5635
5609
|
"hasDynamicHelp": true,
|
|
5636
5610
|
"hiddenAliases": [],
|
|
5637
|
-
"id": "hardis:org:
|
|
5611
|
+
"id": "hardis:org:fix:listviewmine",
|
|
5638
5612
|
"pluginAlias": "sfdx-hardis",
|
|
5639
5613
|
"pluginName": "sfdx-hardis",
|
|
5640
5614
|
"pluginType": "core",
|
|
5641
5615
|
"strict": true,
|
|
5642
5616
|
"enableJsonFlag": true,
|
|
5643
|
-
"title": "
|
|
5644
|
-
"requiresProject":
|
|
5617
|
+
"title": "Fix listviews with ",
|
|
5618
|
+
"requiresProject": true,
|
|
5645
5619
|
"isESM": true,
|
|
5646
5620
|
"relativePath": [
|
|
5647
5621
|
"lib",
|
|
5648
5622
|
"commands",
|
|
5649
5623
|
"hardis",
|
|
5650
5624
|
"org",
|
|
5651
|
-
"
|
|
5652
|
-
"
|
|
5625
|
+
"fix",
|
|
5626
|
+
"listviewmine.js"
|
|
5653
5627
|
],
|
|
5654
5628
|
"aliasPermutations": [],
|
|
5655
5629
|
"permutations": [
|
|
5656
|
-
"hardis:org:
|
|
5657
|
-
"org:hardis:
|
|
5658
|
-
"org:
|
|
5659
|
-
"org:
|
|
5660
|
-
"hardis:
|
|
5661
|
-
"
|
|
5662
|
-
"
|
|
5663
|
-
"
|
|
5664
|
-
"hardis:
|
|
5665
|
-
"
|
|
5666
|
-
"
|
|
5667
|
-
"
|
|
5668
|
-
"hardis:org:
|
|
5669
|
-
"org:hardis:
|
|
5670
|
-
"org:
|
|
5671
|
-
"org:
|
|
5672
|
-
"hardis:
|
|
5673
|
-
"
|
|
5674
|
-
"
|
|
5675
|
-
"
|
|
5676
|
-
"hardis:
|
|
5677
|
-
"
|
|
5678
|
-
"
|
|
5679
|
-
"
|
|
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"
|
|
5680
5654
|
]
|
|
5681
5655
|
},
|
|
5682
|
-
"hardis:org:
|
|
5656
|
+
"hardis:org:diagnose:audittrail": {
|
|
5683
5657
|
"aliases": [],
|
|
5684
5658
|
"args": {},
|
|
5685
|
-
"description": "
|
|
5659
|
+
"description": "Export Audit trail into a CSV file with selected criteria, and highlight suspect actions\n\nAlso detects updates of Custom Settings values (disable by defining `SKIP_AUDIT_TRAIL_CUSTOM_SETTINGS=true`)\n\nRegular setup actions performed in major orgs are filtered.\n\n- \"\"\n - createScratchOrg\n - changedsenderemail\n - deleteScratchOrg\n - loginasgrantedtopartnerbt\n- Certificate and Key Management\n - insertCertificate\n- Custom App Licenses\n - addeduserpackagelicense\n - granteduserpackagelicense\n - revokeduserpackagelicense\n- Customer Portal\n - createdcustomersuccessuser\n - CSPUserDisabled\n- Currency\n - updateddatedexchrate\n- Data Management\n - queueMembership\n- Email Administration\n - dkimRotationPreparationSuccessful\n - dkimRotationSuccessful\n- External Objects\n - xdsEncryptedFieldChange\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n - siqUserAcceptedTOS\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedofflineuseroffon\n - changedprofileforuserstdtostd\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserAdminVerifiedStatusVerified\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedusername\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - changedUserPhoneVerifiedStatusVerified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suNetworkAdminLogin\n - suNetworkAdminLogout\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\n## Excel output example\n\n\n\n## Local output example\n\n\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-suspect-audit-trail/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
5686
5660
|
"examples": [
|
|
5687
|
-
"$ sf hardis:org:
|
|
5661
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5662
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5663
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5664
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5688
5665
|
],
|
|
5689
5666
|
"flags": {
|
|
5690
5667
|
"json": {
|
|
@@ -5702,20 +5679,29 @@
|
|
|
5702
5679
|
"multiple": false,
|
|
5703
5680
|
"type": "option"
|
|
5704
5681
|
},
|
|
5705
|
-
"
|
|
5706
|
-
"char": "
|
|
5707
|
-
"description": "
|
|
5708
|
-
"name": "
|
|
5682
|
+
"excludeusers": {
|
|
5683
|
+
"char": "e",
|
|
5684
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5685
|
+
"name": "excludeusers",
|
|
5709
5686
|
"hasDynamicHelp": false,
|
|
5710
5687
|
"multiple": false,
|
|
5711
5688
|
"type": "option"
|
|
5712
5689
|
},
|
|
5713
|
-
"
|
|
5690
|
+
"lastndays": {
|
|
5691
|
+
"char": "t",
|
|
5692
|
+
"description": "Number of days to extract from today (included)",
|
|
5693
|
+
"name": "lastndays",
|
|
5694
|
+
"hasDynamicHelp": false,
|
|
5695
|
+
"multiple": false,
|
|
5696
|
+
"type": "option"
|
|
5697
|
+
},
|
|
5698
|
+
"outputfile": {
|
|
5714
5699
|
"char": "f",
|
|
5715
|
-
"description": "
|
|
5716
|
-
"name": "
|
|
5717
|
-
"
|
|
5718
|
-
"
|
|
5700
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5701
|
+
"name": "outputfile",
|
|
5702
|
+
"hasDynamicHelp": false,
|
|
5703
|
+
"multiple": false,
|
|
5704
|
+
"type": "option"
|
|
5719
5705
|
},
|
|
5720
5706
|
"debug": {
|
|
5721
5707
|
"char": "d",
|
|
@@ -5755,13 +5741,13 @@
|
|
|
5755
5741
|
},
|
|
5756
5742
|
"hasDynamicHelp": true,
|
|
5757
5743
|
"hiddenAliases": [],
|
|
5758
|
-
"id": "hardis:org:
|
|
5744
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5759
5745
|
"pluginAlias": "sfdx-hardis",
|
|
5760
5746
|
"pluginName": "sfdx-hardis",
|
|
5761
5747
|
"pluginType": "core",
|
|
5762
5748
|
"strict": true,
|
|
5763
5749
|
"enableJsonFlag": true,
|
|
5764
|
-
"title": "
|
|
5750
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5765
5751
|
"requiresProject": false,
|
|
5766
5752
|
"isESM": true,
|
|
5767
5753
|
"relativePath": [
|
|
@@ -5769,44 +5755,43 @@
|
|
|
5769
5755
|
"commands",
|
|
5770
5756
|
"hardis",
|
|
5771
5757
|
"org",
|
|
5772
|
-
"
|
|
5773
|
-
"
|
|
5758
|
+
"diagnose",
|
|
5759
|
+
"audittrail.js"
|
|
5774
5760
|
],
|
|
5775
5761
|
"aliasPermutations": [],
|
|
5776
5762
|
"permutations": [
|
|
5777
|
-
"hardis:org:
|
|
5778
|
-
"org:hardis:
|
|
5779
|
-
"org:
|
|
5780
|
-
"org:
|
|
5781
|
-
"hardis:
|
|
5782
|
-
"
|
|
5783
|
-
"
|
|
5784
|
-
"
|
|
5785
|
-
"hardis:
|
|
5786
|
-
"
|
|
5787
|
-
"
|
|
5788
|
-
"
|
|
5789
|
-
"hardis:org:
|
|
5790
|
-
"org:hardis:
|
|
5791
|
-
"org:
|
|
5792
|
-
"org:
|
|
5793
|
-
"hardis:
|
|
5794
|
-
"
|
|
5795
|
-
"
|
|
5796
|
-
"
|
|
5797
|
-
"hardis:
|
|
5798
|
-
"
|
|
5799
|
-
"
|
|
5800
|
-
"
|
|
5763
|
+
"hardis:org:diagnose:audittrail",
|
|
5764
|
+
"org:hardis:diagnose:audittrail",
|
|
5765
|
+
"org:diagnose:hardis:audittrail",
|
|
5766
|
+
"org:diagnose:audittrail:hardis",
|
|
5767
|
+
"hardis:diagnose:org:audittrail",
|
|
5768
|
+
"diagnose:hardis:org:audittrail",
|
|
5769
|
+
"diagnose:org:hardis:audittrail",
|
|
5770
|
+
"diagnose:org:audittrail:hardis",
|
|
5771
|
+
"hardis:diagnose:audittrail:org",
|
|
5772
|
+
"diagnose:hardis:audittrail:org",
|
|
5773
|
+
"diagnose:audittrail:hardis:org",
|
|
5774
|
+
"diagnose:audittrail:org:hardis",
|
|
5775
|
+
"hardis:org:audittrail:diagnose",
|
|
5776
|
+
"org:hardis:audittrail:diagnose",
|
|
5777
|
+
"org:audittrail:hardis:diagnose",
|
|
5778
|
+
"org:audittrail:diagnose:hardis",
|
|
5779
|
+
"hardis:audittrail:org:diagnose",
|
|
5780
|
+
"audittrail:hardis:org:diagnose",
|
|
5781
|
+
"audittrail:org:hardis:diagnose",
|
|
5782
|
+
"audittrail:org:diagnose:hardis",
|
|
5783
|
+
"hardis:audittrail:diagnose:org",
|
|
5784
|
+
"audittrail:hardis:diagnose:org",
|
|
5785
|
+
"audittrail:diagnose:hardis:org",
|
|
5786
|
+
"audittrail:diagnose:org:hardis"
|
|
5801
5787
|
]
|
|
5802
5788
|
},
|
|
5803
|
-
"hardis:org:
|
|
5789
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5804
5790
|
"aliases": [],
|
|
5805
5791
|
"args": {},
|
|
5806
|
-
"description": "
|
|
5792
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the scheduled upgrade date for a Salesforce org's instance.**\n\nThis command provides crucial information about when your Salesforce instance will be upgraded to the next major release (Spring, Summer, or Winter). This is vital for release planning, testing, and ensuring compatibility with upcoming Salesforce features.\n\nKey functionalities:\n\n- **Instance Identification:** Determines the Salesforce instance name of your target org.\n- **Upgrade Date Retrieval:** Fetches the planned start time of the next major core service upgrade for that instance from the Salesforce Status API.\n- **Days Until Upgrade:** Calculates and displays the number of days remaining until the next major upgrade.\n- **Severity-Based Logging:** Adjusts the log severity (info, warning) based on the proximity of the upgrade date, providing a visual cue for urgency.\n- **Notifications:** Sends notifications to configured channels (e.g., Slack, MS Teams, Grafana) with the upgrade information, making it suitable for automated monitoring.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the `Organization` object in Salesforce to get the `InstanceName` of the target org.\n- **Salesforce Status API Integration:** It makes an HTTP GET request to the Salesforce Status API (`https://api.status.salesforce.com/v1/instances/{instanceName}/status`) to retrieve detailed information about the instance, including scheduled maintenances.\n- **Data Parsing:** It parses the JSON response from the Status API to extract the relevant major release upgrade information.\n- **Date Calculation:** Uses the `moment` library to calculate the difference in days between the current date and the planned upgrade date.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including the instance name, upgrade date, and days remaining, along with relevant metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the upgrade status and proximity.\n</details>\n",
|
|
5807
5793
|
"examples": [
|
|
5808
|
-
"$ sf hardis:org:
|
|
5809
|
-
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
5794
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5810
5795
|
],
|
|
5811
5796
|
"flags": {
|
|
5812
5797
|
"json": {
|
|
@@ -5824,14 +5809,6 @@
|
|
|
5824
5809
|
"multiple": false,
|
|
5825
5810
|
"type": "option"
|
|
5826
5811
|
},
|
|
5827
|
-
"listviews": {
|
|
5828
|
-
"char": "l",
|
|
5829
|
-
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
5830
|
-
"name": "listviews",
|
|
5831
|
-
"hasDynamicHelp": false,
|
|
5832
|
-
"multiple": false,
|
|
5833
|
-
"type": "option"
|
|
5834
|
-
},
|
|
5835
5812
|
"debug": {
|
|
5836
5813
|
"char": "d",
|
|
5837
5814
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5870,59 +5847,60 @@
|
|
|
5870
5847
|
},
|
|
5871
5848
|
"hasDynamicHelp": true,
|
|
5872
5849
|
"hiddenAliases": [],
|
|
5873
|
-
"id": "hardis:org:
|
|
5850
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
5874
5851
|
"pluginAlias": "sfdx-hardis",
|
|
5875
5852
|
"pluginName": "sfdx-hardis",
|
|
5876
5853
|
"pluginType": "core",
|
|
5877
5854
|
"strict": true,
|
|
5878
5855
|
"enableJsonFlag": true,
|
|
5879
|
-
"title": "
|
|
5880
|
-
"requiresProject":
|
|
5856
|
+
"title": "Get Instance Upgrade date",
|
|
5857
|
+
"requiresProject": false,
|
|
5881
5858
|
"isESM": true,
|
|
5882
5859
|
"relativePath": [
|
|
5883
5860
|
"lib",
|
|
5884
5861
|
"commands",
|
|
5885
5862
|
"hardis",
|
|
5886
5863
|
"org",
|
|
5887
|
-
"
|
|
5888
|
-
"
|
|
5864
|
+
"diagnose",
|
|
5865
|
+
"instanceupgrade.js"
|
|
5889
5866
|
],
|
|
5890
5867
|
"aliasPermutations": [],
|
|
5891
5868
|
"permutations": [
|
|
5892
|
-
"hardis:org:
|
|
5893
|
-
"org:hardis:
|
|
5894
|
-
"org:
|
|
5895
|
-
"org:
|
|
5896
|
-
"hardis:
|
|
5897
|
-
"
|
|
5898
|
-
"
|
|
5899
|
-
"
|
|
5900
|
-
"hardis:
|
|
5901
|
-
"
|
|
5902
|
-
"
|
|
5903
|
-
"
|
|
5904
|
-
"hardis:org:
|
|
5905
|
-
"org:hardis:
|
|
5906
|
-
"org:
|
|
5907
|
-
"org:
|
|
5908
|
-
"hardis:
|
|
5909
|
-
"
|
|
5910
|
-
"
|
|
5911
|
-
"
|
|
5912
|
-
"hardis:
|
|
5913
|
-
"
|
|
5914
|
-
"
|
|
5915
|
-
"
|
|
5869
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
5870
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
5871
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
5872
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
5873
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
5874
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
5875
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
5876
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
5877
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
5878
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
5879
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
5880
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
5881
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
5882
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
5883
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
5884
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
5885
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
5886
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
5887
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
5888
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
5889
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
5890
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
5891
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
5892
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
5916
5893
|
]
|
|
5917
5894
|
},
|
|
5918
|
-
"hardis:org:
|
|
5895
|
+
"hardis:org:diagnose:legacyapi": {
|
|
5919
5896
|
"aliases": [],
|
|
5920
5897
|
"args": {},
|
|
5921
|
-
"description": "
|
|
5898
|
+
"description": "Checks if an org uses retired or someday retired API version\n\n\nSee article below\n\n[](https://nicolas.vuillamy.fr/handle-salesforce-api-versions-deprecation-like-a-pro-335065f52238)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-deprecated-api-calls/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
5922
5899
|
"examples": [
|
|
5923
|
-
"$ sf hardis:org:
|
|
5924
|
-
"$ sf hardis:org:
|
|
5925
|
-
"$ sf hardis:org:
|
|
5900
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
5901
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
5902
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
5903
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
5926
5904
|
],
|
|
5927
5905
|
"flags": {
|
|
5928
5906
|
"json": {
|
|
@@ -5940,8 +5918,27 @@
|
|
|
5940
5918
|
"multiple": false,
|
|
5941
5919
|
"type": "option"
|
|
5942
5920
|
},
|
|
5921
|
+
"eventtype": {
|
|
5922
|
+
"char": "e",
|
|
5923
|
+
"description": "Type of EventLogFile event to analyze",
|
|
5924
|
+
"name": "eventtype",
|
|
5925
|
+
"default": "ApiTotalUsage",
|
|
5926
|
+
"hasDynamicHelp": false,
|
|
5927
|
+
"multiple": false,
|
|
5928
|
+
"type": "option"
|
|
5929
|
+
},
|
|
5930
|
+
"limit": {
|
|
5931
|
+
"char": "l",
|
|
5932
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
5933
|
+
"name": "limit",
|
|
5934
|
+
"default": 999,
|
|
5935
|
+
"hasDynamicHelp": false,
|
|
5936
|
+
"multiple": false,
|
|
5937
|
+
"type": "option"
|
|
5938
|
+
},
|
|
5943
5939
|
"outputfile": {
|
|
5944
|
-
"
|
|
5940
|
+
"char": "f",
|
|
5941
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5945
5942
|
"name": "outputfile",
|
|
5946
5943
|
"hasDynamicHelp": false,
|
|
5947
5944
|
"multiple": false,
|
|
@@ -5954,13 +5951,6 @@
|
|
|
5954
5951
|
"allowNo": false,
|
|
5955
5952
|
"type": "boolean"
|
|
5956
5953
|
},
|
|
5957
|
-
"no-prompt": {
|
|
5958
|
-
"char": "n",
|
|
5959
|
-
"description": "Do not prompt for org username, use the default one",
|
|
5960
|
-
"name": "no-prompt",
|
|
5961
|
-
"allowNo": false,
|
|
5962
|
-
"type": "boolean"
|
|
5963
|
-
},
|
|
5964
5954
|
"websocket": {
|
|
5965
5955
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5966
5956
|
"name": "websocket",
|
|
@@ -5992,13 +5982,13 @@
|
|
|
5992
5982
|
},
|
|
5993
5983
|
"hasDynamicHelp": true,
|
|
5994
5984
|
"hiddenAliases": [],
|
|
5995
|
-
"id": "hardis:org:
|
|
5985
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
5996
5986
|
"pluginAlias": "sfdx-hardis",
|
|
5997
5987
|
"pluginName": "sfdx-hardis",
|
|
5998
5988
|
"pluginType": "core",
|
|
5999
5989
|
"strict": true,
|
|
6000
5990
|
"enableJsonFlag": true,
|
|
6001
|
-
"title": "
|
|
5991
|
+
"title": "Check for legacy API use",
|
|
6002
5992
|
"requiresProject": false,
|
|
6003
5993
|
"isESM": true,
|
|
6004
5994
|
"relativePath": [
|
|
@@ -6006,46 +5996,43 @@
|
|
|
6006
5996
|
"commands",
|
|
6007
5997
|
"hardis",
|
|
6008
5998
|
"org",
|
|
6009
|
-
"
|
|
6010
|
-
"
|
|
5999
|
+
"diagnose",
|
|
6000
|
+
"legacyapi.js"
|
|
6011
6001
|
],
|
|
6012
6002
|
"aliasPermutations": [],
|
|
6013
6003
|
"permutations": [
|
|
6014
|
-
"hardis:org:
|
|
6015
|
-
"org:hardis:
|
|
6016
|
-
"org:
|
|
6017
|
-
"org:
|
|
6018
|
-
"hardis:
|
|
6019
|
-
"
|
|
6020
|
-
"
|
|
6021
|
-
"
|
|
6022
|
-
"hardis:
|
|
6023
|
-
"
|
|
6024
|
-
"
|
|
6025
|
-
"
|
|
6026
|
-
"hardis:org:
|
|
6027
|
-
"org:hardis:
|
|
6028
|
-
"org:
|
|
6029
|
-
"org:
|
|
6030
|
-
"hardis:
|
|
6031
|
-
"
|
|
6032
|
-
"
|
|
6033
|
-
"
|
|
6034
|
-
"hardis:
|
|
6035
|
-
"
|
|
6036
|
-
"
|
|
6037
|
-
"
|
|
6004
|
+
"hardis:org:diagnose:legacyapi",
|
|
6005
|
+
"org:hardis:diagnose:legacyapi",
|
|
6006
|
+
"org:diagnose:hardis:legacyapi",
|
|
6007
|
+
"org:diagnose:legacyapi:hardis",
|
|
6008
|
+
"hardis:diagnose:org:legacyapi",
|
|
6009
|
+
"diagnose:hardis:org:legacyapi",
|
|
6010
|
+
"diagnose:org:hardis:legacyapi",
|
|
6011
|
+
"diagnose:org:legacyapi:hardis",
|
|
6012
|
+
"hardis:diagnose:legacyapi:org",
|
|
6013
|
+
"diagnose:hardis:legacyapi:org",
|
|
6014
|
+
"diagnose:legacyapi:hardis:org",
|
|
6015
|
+
"diagnose:legacyapi:org:hardis",
|
|
6016
|
+
"hardis:org:legacyapi:diagnose",
|
|
6017
|
+
"org:hardis:legacyapi:diagnose",
|
|
6018
|
+
"org:legacyapi:hardis:diagnose",
|
|
6019
|
+
"org:legacyapi:diagnose:hardis",
|
|
6020
|
+
"hardis:legacyapi:org:diagnose",
|
|
6021
|
+
"legacyapi:hardis:org:diagnose",
|
|
6022
|
+
"legacyapi:org:hardis:diagnose",
|
|
6023
|
+
"legacyapi:org:diagnose:hardis",
|
|
6024
|
+
"hardis:legacyapi:diagnose:org",
|
|
6025
|
+
"legacyapi:hardis:diagnose:org",
|
|
6026
|
+
"legacyapi:diagnose:hardis:org",
|
|
6027
|
+
"legacyapi:diagnose:org:hardis"
|
|
6038
6028
|
]
|
|
6039
6029
|
},
|
|
6040
|
-
"hardis:org:diagnose:
|
|
6030
|
+
"hardis:org:diagnose:licenses": {
|
|
6041
6031
|
"aliases": [],
|
|
6042
6032
|
"args": {},
|
|
6043
|
-
"description": "
|
|
6033
|
+
"description": "\n**Lists and analyzes User Licenses and Permission Set Licenses subscribed and used in a Salesforce org.**\n\nThis command provides a comprehensive overview of your Salesforce license consumption. It's particularly useful for:\n\n- **License Management:** Understanding which licenses are active, how many are available, and how many are being used.\n- **Cost Optimization:** Identifying unused or underutilized licenses that could be reallocated or decommissioned.\n- **Compliance:** Ensuring that your organization is compliant with Salesforce licensing agreements.\n- **Monitoring:** Tracking license usage trends over time.\n\nKey functionalities:\n\n- **User License Details:** Retrieves information about standard and custom User Licenses, including `MasterLabel`, `Name`, `TotalLicenses`, and `UsedLicenses`.\n- **Permission Set License Details:** Retrieves information about Permission Set Licenses, including `MasterLabel`, `PermissionSetLicenseKey`, `TotalLicenses`, and `UsedLicenses`.\n- **Used Licenses Filter:** The `--usedonly` flag allows you to filter the report to show only licenses that have at least one `UsedLicenses` count greater than zero.\n- **CSV Report Generation:** Generates a CSV file containing all the retrieved license information, suitable for detailed analysis.\n- **Notifications:** Sends notifications to configured channels (e.g., Grafana, Slack, MS Teams) with a summary of license usage, including lists of active and used licenses.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It executes SOQL queries against the `UserLicense` and `PermissionSetLicense` objects in Salesforce to retrieve license data.\n- **Data Transformation:** It processes the query results, reformatting the data to be more readable and consistent for reporting purposes (e.g., removing `Id` and `attributes`, renaming `PermissionSetLicenseKey` to `Name`).\n- **Data Aggregation:** It aggregates license information, creating a `licensesByKey` object for quick lookups and a `usedLicenses` array for a concise list of actively used licenses.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of license data.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the license extraction process and the used licenses.\n</details>\n",
|
|
6044
6034
|
"examples": [
|
|
6045
|
-
"$ sf hardis:org:diagnose:
|
|
6046
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
6047
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
6048
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
6035
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
6049
6036
|
],
|
|
6050
6037
|
"flags": {
|
|
6051
6038
|
"json": {
|
|
@@ -6063,22 +6050,6 @@
|
|
|
6063
6050
|
"multiple": false,
|
|
6064
6051
|
"type": "option"
|
|
6065
6052
|
},
|
|
6066
|
-
"excludeusers": {
|
|
6067
|
-
"char": "e",
|
|
6068
|
-
"description": "Comma-separated list of usernames to exclude",
|
|
6069
|
-
"name": "excludeusers",
|
|
6070
|
-
"hasDynamicHelp": false,
|
|
6071
|
-
"multiple": false,
|
|
6072
|
-
"type": "option"
|
|
6073
|
-
},
|
|
6074
|
-
"lastndays": {
|
|
6075
|
-
"char": "t",
|
|
6076
|
-
"description": "Number of days to extract from today (included)",
|
|
6077
|
-
"name": "lastndays",
|
|
6078
|
-
"hasDynamicHelp": false,
|
|
6079
|
-
"multiple": false,
|
|
6080
|
-
"type": "option"
|
|
6081
|
-
},
|
|
6082
6053
|
"outputfile": {
|
|
6083
6054
|
"char": "f",
|
|
6084
6055
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6087,6 +6058,13 @@
|
|
|
6087
6058
|
"multiple": false,
|
|
6088
6059
|
"type": "option"
|
|
6089
6060
|
},
|
|
6061
|
+
"usedonly": {
|
|
6062
|
+
"char": "u",
|
|
6063
|
+
"description": "Filter to have only used licenses",
|
|
6064
|
+
"name": "usedonly",
|
|
6065
|
+
"allowNo": false,
|
|
6066
|
+
"type": "boolean"
|
|
6067
|
+
},
|
|
6090
6068
|
"debug": {
|
|
6091
6069
|
"char": "d",
|
|
6092
6070
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6125,13 +6103,13 @@
|
|
|
6125
6103
|
},
|
|
6126
6104
|
"hasDynamicHelp": true,
|
|
6127
6105
|
"hiddenAliases": [],
|
|
6128
|
-
"id": "hardis:org:diagnose:
|
|
6106
|
+
"id": "hardis:org:diagnose:licenses",
|
|
6129
6107
|
"pluginAlias": "sfdx-hardis",
|
|
6130
6108
|
"pluginName": "sfdx-hardis",
|
|
6131
6109
|
"pluginType": "core",
|
|
6132
6110
|
"strict": true,
|
|
6133
6111
|
"enableJsonFlag": true,
|
|
6134
|
-
"title": "
|
|
6112
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6135
6113
|
"requiresProject": false,
|
|
6136
6114
|
"isESM": true,
|
|
6137
6115
|
"relativePath": [
|
|
@@ -6140,42 +6118,42 @@
|
|
|
6140
6118
|
"hardis",
|
|
6141
6119
|
"org",
|
|
6142
6120
|
"diagnose",
|
|
6143
|
-
"
|
|
6121
|
+
"licenses.js"
|
|
6144
6122
|
],
|
|
6145
6123
|
"aliasPermutations": [],
|
|
6146
6124
|
"permutations": [
|
|
6147
|
-
"hardis:org:diagnose:
|
|
6148
|
-
"org:hardis:diagnose:
|
|
6149
|
-
"org:diagnose:hardis:
|
|
6150
|
-
"org:diagnose:
|
|
6151
|
-
"hardis:diagnose:org:
|
|
6152
|
-
"diagnose:hardis:org:
|
|
6153
|
-
"diagnose:org:hardis:
|
|
6154
|
-
"diagnose:org:
|
|
6155
|
-
"hardis:diagnose:
|
|
6156
|
-
"diagnose:hardis:
|
|
6157
|
-
"diagnose:
|
|
6158
|
-
"diagnose:
|
|
6159
|
-
"hardis:org:
|
|
6160
|
-
"org:hardis:
|
|
6161
|
-
"org:
|
|
6162
|
-
"org:
|
|
6163
|
-
"hardis:
|
|
6164
|
-
"
|
|
6165
|
-
"
|
|
6166
|
-
"
|
|
6167
|
-
"hardis:
|
|
6168
|
-
"
|
|
6169
|
-
"
|
|
6170
|
-
"
|
|
6125
|
+
"hardis:org:diagnose:licenses",
|
|
6126
|
+
"org:hardis:diagnose:licenses",
|
|
6127
|
+
"org:diagnose:hardis:licenses",
|
|
6128
|
+
"org:diagnose:licenses:hardis",
|
|
6129
|
+
"hardis:diagnose:org:licenses",
|
|
6130
|
+
"diagnose:hardis:org:licenses",
|
|
6131
|
+
"diagnose:org:hardis:licenses",
|
|
6132
|
+
"diagnose:org:licenses:hardis",
|
|
6133
|
+
"hardis:diagnose:licenses:org",
|
|
6134
|
+
"diagnose:hardis:licenses:org",
|
|
6135
|
+
"diagnose:licenses:hardis:org",
|
|
6136
|
+
"diagnose:licenses:org:hardis",
|
|
6137
|
+
"hardis:org:licenses:diagnose",
|
|
6138
|
+
"org:hardis:licenses:diagnose",
|
|
6139
|
+
"org:licenses:hardis:diagnose",
|
|
6140
|
+
"org:licenses:diagnose:hardis",
|
|
6141
|
+
"hardis:licenses:org:diagnose",
|
|
6142
|
+
"licenses:hardis:org:diagnose",
|
|
6143
|
+
"licenses:org:hardis:diagnose",
|
|
6144
|
+
"licenses:org:diagnose:hardis",
|
|
6145
|
+
"hardis:licenses:diagnose:org",
|
|
6146
|
+
"licenses:hardis:diagnose:org",
|
|
6147
|
+
"licenses:diagnose:hardis:org",
|
|
6148
|
+
"licenses:diagnose:org:hardis"
|
|
6171
6149
|
]
|
|
6172
6150
|
},
|
|
6173
|
-
"hardis:org:diagnose:
|
|
6151
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6174
6152
|
"aliases": [],
|
|
6175
6153
|
"args": {},
|
|
6176
|
-
"description": "
|
|
6154
|
+
"description": "Export Release Updates into a CSV file with selected criteria, and highlight Release Updates that should be checked.\n\nBefore publishing **Breaking Changes** ❌, Salesforce announce them in the setup menu [**Release Updates**](https://help.salesforce.com/s/articleView?id=sf.release_updates.htm&type=5)\n\n⚠️ Some of them are very important, because if you don't make the related upgrades in time (ex: before Winter 25) , your production org can crash !\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-release-updates/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
6177
6155
|
"examples": [
|
|
6178
|
-
"$ sf hardis:org:diagnose:
|
|
6156
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6179
6157
|
],
|
|
6180
6158
|
"flags": {
|
|
6181
6159
|
"json": {
|
|
@@ -6193,6 +6171,14 @@
|
|
|
6193
6171
|
"multiple": false,
|
|
6194
6172
|
"type": "option"
|
|
6195
6173
|
},
|
|
6174
|
+
"outputfile": {
|
|
6175
|
+
"char": "f",
|
|
6176
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6177
|
+
"name": "outputfile",
|
|
6178
|
+
"hasDynamicHelp": false,
|
|
6179
|
+
"multiple": false,
|
|
6180
|
+
"type": "option"
|
|
6181
|
+
},
|
|
6196
6182
|
"debug": {
|
|
6197
6183
|
"char": "d",
|
|
6198
6184
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6231,13 +6217,13 @@
|
|
|
6231
6217
|
},
|
|
6232
6218
|
"hasDynamicHelp": true,
|
|
6233
6219
|
"hiddenAliases": [],
|
|
6234
|
-
"id": "hardis:org:diagnose:
|
|
6220
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6235
6221
|
"pluginAlias": "sfdx-hardis",
|
|
6236
6222
|
"pluginName": "sfdx-hardis",
|
|
6237
6223
|
"pluginType": "core",
|
|
6238
6224
|
"strict": true,
|
|
6239
6225
|
"enableJsonFlag": true,
|
|
6240
|
-
"title": "
|
|
6226
|
+
"title": "Check Release Updates of an org",
|
|
6241
6227
|
"requiresProject": false,
|
|
6242
6228
|
"isESM": true,
|
|
6243
6229
|
"relativePath": [
|
|
@@ -6246,45 +6232,42 @@
|
|
|
6246
6232
|
"hardis",
|
|
6247
6233
|
"org",
|
|
6248
6234
|
"diagnose",
|
|
6249
|
-
"
|
|
6235
|
+
"releaseupdates.js"
|
|
6250
6236
|
],
|
|
6251
6237
|
"aliasPermutations": [],
|
|
6252
6238
|
"permutations": [
|
|
6253
|
-
"hardis:org:diagnose:
|
|
6254
|
-
"org:hardis:diagnose:
|
|
6255
|
-
"org:diagnose:hardis:
|
|
6256
|
-
"org:diagnose:
|
|
6257
|
-
"hardis:diagnose:org:
|
|
6258
|
-
"diagnose:hardis:org:
|
|
6259
|
-
"diagnose:org:hardis:
|
|
6260
|
-
"diagnose:org:
|
|
6261
|
-
"hardis:diagnose:
|
|
6262
|
-
"diagnose:hardis:
|
|
6263
|
-
"diagnose:
|
|
6264
|
-
"diagnose:
|
|
6265
|
-
"hardis:org:
|
|
6266
|
-
"org:hardis:
|
|
6267
|
-
"org:
|
|
6268
|
-
"org:
|
|
6269
|
-
"hardis:
|
|
6270
|
-
"
|
|
6271
|
-
"
|
|
6272
|
-
"
|
|
6273
|
-
"hardis:
|
|
6274
|
-
"
|
|
6275
|
-
"
|
|
6276
|
-
"
|
|
6239
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6240
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6241
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6242
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6243
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6244
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6245
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6246
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6247
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6248
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6249
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6250
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6251
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6252
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6253
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6254
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6255
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6256
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6257
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6258
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6259
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6260
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6261
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6262
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6277
6263
|
]
|
|
6278
6264
|
},
|
|
6279
|
-
"hardis:org:diagnose:
|
|
6265
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
6280
6266
|
"aliases": [],
|
|
6281
6267
|
"args": {},
|
|
6282
|
-
"description": "
|
|
6268
|
+
"description": "\n## Command Behavior\n\n**Detects unsecured Connected Apps in a Salesforce org and generates detailed reports for security analysis.**\n\nThis command is a critical security diagnostic tool that helps administrators identify Connected Apps that may pose security risks due to improper configuration. It provides comprehensive analysis of OAuth tokens and Connected App security settings to ensure proper access control.\n\nKey functionalities:\n\n- **OAuth Token Analysis:** Queries all OAuth tokens in the org using SOQL to retrieve comprehensive token information including app names, users, authorization status, and usage statistics.\n- **Security Status Assessment:** Evaluates each Connected App's security configuration by checking the `IsUsingAdminAuthorization` flag to determine if admin pre-approval is required.\n- **Unsecured App Detection:** Identifies Connected Apps that allow users to authorize themselves without admin approval, which can pose security risks.\n- **Detailed Reporting:** Generates two comprehensive CSV reports:\n - **OAuth Tokens Report:** Lists all OAuth tokens with security status, user information, and usage data\n - **Connected Apps Summary:** Aggregates unsecured Connected Apps with counts of associated OAuth tokens\n- **Visual Indicators:** Uses status icons (❌ for unsecured, ✅ for secured) to provide immediate visual feedback on security status.\n- **Security Recommendations:** Provides actionable guidance on how to secure Connected Apps through proper configuration.\n- **Notifications:** Sends alerts to configured channels (Grafana, Slack, MS Teams) with security findings and attached reports.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-security/) and can output Grafana, Slack and MsTeams Notifications.\n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/jHv8yrSK8Dg\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query Execution:** Executes a comprehensive SOQL query on the `OauthToken` object, joining with `AppMenuItem` and `User` objects to gather complete security context.\n- **Security Analysis Logic:** Analyzes the `AppMenuItem.IsUsingAdminAuthorization` field to determine if a Connected App requires admin pre-approval for user authorization.\n- **Data Transformation:** Processes raw SOQL results to add security status indicators and reorganize data for optimal reporting and analysis.\n- **Aggregation Processing:** Groups OAuth tokens by Connected App name to provide summary statistics and identify the most problematic applications.\n- **Report Generation:** Uses `generateCsvFile` to create structured CSV reports with proper formatting and metadata for easy analysis and sharing.\n- **Notification Integration:** Integrates with the `NotifProvider` to send security alerts with detailed metrics, including the number of unsecured Connected Apps and associated OAuth tokens.\n- **File Management:** Generates multiple output formats (CSV, XLSX) and manages file paths using `generateReportPath` for consistent report organization.\n- **Connection Management:** Uses `setConnectionVariables` to ensure proper authentication context for notification providers that require org connection details.\n</details>\n",
|
|
6283
6269
|
"examples": [
|
|
6284
|
-
"$ sf hardis:org:diagnose:
|
|
6285
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6286
|
-
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6287
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6270
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
6288
6271
|
],
|
|
6289
6272
|
"flags": {
|
|
6290
6273
|
"json": {
|
|
@@ -6302,24 +6285,6 @@
|
|
|
6302
6285
|
"multiple": false,
|
|
6303
6286
|
"type": "option"
|
|
6304
6287
|
},
|
|
6305
|
-
"eventtype": {
|
|
6306
|
-
"char": "e",
|
|
6307
|
-
"description": "Type of EventLogFile event to analyze",
|
|
6308
|
-
"name": "eventtype",
|
|
6309
|
-
"default": "ApiTotalUsage",
|
|
6310
|
-
"hasDynamicHelp": false,
|
|
6311
|
-
"multiple": false,
|
|
6312
|
-
"type": "option"
|
|
6313
|
-
},
|
|
6314
|
-
"limit": {
|
|
6315
|
-
"char": "l",
|
|
6316
|
-
"description": "Number of latest EventLogFile events to analyze",
|
|
6317
|
-
"name": "limit",
|
|
6318
|
-
"default": 999,
|
|
6319
|
-
"hasDynamicHelp": false,
|
|
6320
|
-
"multiple": false,
|
|
6321
|
-
"type": "option"
|
|
6322
|
-
},
|
|
6323
6288
|
"outputfile": {
|
|
6324
6289
|
"char": "f",
|
|
6325
6290
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6366,13 +6331,13 @@
|
|
|
6366
6331
|
},
|
|
6367
6332
|
"hasDynamicHelp": true,
|
|
6368
6333
|
"hiddenAliases": [],
|
|
6369
|
-
"id": "hardis:org:diagnose:
|
|
6334
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
6370
6335
|
"pluginAlias": "sfdx-hardis",
|
|
6371
6336
|
"pluginName": "sfdx-hardis",
|
|
6372
6337
|
"pluginType": "core",
|
|
6373
6338
|
"strict": true,
|
|
6374
6339
|
"enableJsonFlag": true,
|
|
6375
|
-
"title": "
|
|
6340
|
+
"title": "Detect Unsecured Connected Apps",
|
|
6376
6341
|
"requiresProject": false,
|
|
6377
6342
|
"isESM": true,
|
|
6378
6343
|
"relativePath": [
|
|
@@ -6381,42 +6346,43 @@
|
|
|
6381
6346
|
"hardis",
|
|
6382
6347
|
"org",
|
|
6383
6348
|
"diagnose",
|
|
6384
|
-
"
|
|
6349
|
+
"unsecure-connected-apps.js"
|
|
6385
6350
|
],
|
|
6386
6351
|
"aliasPermutations": [],
|
|
6387
6352
|
"permutations": [
|
|
6388
|
-
"hardis:org:diagnose:
|
|
6389
|
-
"org:hardis:diagnose:
|
|
6390
|
-
"org:diagnose:hardis:
|
|
6391
|
-
"org:diagnose:
|
|
6392
|
-
"hardis:diagnose:org:
|
|
6393
|
-
"diagnose:hardis:org:
|
|
6394
|
-
"diagnose:org:hardis:
|
|
6395
|
-
"diagnose:org:
|
|
6396
|
-
"hardis:diagnose:
|
|
6397
|
-
"diagnose:hardis:
|
|
6398
|
-
"diagnose:
|
|
6399
|
-
"diagnose:
|
|
6400
|
-
"hardis:org:
|
|
6401
|
-
"org:hardis:
|
|
6402
|
-
"org:
|
|
6403
|
-
"org:
|
|
6404
|
-
"hardis:
|
|
6405
|
-
"
|
|
6406
|
-
"
|
|
6407
|
-
"
|
|
6408
|
-
"hardis:
|
|
6409
|
-
"
|
|
6410
|
-
"
|
|
6411
|
-
"
|
|
6353
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
6354
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
6355
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
6356
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
6357
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
6358
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
6359
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
6360
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
6361
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
6362
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
6363
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
6364
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
6365
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
6366
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
6367
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
6368
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
6369
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
6370
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
6371
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
6372
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
6373
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
6374
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
6375
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
6376
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
6412
6377
|
]
|
|
6413
6378
|
},
|
|
6414
|
-
"hardis:org:diagnose:
|
|
6379
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6415
6380
|
"aliases": [],
|
|
6416
6381
|
"args": {},
|
|
6417
|
-
"description": "
|
|
6382
|
+
"description": "List all async Apex classes (Batch,Queueable,Schedulable) that has not been called for more than 365 days.\n \nThe result class list probably can be removed from the project, and that will improve your test classes performances :)\n\nThe number of unused day is overridable using --days option. \n\nThe command uses queries on AsyncApexJob and CronTrigger technical tables to build the result.\n\nApex Classes CreatedBy and CreatedOn fields are calculated from MIN(date from git, date from org)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-apex-classes/) and can output Grafana, Slack and MsTeams Notifications.\n\n\n",
|
|
6418
6383
|
"examples": [
|
|
6419
|
-
"$ sf hardis:org:diagnose:
|
|
6384
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6385
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6420
6386
|
],
|
|
6421
6387
|
"flags": {
|
|
6422
6388
|
"json": {
|
|
@@ -6442,12 +6408,13 @@
|
|
|
6442
6408
|
"multiple": false,
|
|
6443
6409
|
"type": "option"
|
|
6444
6410
|
},
|
|
6445
|
-
"
|
|
6446
|
-
"char": "
|
|
6447
|
-
"description": "
|
|
6448
|
-
"name": "
|
|
6449
|
-
"
|
|
6450
|
-
"
|
|
6411
|
+
"days": {
|
|
6412
|
+
"char": "t",
|
|
6413
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6414
|
+
"name": "days",
|
|
6415
|
+
"hasDynamicHelp": false,
|
|
6416
|
+
"multiple": false,
|
|
6417
|
+
"type": "option"
|
|
6451
6418
|
},
|
|
6452
6419
|
"debug": {
|
|
6453
6420
|
"char": "d",
|
|
@@ -6487,13 +6454,13 @@
|
|
|
6487
6454
|
},
|
|
6488
6455
|
"hasDynamicHelp": true,
|
|
6489
6456
|
"hiddenAliases": [],
|
|
6490
|
-
"id": "hardis:org:diagnose:
|
|
6457
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6491
6458
|
"pluginAlias": "sfdx-hardis",
|
|
6492
6459
|
"pluginName": "sfdx-hardis",
|
|
6493
6460
|
"pluginType": "core",
|
|
6494
6461
|
"strict": true,
|
|
6495
6462
|
"enableJsonFlag": true,
|
|
6496
|
-
"title": "
|
|
6463
|
+
"title": "Detect unused Apex classes in an org",
|
|
6497
6464
|
"requiresProject": false,
|
|
6498
6465
|
"isESM": true,
|
|
6499
6466
|
"relativePath": [
|
|
@@ -6502,47 +6469,47 @@
|
|
|
6502
6469
|
"hardis",
|
|
6503
6470
|
"org",
|
|
6504
6471
|
"diagnose",
|
|
6505
|
-
"
|
|
6472
|
+
"unused-apex-classes.js"
|
|
6506
6473
|
],
|
|
6507
6474
|
"aliasPermutations": [],
|
|
6508
6475
|
"permutations": [
|
|
6509
|
-
"hardis:org:diagnose:
|
|
6510
|
-
"org:hardis:diagnose:
|
|
6511
|
-
"org:diagnose:hardis:
|
|
6512
|
-
"org:diagnose:
|
|
6513
|
-
"hardis:diagnose:org:
|
|
6514
|
-
"diagnose:hardis:org:
|
|
6515
|
-
"diagnose:org:hardis:
|
|
6516
|
-
"diagnose:org:
|
|
6517
|
-
"hardis:diagnose:
|
|
6518
|
-
"diagnose:hardis:
|
|
6519
|
-
"diagnose:
|
|
6520
|
-
"diagnose:
|
|
6521
|
-
"hardis:org:
|
|
6522
|
-
"org:hardis:
|
|
6523
|
-
"org:
|
|
6524
|
-
"org:
|
|
6525
|
-
"hardis:
|
|
6526
|
-
"
|
|
6527
|
-
"
|
|
6528
|
-
"
|
|
6529
|
-
"hardis:
|
|
6530
|
-
"
|
|
6531
|
-
"
|
|
6532
|
-
"
|
|
6533
|
-
]
|
|
6534
|
-
},
|
|
6535
|
-
"hardis:org:diagnose:
|
|
6536
|
-
"aliases": [],
|
|
6537
|
-
"args": {},
|
|
6538
|
-
"description": "
|
|
6539
|
-
"examples": [
|
|
6540
|
-
"$ sf hardis:org:diagnose:
|
|
6541
|
-
],
|
|
6542
|
-
"flags": {
|
|
6543
|
-
"json": {
|
|
6544
|
-
"description": "Format output as json.",
|
|
6545
|
-
"helpGroup": "GLOBAL",
|
|
6476
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6477
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6478
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6479
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6480
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6481
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6482
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6483
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6484
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6485
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6486
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6487
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6488
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6489
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6490
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6491
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6492
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6493
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6494
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6495
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6496
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6497
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6498
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6499
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6500
|
+
]
|
|
6501
|
+
},
|
|
6502
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6503
|
+
"aliases": [],
|
|
6504
|
+
"args": {},
|
|
6505
|
+
"description": "\n## Command Behavior\n\n**Identifies and reports on potentially unused Connected Apps in a Salesforce org, suggesting candidates for deletion or deactivation.**\n\nThis command helps improve org security and reduce technical debt by pinpointing Connected Apps that are no longer actively used. Connected Apps can pose security risks if left unmonitored, and cleaning them up contributes to a healthier Salesforce environment.\n\nKey functionalities:\n\n- **Connected App Data Collection:** Gathers information about all Connected Apps in the org, including creation and last modified dates, and associated users.\n- **Usage Analysis:** Analyzes `LoginHistory` and `OAuthToken` records to determine the last usage date of each Connected App.\n- **Inactivity Detection:** Flags Connected Apps as potentially unused if they have no recent login history or OAuth token usage.\n- **Accessibility Check:** Examines Connected App metadata to identify if they are accessible (e.g., if they require admin approval and have no profiles or permission sets assigned).\n- **Ignored Apps:** Automatically ignores a predefined list of common Salesforce Connected Apps (e.g., `Salesforce CLI`, `Salesforce Mobile Dashboards`). You can extend this list by defining the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n- **CSV Report Generation:** Generates a CSV file containing details of all analyzed Connected Apps, including their usage status, last usage date, and reasons for being flagged as potentially unused.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of potentially unused Connected Apps.\n\n**Default Ignored Connected Apps:**\n\n- Ant Migration Tool\n- Chatter Desktop\n- Chatter Mobile for BlackBerry\n- Force.com IDE\n- OIQ_Integration\n- Salesforce CLI\n- Salesforce Files\n- Salesforce Mobile Dashboards\n- Salesforce Touch\n- Salesforce for Outlook\n- SalesforceA\n- SalesforceA for Android\n- SalesforceA for iOS\n- SalesforceDX Namespace Registry\n- SalesforceIQ\n\nYou can add more ignored apps by defining a comma-separated list of names in the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n\n_Example: \nALLOWED_INACTIVE_CONNECTED_APPS=My App 1,My App 2, My App 3_\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-connected-apps/) 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 SOQL Queries:** It performs SOQL queries against `ConnectedApplication`, `LoginHistory`, and `OAuthToken` objects to gather comprehensive data about Connected Apps and their usage.\n- **Temporary SFDX Project:** It creates a temporary SFDX project to retrieve Connected App metadata, allowing for local parsing and analysis of their XML files.\n- **Metadata Parsing:** It parses the `connectedApp-meta.xml` files to check for `isAdminApproved` and the presence of `profileName` or `permissionsetName` to determine accessibility.\n- **Data Correlation:** It correlates data from various Salesforce objects to build a complete picture of each Connected App's usage and status.\n- **Date Calculation:** Uses `moment` to calculate the time since the last OAuth token usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused Connected Apps.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **File System Operations:** Uses `fs-extra` for creating and removing temporary directories and files.\n- **Environment Variable Reading:** Reads the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable to customize the list of ignored Connected Apps.\n</details>\n",
|
|
6506
|
+
"examples": [
|
|
6507
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6508
|
+
],
|
|
6509
|
+
"flags": {
|
|
6510
|
+
"json": {
|
|
6511
|
+
"description": "Format output as json.",
|
|
6512
|
+
"helpGroup": "GLOBAL",
|
|
6546
6513
|
"name": "json",
|
|
6547
6514
|
"allowNo": false,
|
|
6548
6515
|
"type": "boolean"
|
|
@@ -6601,13 +6568,30 @@
|
|
|
6601
6568
|
},
|
|
6602
6569
|
"hasDynamicHelp": true,
|
|
6603
6570
|
"hiddenAliases": [],
|
|
6604
|
-
"id": "hardis:org:diagnose:
|
|
6571
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6605
6572
|
"pluginAlias": "sfdx-hardis",
|
|
6606
6573
|
"pluginName": "sfdx-hardis",
|
|
6607
6574
|
"pluginType": "core",
|
|
6608
6575
|
"strict": true,
|
|
6609
6576
|
"enableJsonFlag": true,
|
|
6610
|
-
"title": "
|
|
6577
|
+
"title": "Unused Connected Apps in an org",
|
|
6578
|
+
"allowedInactiveConnectedApps": [
|
|
6579
|
+
"Ant Migration Tool",
|
|
6580
|
+
"Chatter Desktop",
|
|
6581
|
+
"Chatter Mobile for BlackBerry",
|
|
6582
|
+
"Force.com IDE",
|
|
6583
|
+
"OIQ_Integration",
|
|
6584
|
+
"Salesforce CLI",
|
|
6585
|
+
"Salesforce Files",
|
|
6586
|
+
"Salesforce Mobile Dashboards",
|
|
6587
|
+
"Salesforce Touch",
|
|
6588
|
+
"Salesforce for Outlook",
|
|
6589
|
+
"SalesforceA",
|
|
6590
|
+
"SalesforceA for Android",
|
|
6591
|
+
"SalesforceA for iOS",
|
|
6592
|
+
"SalesforceDX Namespace Registry",
|
|
6593
|
+
"SalesforceIQ"
|
|
6594
|
+
],
|
|
6611
6595
|
"requiresProject": false,
|
|
6612
6596
|
"isESM": true,
|
|
6613
6597
|
"relativePath": [
|
|
@@ -6616,42 +6600,43 @@
|
|
|
6616
6600
|
"hardis",
|
|
6617
6601
|
"org",
|
|
6618
6602
|
"diagnose",
|
|
6619
|
-
"
|
|
6603
|
+
"unused-connected-apps.js"
|
|
6620
6604
|
],
|
|
6621
6605
|
"aliasPermutations": [],
|
|
6622
6606
|
"permutations": [
|
|
6623
|
-
"hardis:org:diagnose:
|
|
6624
|
-
"org:hardis:diagnose:
|
|
6625
|
-
"org:diagnose:hardis:
|
|
6626
|
-
"org:diagnose:
|
|
6627
|
-
"hardis:diagnose:org:
|
|
6628
|
-
"diagnose:hardis:org:
|
|
6629
|
-
"diagnose:org:hardis:
|
|
6630
|
-
"diagnose:org:
|
|
6631
|
-
"hardis:diagnose:
|
|
6632
|
-
"diagnose:hardis:
|
|
6633
|
-
"diagnose:
|
|
6634
|
-
"diagnose:
|
|
6635
|
-
"hardis:org:
|
|
6636
|
-
"org:hardis:
|
|
6637
|
-
"org:
|
|
6638
|
-
"org:
|
|
6639
|
-
"hardis:
|
|
6640
|
-
"
|
|
6641
|
-
"
|
|
6642
|
-
"
|
|
6643
|
-
"hardis:
|
|
6644
|
-
"
|
|
6645
|
-
"
|
|
6646
|
-
"
|
|
6607
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6608
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6609
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6610
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6611
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6612
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6613
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6614
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6615
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6616
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6617
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6618
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6619
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6620
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6621
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6622
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6623
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6624
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6625
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6626
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6627
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6628
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6629
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6630
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6647
6631
|
]
|
|
6648
6632
|
},
|
|
6649
|
-
"hardis:org:diagnose:
|
|
6633
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6650
6634
|
"aliases": [],
|
|
6651
6635
|
"args": {},
|
|
6652
|
-
"description": "\n## Command Behavior\n\n**Detects
|
|
6636
|
+
"description": "\n## Command Behavior\n\n**Detects and suggests the deletion of unused Permission Set License Assignments in a Salesforce org.**\n\nWhen a Permission Set (PS) linked to a Permission Set License (PSL) is assigned to a user, a Permission Set License Assignment (PSLA) is automatically created. However, when that PS is unassigned from the user, the PSLA is *not* automatically deleted. This can lead to organizations being charged for unused PSLAs, representing a hidden cost and technical debt.\n\nThis command identifies such useless PSLAs and provides options to delete them, helping to optimize license usage and reduce unnecessary expenses.\n\nKey functionalities:\n\n- **PSLA Detection:** Queries the Salesforce org to find all active PSLAs.\n- **Usage Verification:** Correlates PSLAs with actual Permission Set Assignments and Permission Set Group Assignments to determine if the underlying Permission Sets are still assigned to the user.\n- **Special Case Handling:** Accounts for specific scenarios where profiles might implicitly assign PSLAs (e.g., `Salesforce API Only` profile assigning `SalesforceAPIIntegrationPsl`) and allows for always excluding certain PSLAs from the unused check.\n- **Reporting:** Generates a CSV report of all identified unused PSLAs, including the user and the associated Permission Set License.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of unused PSLAs.\n- **Interactive Deletion:** In non-CI environments, it offers an interactive prompt to bulk delete the identified unused PSLAs.\n\nMany thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command :)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-licenses/) 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 extensive querying of Salesforce objects and data correlation:\n\n- **SOQL Queries (Bulk API):** It uses `bulkQuery` and `bulkQueryChunksIn` to efficiently retrieve large volumes of data from `PermissionSetLicenseAssign`, `PermissionSetLicense`, `PermissionSet`, `PermissionSetGroupComponent`, and `PermissionSetAssignment` objects.\n- **Data Correlation:** It meticulously correlates data across these objects to determine if a `PermissionSetLicenseAssign` record has a corresponding active assignment to a Permission Set or Permission Set Group for the same user.\n- **Filtering Logic:** It applies complex filtering logic to exclude PSLAs that are genuinely in use or are part of predefined exceptions (e.g., `alwaysExcludeForActiveUsersPermissionSetLicenses`).\n- **Bulk Deletion:** If the user opts to delete unused PSLAs, it uses `bulkUpdate` with the `delete` operation to efficiently remove multiple records.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused PSLAs.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Interaction:** Uses `prompts` for interactive confirmation before performing deletion operations.\n</details>\n",
|
|
6653
6637
|
"examples": [
|
|
6654
|
-
"$ sf hardis:org:diagnose:
|
|
6638
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6639
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6655
6640
|
],
|
|
6656
6641
|
"flags": {
|
|
6657
6642
|
"json": {
|
|
@@ -6715,14 +6700,32 @@
|
|
|
6715
6700
|
},
|
|
6716
6701
|
"hasDynamicHelp": true,
|
|
6717
6702
|
"hiddenAliases": [],
|
|
6718
|
-
"id": "hardis:org:diagnose:
|
|
6703
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
6719
6704
|
"pluginAlias": "sfdx-hardis",
|
|
6720
6705
|
"pluginName": "sfdx-hardis",
|
|
6721
6706
|
"pluginType": "core",
|
|
6722
6707
|
"strict": true,
|
|
6723
6708
|
"enableJsonFlag": true,
|
|
6724
|
-
"title": "Detect
|
|
6709
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
6725
6710
|
"requiresProject": false,
|
|
6711
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6712
|
+
"Sales_User"
|
|
6713
|
+
],
|
|
6714
|
+
"permSetsPermSetLicenses": [
|
|
6715
|
+
{
|
|
6716
|
+
"permSet": "Sales_User",
|
|
6717
|
+
"permSetLicense": "SalesUserPsl"
|
|
6718
|
+
}
|
|
6719
|
+
],
|
|
6720
|
+
"profilesPermissionSetLicenses": [
|
|
6721
|
+
{
|
|
6722
|
+
"profile": "Salesforce API Only",
|
|
6723
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6724
|
+
}
|
|
6725
|
+
],
|
|
6726
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6727
|
+
"IdentityConnect"
|
|
6728
|
+
],
|
|
6726
6729
|
"isESM": true,
|
|
6727
6730
|
"relativePath": [
|
|
6728
6731
|
"lib",
|
|
@@ -6730,43 +6733,46 @@
|
|
|
6730
6733
|
"hardis",
|
|
6731
6734
|
"org",
|
|
6732
6735
|
"diagnose",
|
|
6733
|
-
"
|
|
6736
|
+
"unusedlicenses.js"
|
|
6734
6737
|
],
|
|
6735
6738
|
"aliasPermutations": [],
|
|
6736
6739
|
"permutations": [
|
|
6737
|
-
"hardis:org:diagnose:
|
|
6738
|
-
"org:hardis:diagnose:
|
|
6739
|
-
"org:diagnose:hardis:
|
|
6740
|
-
"org:diagnose:
|
|
6741
|
-
"hardis:diagnose:org:
|
|
6742
|
-
"diagnose:hardis:org:
|
|
6743
|
-
"diagnose:org:hardis:
|
|
6744
|
-
"diagnose:org:
|
|
6745
|
-
"hardis:diagnose:
|
|
6746
|
-
"diagnose:hardis:
|
|
6747
|
-
"diagnose:
|
|
6748
|
-
"diagnose:
|
|
6749
|
-
"hardis:org:
|
|
6750
|
-
"org:hardis:
|
|
6751
|
-
"org:
|
|
6752
|
-
"org:
|
|
6753
|
-
"hardis:
|
|
6754
|
-
"
|
|
6755
|
-
"
|
|
6756
|
-
"
|
|
6757
|
-
"hardis:
|
|
6758
|
-
"
|
|
6759
|
-
"
|
|
6760
|
-
"
|
|
6740
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
6741
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
6742
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
6743
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
6744
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
6745
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
6746
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
6747
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
6748
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
6749
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
6750
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
6751
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
6752
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
6753
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
6754
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
6755
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
6756
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
6757
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
6758
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
6759
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
6760
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
6761
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
6762
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
6763
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
6761
6764
|
]
|
|
6762
6765
|
},
|
|
6763
|
-
"hardis:org:diagnose:
|
|
6766
|
+
"hardis:org:diagnose:unusedusers": {
|
|
6764
6767
|
"aliases": [],
|
|
6765
6768
|
"args": {},
|
|
6766
|
-
"description": "
|
|
6769
|
+
"description": "\n## Command Behavior\n\n**Detects and reports on inactive or unused Salesforce user accounts, helping to optimize license usage and enhance security.**\n\nEfficient user management is vital in Salesforce to ensure resources are optimized and costs are controlled. However, inactive or unused user accounts can often go unnoticed, leading to wasted licenses and potential security risks. This tool addresses this challenge by enabling administrators to identify users who haven't logged in within a specified period.\n\nBy analyzing user login activity and last login timestamps, this feature highlights inactive user accounts, allowing administrators to take appropriate action. Whether it's deactivating dormant accounts, freeing up licenses, or ensuring compliance with security policies, this functionality empowers administrators to maintain a lean and secure Salesforce environment.\n\nKey functionalities:\n\n- **Inactivity Detection:** Identifies users who have not logged in for a specified number of days (`--days` flag, default 180 days in CI, 365 days otherwise).\n- **License Type Filtering:** Allows filtering users by license type using `--licensetypes` (e.g., `all-crm`, `all-paying`) or specific license identifiers using `--licenseidentifiers`.\n - `all-crm`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT` licenses.\n - `all-paying`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT`, `PID_Customer_Community`, `PID_Customer_Community_Login`, `PID_Partner_Community`, `PID_Partner_Community_Login` licenses.\n - Note: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/sfdx_cli_reference/sforce_api_objects_userlicense.htm).\n- **Active User Retrieval:** The `--returnactiveusers` flag inverts the command, allowing you to retrieve active users who *have* logged in during the specified period.\n- **CSV Report Generation:** Generates a CSV file containing details of all identified users (inactive or active), including their last login date, profile, and license information.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of inactive or active users.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-users/) 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- **SOQL Query (Bulk API):** It uses `bulkQuery` to efficiently retrieve user records from the Salesforce `User` object. The SOQL query dynamically constructs its WHERE clause based on the `--days`, `--licensetypes`, `--licenseidentifiers`, and `--returnactiveusers` flags.\n- **Interactive Prompts:** Uses `prompts` to interactively ask the user for the number of inactive days and license types if not provided via flags.\n- **License Mapping:** Internally maps common license type aliases (e.g., `all-crm`) to their corresponding Salesforce `LicenseDefinitionKey` values.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of users.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides a summary of the findings in the console, indicating the number of inactive or active users found.\n</details>",
|
|
6767
6770
|
"examples": [
|
|
6768
|
-
"$ sf hardis:org:diagnose:
|
|
6769
|
-
"$ sf hardis:org:diagnose:
|
|
6771
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
6772
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6773
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6774
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6775
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6770
6776
|
],
|
|
6771
6777
|
"flags": {
|
|
6772
6778
|
"json": {
|
|
@@ -6800,6 +6806,33 @@
|
|
|
6800
6806
|
"multiple": false,
|
|
6801
6807
|
"type": "option"
|
|
6802
6808
|
},
|
|
6809
|
+
"licensetypes": {
|
|
6810
|
+
"char": "l",
|
|
6811
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6812
|
+
"name": "licensetypes",
|
|
6813
|
+
"hasDynamicHelp": false,
|
|
6814
|
+
"multiple": false,
|
|
6815
|
+
"options": [
|
|
6816
|
+
"all",
|
|
6817
|
+
"all-crm",
|
|
6818
|
+
"all-paying"
|
|
6819
|
+
],
|
|
6820
|
+
"type": "option"
|
|
6821
|
+
},
|
|
6822
|
+
"licenseidentifiers": {
|
|
6823
|
+
"char": "i",
|
|
6824
|
+
"description": "Comma-separated list of license identifiers, in case licensetypes is not used.. Identifiers available at https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm",
|
|
6825
|
+
"name": "licenseidentifiers",
|
|
6826
|
+
"hasDynamicHelp": false,
|
|
6827
|
+
"multiple": false,
|
|
6828
|
+
"type": "option"
|
|
6829
|
+
},
|
|
6830
|
+
"returnactiveusers": {
|
|
6831
|
+
"description": "Inverts the command by returning the active users",
|
|
6832
|
+
"name": "returnactiveusers",
|
|
6833
|
+
"allowNo": false,
|
|
6834
|
+
"type": "boolean"
|
|
6835
|
+
},
|
|
6803
6836
|
"debug": {
|
|
6804
6837
|
"char": "d",
|
|
6805
6838
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6838,13 +6871,13 @@
|
|
|
6838
6871
|
},
|
|
6839
6872
|
"hasDynamicHelp": true,
|
|
6840
6873
|
"hiddenAliases": [],
|
|
6841
|
-
"id": "hardis:org:diagnose:
|
|
6874
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
6842
6875
|
"pluginAlias": "sfdx-hardis",
|
|
6843
6876
|
"pluginName": "sfdx-hardis",
|
|
6844
6877
|
"pluginType": "core",
|
|
6845
6878
|
"strict": true,
|
|
6846
6879
|
"enableJsonFlag": true,
|
|
6847
|
-
"title": "Detect unused
|
|
6880
|
+
"title": "Detect unused Users in Salesforce",
|
|
6848
6881
|
"requiresProject": false,
|
|
6849
6882
|
"isESM": true,
|
|
6850
6883
|
"relativePath": [
|
|
@@ -6853,42 +6886,44 @@
|
|
|
6853
6886
|
"hardis",
|
|
6854
6887
|
"org",
|
|
6855
6888
|
"diagnose",
|
|
6856
|
-
"
|
|
6889
|
+
"unusedusers.js"
|
|
6857
6890
|
],
|
|
6858
6891
|
"aliasPermutations": [],
|
|
6859
6892
|
"permutations": [
|
|
6860
|
-
"hardis:org:diagnose:
|
|
6861
|
-
"org:hardis:diagnose:
|
|
6862
|
-
"org:diagnose:hardis:
|
|
6863
|
-
"org:diagnose:
|
|
6864
|
-
"hardis:diagnose:org:
|
|
6865
|
-
"diagnose:hardis:org:
|
|
6866
|
-
"diagnose:org:hardis:
|
|
6867
|
-
"diagnose:org:
|
|
6868
|
-
"hardis:diagnose:
|
|
6869
|
-
"diagnose:hardis:
|
|
6870
|
-
"diagnose:
|
|
6871
|
-
"diagnose:
|
|
6872
|
-
"hardis:org:
|
|
6873
|
-
"org:hardis:
|
|
6874
|
-
"org:
|
|
6875
|
-
"org:
|
|
6876
|
-
"hardis:
|
|
6877
|
-
"
|
|
6878
|
-
"
|
|
6879
|
-
"
|
|
6880
|
-
"hardis:
|
|
6881
|
-
"
|
|
6882
|
-
"
|
|
6883
|
-
"
|
|
6884
|
-
]
|
|
6893
|
+
"hardis:org:diagnose:unusedusers",
|
|
6894
|
+
"org:hardis:diagnose:unusedusers",
|
|
6895
|
+
"org:diagnose:hardis:unusedusers",
|
|
6896
|
+
"org:diagnose:unusedusers:hardis",
|
|
6897
|
+
"hardis:diagnose:org:unusedusers",
|
|
6898
|
+
"diagnose:hardis:org:unusedusers",
|
|
6899
|
+
"diagnose:org:hardis:unusedusers",
|
|
6900
|
+
"diagnose:org:unusedusers:hardis",
|
|
6901
|
+
"hardis:diagnose:unusedusers:org",
|
|
6902
|
+
"diagnose:hardis:unusedusers:org",
|
|
6903
|
+
"diagnose:unusedusers:hardis:org",
|
|
6904
|
+
"diagnose:unusedusers:org:hardis",
|
|
6905
|
+
"hardis:org:unusedusers:diagnose",
|
|
6906
|
+
"org:hardis:unusedusers:diagnose",
|
|
6907
|
+
"org:unusedusers:hardis:diagnose",
|
|
6908
|
+
"org:unusedusers:diagnose:hardis",
|
|
6909
|
+
"hardis:unusedusers:org:diagnose",
|
|
6910
|
+
"unusedusers:hardis:org:diagnose",
|
|
6911
|
+
"unusedusers:org:hardis:diagnose",
|
|
6912
|
+
"unusedusers:org:diagnose:hardis",
|
|
6913
|
+
"hardis:unusedusers:diagnose:org",
|
|
6914
|
+
"unusedusers:hardis:diagnose:org",
|
|
6915
|
+
"unusedusers:diagnose:hardis:org",
|
|
6916
|
+
"unusedusers:diagnose:org:hardis"
|
|
6917
|
+
]
|
|
6885
6918
|
},
|
|
6886
|
-
"hardis:org:
|
|
6919
|
+
"hardis:org:generate:packagexmlfull": {
|
|
6887
6920
|
"aliases": [],
|
|
6888
6921
|
"args": {},
|
|
6889
|
-
"description": "\n## Command Behavior\n\n**
|
|
6922
|
+
"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",
|
|
6890
6923
|
"examples": [
|
|
6891
|
-
"$ sf hardis:org:
|
|
6924
|
+
"$ sf hardis:org:generate:packagexmlfull",
|
|
6925
|
+
"$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
|
|
6926
|
+
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
6892
6927
|
],
|
|
6893
6928
|
"flags": {
|
|
6894
6929
|
"json": {
|
|
@@ -6907,8 +6942,7 @@
|
|
|
6907
6942
|
"type": "option"
|
|
6908
6943
|
},
|
|
6909
6944
|
"outputfile": {
|
|
6910
|
-
"
|
|
6911
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6945
|
+
"description": "Output package.xml file",
|
|
6912
6946
|
"name": "outputfile",
|
|
6913
6947
|
"hasDynamicHelp": false,
|
|
6914
6948
|
"multiple": false,
|
|
@@ -6921,6 +6955,13 @@
|
|
|
6921
6955
|
"allowNo": false,
|
|
6922
6956
|
"type": "boolean"
|
|
6923
6957
|
},
|
|
6958
|
+
"no-prompt": {
|
|
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
|
+
},
|
|
6924
6965
|
"websocket": {
|
|
6925
6966
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
6926
6967
|
"name": "websocket",
|
|
@@ -6952,30 +6993,13 @@
|
|
|
6952
6993
|
},
|
|
6953
6994
|
"hasDynamicHelp": true,
|
|
6954
6995
|
"hiddenAliases": [],
|
|
6955
|
-
"id": "hardis:org:
|
|
6996
|
+
"id": "hardis:org:generate:packagexmlfull",
|
|
6956
6997
|
"pluginAlias": "sfdx-hardis",
|
|
6957
6998
|
"pluginName": "sfdx-hardis",
|
|
6958
6999
|
"pluginType": "core",
|
|
6959
7000
|
"strict": true,
|
|
6960
7001
|
"enableJsonFlag": true,
|
|
6961
|
-
"title": "
|
|
6962
|
-
"allowedInactiveConnectedApps": [
|
|
6963
|
-
"Ant Migration Tool",
|
|
6964
|
-
"Chatter Desktop",
|
|
6965
|
-
"Chatter Mobile for BlackBerry",
|
|
6966
|
-
"Force.com IDE",
|
|
6967
|
-
"OIQ_Integration",
|
|
6968
|
-
"Salesforce CLI",
|
|
6969
|
-
"Salesforce Files",
|
|
6970
|
-
"Salesforce Mobile Dashboards",
|
|
6971
|
-
"Salesforce Touch",
|
|
6972
|
-
"Salesforce for Outlook",
|
|
6973
|
-
"SalesforceA",
|
|
6974
|
-
"SalesforceA for Android",
|
|
6975
|
-
"SalesforceA for iOS",
|
|
6976
|
-
"SalesforceDX Namespace Registry",
|
|
6977
|
-
"SalesforceIQ"
|
|
6978
|
-
],
|
|
7002
|
+
"title": "Generate Full Org package.xml",
|
|
6979
7003
|
"requiresProject": false,
|
|
6980
7004
|
"isESM": true,
|
|
6981
7005
|
"relativePath": [
|
|
@@ -6983,44 +7007,43 @@
|
|
|
6983
7007
|
"commands",
|
|
6984
7008
|
"hardis",
|
|
6985
7009
|
"org",
|
|
6986
|
-
"
|
|
6987
|
-
"
|
|
7010
|
+
"generate",
|
|
7011
|
+
"packagexmlfull.js"
|
|
6988
7012
|
],
|
|
6989
7013
|
"aliasPermutations": [],
|
|
6990
7014
|
"permutations": [
|
|
6991
|
-
"hardis:org:
|
|
6992
|
-
"org:hardis:
|
|
6993
|
-
"org:
|
|
6994
|
-
"org:
|
|
6995
|
-
"hardis:
|
|
6996
|
-
"
|
|
6997
|
-
"
|
|
6998
|
-
"
|
|
6999
|
-
"hardis:
|
|
7000
|
-
"
|
|
7001
|
-
"
|
|
7002
|
-
"
|
|
7003
|
-
"hardis:org:
|
|
7004
|
-
"org:hardis:
|
|
7005
|
-
"org:
|
|
7006
|
-
"org:
|
|
7007
|
-
"hardis:
|
|
7008
|
-
"
|
|
7009
|
-
"
|
|
7010
|
-
"
|
|
7011
|
-
"hardis:
|
|
7012
|
-
"
|
|
7013
|
-
"
|
|
7014
|
-
"
|
|
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"
|
|
7015
7039
|
]
|
|
7016
7040
|
},
|
|
7017
|
-
"hardis:org:
|
|
7041
|
+
"hardis:org:files:export": {
|
|
7018
7042
|
"aliases": [],
|
|
7019
7043
|
"args": {},
|
|
7020
|
-
"description": "\n## Command Behavior\n\n**
|
|
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",
|
|
7021
7045
|
"examples": [
|
|
7022
|
-
"$ sf hardis:org:
|
|
7023
|
-
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
7046
|
+
"$ sf hardis:org:files:export"
|
|
7024
7047
|
],
|
|
7025
7048
|
"flags": {
|
|
7026
7049
|
"json": {
|
|
@@ -7038,10 +7061,37 @@
|
|
|
7038
7061
|
"multiple": false,
|
|
7039
7062
|
"type": "option"
|
|
7040
7063
|
},
|
|
7041
|
-
"
|
|
7042
|
-
"char": "
|
|
7043
|
-
"description": "
|
|
7044
|
-
"name": "
|
|
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"
|
|
7080
|
+
},
|
|
7081
|
+
"polltimeout": {
|
|
7082
|
+
"char": "t",
|
|
7083
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
7084
|
+
"name": "polltimeout",
|
|
7085
|
+
"default": 300000,
|
|
7086
|
+
"hasDynamicHelp": false,
|
|
7087
|
+
"multiple": false,
|
|
7088
|
+
"type": "option"
|
|
7089
|
+
},
|
|
7090
|
+
"startchunknumber": {
|
|
7091
|
+
"char": "s",
|
|
7092
|
+
"description": "Chunk number to start from",
|
|
7093
|
+
"name": "startchunknumber",
|
|
7094
|
+
"default": 0,
|
|
7045
7095
|
"hasDynamicHelp": false,
|
|
7046
7096
|
"multiple": false,
|
|
7047
7097
|
"type": "option"
|
|
@@ -7084,79 +7134,57 @@
|
|
|
7084
7134
|
},
|
|
7085
7135
|
"hasDynamicHelp": true,
|
|
7086
7136
|
"hiddenAliases": [],
|
|
7087
|
-
"id": "hardis:org:
|
|
7137
|
+
"id": "hardis:org:files:export",
|
|
7088
7138
|
"pluginAlias": "sfdx-hardis",
|
|
7089
7139
|
"pluginName": "sfdx-hardis",
|
|
7090
7140
|
"pluginType": "core",
|
|
7091
7141
|
"strict": true,
|
|
7092
7142
|
"enableJsonFlag": true,
|
|
7093
|
-
"title": "
|
|
7143
|
+
"title": "Export files",
|
|
7094
7144
|
"requiresProject": false,
|
|
7095
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
7096
|
-
"Sales_User"
|
|
7097
|
-
],
|
|
7098
|
-
"permSetsPermSetLicenses": [
|
|
7099
|
-
{
|
|
7100
|
-
"permSet": "Sales_User",
|
|
7101
|
-
"permSetLicense": "SalesUserPsl"
|
|
7102
|
-
}
|
|
7103
|
-
],
|
|
7104
|
-
"profilesPermissionSetLicenses": [
|
|
7105
|
-
{
|
|
7106
|
-
"profile": "Salesforce API Only",
|
|
7107
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
7108
|
-
}
|
|
7109
|
-
],
|
|
7110
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
7111
|
-
"IdentityConnect"
|
|
7112
|
-
],
|
|
7113
7145
|
"isESM": true,
|
|
7114
7146
|
"relativePath": [
|
|
7115
7147
|
"lib",
|
|
7116
7148
|
"commands",
|
|
7117
7149
|
"hardis",
|
|
7118
7150
|
"org",
|
|
7119
|
-
"
|
|
7120
|
-
"
|
|
7151
|
+
"files",
|
|
7152
|
+
"export.js"
|
|
7121
7153
|
],
|
|
7122
7154
|
"aliasPermutations": [],
|
|
7123
7155
|
"permutations": [
|
|
7124
|
-
"hardis:org:
|
|
7125
|
-
"org:hardis:
|
|
7126
|
-
"org:
|
|
7127
|
-
"org:
|
|
7128
|
-
"hardis:
|
|
7129
|
-
"
|
|
7130
|
-
"
|
|
7131
|
-
"
|
|
7132
|
-
"hardis:
|
|
7133
|
-
"
|
|
7134
|
-
"
|
|
7135
|
-
"
|
|
7136
|
-
"hardis:org:
|
|
7137
|
-
"org:hardis:
|
|
7138
|
-
"org:
|
|
7139
|
-
"org:
|
|
7140
|
-
"hardis:
|
|
7141
|
-
"
|
|
7142
|
-
"
|
|
7143
|
-
"
|
|
7144
|
-
"hardis:
|
|
7145
|
-
"
|
|
7146
|
-
"
|
|
7147
|
-
"
|
|
7156
|
+
"hardis:org:files:export",
|
|
7157
|
+
"org:hardis:files:export",
|
|
7158
|
+
"org:files:hardis:export",
|
|
7159
|
+
"org:files:export:hardis",
|
|
7160
|
+
"hardis:files:org:export",
|
|
7161
|
+
"files:hardis:org:export",
|
|
7162
|
+
"files:org:hardis:export",
|
|
7163
|
+
"files:org:export:hardis",
|
|
7164
|
+
"hardis:files:export:org",
|
|
7165
|
+
"files:hardis:export:org",
|
|
7166
|
+
"files:export:hardis:org",
|
|
7167
|
+
"files:export:org:hardis",
|
|
7168
|
+
"hardis:org:export:files",
|
|
7169
|
+
"org:hardis:export:files",
|
|
7170
|
+
"org:export:hardis:files",
|
|
7171
|
+
"org:export:files:hardis",
|
|
7172
|
+
"hardis:export:org:files",
|
|
7173
|
+
"export:hardis:org:files",
|
|
7174
|
+
"export:org:hardis:files",
|
|
7175
|
+
"export:org:files:hardis",
|
|
7176
|
+
"hardis:export:files:org",
|
|
7177
|
+
"export:hardis:files:org",
|
|
7178
|
+
"export:files:hardis:org",
|
|
7179
|
+
"export:files:org:hardis"
|
|
7148
7180
|
]
|
|
7149
7181
|
},
|
|
7150
|
-
"hardis:org:
|
|
7182
|
+
"hardis:org:files:import": {
|
|
7151
7183
|
"aliases": [],
|
|
7152
7184
|
"args": {},
|
|
7153
|
-
"description": "\
|
|
7185
|
+
"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[](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",
|
|
7154
7186
|
"examples": [
|
|
7155
|
-
"$ sf hardis:org:
|
|
7156
|
-
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
7157
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
7158
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
7159
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7187
|
+
"$ sf hardis:org:files:import"
|
|
7160
7188
|
],
|
|
7161
7189
|
"flags": {
|
|
7162
7190
|
"json": {
|
|
@@ -7174,46 +7202,18 @@
|
|
|
7174
7202
|
"multiple": false,
|
|
7175
7203
|
"type": "option"
|
|
7176
7204
|
},
|
|
7177
|
-
"
|
|
7178
|
-
"char": "
|
|
7179
|
-
"description": "
|
|
7180
|
-
"name": "
|
|
7181
|
-
"hasDynamicHelp": false,
|
|
7182
|
-
"multiple": false,
|
|
7183
|
-
"type": "option"
|
|
7184
|
-
},
|
|
7185
|
-
"days": {
|
|
7186
|
-
"char": "t",
|
|
7187
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7188
|
-
"name": "days",
|
|
7189
|
-
"hasDynamicHelp": false,
|
|
7190
|
-
"multiple": false,
|
|
7191
|
-
"type": "option"
|
|
7192
|
-
},
|
|
7193
|
-
"licensetypes": {
|
|
7194
|
-
"char": "l",
|
|
7195
|
-
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
7196
|
-
"name": "licensetypes",
|
|
7197
|
-
"hasDynamicHelp": false,
|
|
7198
|
-
"multiple": false,
|
|
7199
|
-
"options": [
|
|
7200
|
-
"all",
|
|
7201
|
-
"all-crm",
|
|
7202
|
-
"all-paying"
|
|
7203
|
-
],
|
|
7204
|
-
"type": "option"
|
|
7205
|
-
},
|
|
7206
|
-
"licenseidentifiers": {
|
|
7207
|
-
"char": "i",
|
|
7208
|
-
"description": "Comma-separated list of license identifiers, in case licensetypes is not used.. Identifiers available at https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm",
|
|
7209
|
-
"name": "licenseidentifiers",
|
|
7205
|
+
"path": {
|
|
7206
|
+
"char": "p",
|
|
7207
|
+
"description": "Path to the file export project",
|
|
7208
|
+
"name": "path",
|
|
7210
7209
|
"hasDynamicHelp": false,
|
|
7211
7210
|
"multiple": false,
|
|
7212
7211
|
"type": "option"
|
|
7213
7212
|
},
|
|
7214
|
-
"
|
|
7215
|
-
"
|
|
7216
|
-
"
|
|
7213
|
+
"overwrite": {
|
|
7214
|
+
"char": "f",
|
|
7215
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
7216
|
+
"name": "overwrite",
|
|
7217
7217
|
"allowNo": false,
|
|
7218
7218
|
"type": "boolean"
|
|
7219
7219
|
},
|
|
@@ -7255,13 +7255,13 @@
|
|
|
7255
7255
|
},
|
|
7256
7256
|
"hasDynamicHelp": true,
|
|
7257
7257
|
"hiddenAliases": [],
|
|
7258
|
-
"id": "hardis:org:
|
|
7258
|
+
"id": "hardis:org:files:import",
|
|
7259
7259
|
"pluginAlias": "sfdx-hardis",
|
|
7260
7260
|
"pluginName": "sfdx-hardis",
|
|
7261
7261
|
"pluginType": "core",
|
|
7262
7262
|
"strict": true,
|
|
7263
7263
|
"enableJsonFlag": true,
|
|
7264
|
-
"title": "
|
|
7264
|
+
"title": "Import files",
|
|
7265
7265
|
"requiresProject": false,
|
|
7266
7266
|
"isESM": true,
|
|
7267
7267
|
"relativePath": [
|
|
@@ -7269,35 +7269,35 @@
|
|
|
7269
7269
|
"commands",
|
|
7270
7270
|
"hardis",
|
|
7271
7271
|
"org",
|
|
7272
|
-
"
|
|
7273
|
-
"
|
|
7272
|
+
"files",
|
|
7273
|
+
"import.js"
|
|
7274
7274
|
],
|
|
7275
7275
|
"aliasPermutations": [],
|
|
7276
7276
|
"permutations": [
|
|
7277
|
-
"hardis:org:
|
|
7278
|
-
"org:hardis:
|
|
7279
|
-
"org:
|
|
7280
|
-
"org:
|
|
7281
|
-
"hardis:
|
|
7282
|
-
"
|
|
7283
|
-
"
|
|
7284
|
-
"
|
|
7285
|
-
"hardis:
|
|
7286
|
-
"
|
|
7287
|
-
"
|
|
7288
|
-
"
|
|
7289
|
-
"hardis:org:
|
|
7290
|
-
"org:hardis:
|
|
7291
|
-
"org:
|
|
7292
|
-
"org:
|
|
7293
|
-
"hardis:
|
|
7294
|
-
"
|
|
7295
|
-
"
|
|
7296
|
-
"
|
|
7297
|
-
"hardis:
|
|
7298
|
-
"
|
|
7299
|
-
"
|
|
7300
|
-
"
|
|
7277
|
+
"hardis:org:files:import",
|
|
7278
|
+
"org:hardis:files:import",
|
|
7279
|
+
"org:files:hardis:import",
|
|
7280
|
+
"org:files:import:hardis",
|
|
7281
|
+
"hardis:files:org:import",
|
|
7282
|
+
"files:hardis:org:import",
|
|
7283
|
+
"files:org:hardis:import",
|
|
7284
|
+
"files:org:import:hardis",
|
|
7285
|
+
"hardis:files:import:org",
|
|
7286
|
+
"files:hardis:import:org",
|
|
7287
|
+
"files:import:hardis:org",
|
|
7288
|
+
"files:import:org:hardis",
|
|
7289
|
+
"hardis:org:import:files",
|
|
7290
|
+
"org:hardis:import:files",
|
|
7291
|
+
"org:import:hardis:files",
|
|
7292
|
+
"org:import:files:hardis",
|
|
7293
|
+
"hardis:import:org:files",
|
|
7294
|
+
"import:hardis:org:files",
|
|
7295
|
+
"import:org:hardis:files",
|
|
7296
|
+
"import:org:files:hardis",
|
|
7297
|
+
"hardis:import:files:org",
|
|
7298
|
+
"import:hardis:files:org",
|
|
7299
|
+
"import:files:hardis:org",
|
|
7300
|
+
"import:files:org:hardis"
|
|
7301
7301
|
]
|
|
7302
7302
|
},
|
|
7303
7303
|
"hardis:org:monitor:all": {
|
|
@@ -11356,262 +11356,47 @@
|
|
|
11356
11356
|
"hiddenAliases": [],
|
|
11357
11357
|
"id": "hardis:project:clean:xml",
|
|
11358
11358
|
"pluginAlias": "sfdx-hardis",
|
|
11359
|
-
"pluginName": "sfdx-hardis",
|
|
11360
|
-
"pluginType": "core",
|
|
11361
|
-
"strict": true,
|
|
11362
|
-
"enableJsonFlag": true,
|
|
11363
|
-
"title": "Clean retrieved empty items in dx sources",
|
|
11364
|
-
"requiresProject": true,
|
|
11365
|
-
"isESM": true,
|
|
11366
|
-
"relativePath": [
|
|
11367
|
-
"lib",
|
|
11368
|
-
"commands",
|
|
11369
|
-
"hardis",
|
|
11370
|
-
"project",
|
|
11371
|
-
"clean",
|
|
11372
|
-
"xml.js"
|
|
11373
|
-
],
|
|
11374
|
-
"aliasPermutations": [],
|
|
11375
|
-
"permutations": [
|
|
11376
|
-
"hardis:project:clean:xml",
|
|
11377
|
-
"project:hardis:clean:xml",
|
|
11378
|
-
"project:clean:hardis:xml",
|
|
11379
|
-
"project:clean:xml:hardis",
|
|
11380
|
-
"hardis:clean:project:xml",
|
|
11381
|
-
"clean:hardis:project:xml",
|
|
11382
|
-
"clean:project:hardis:xml",
|
|
11383
|
-
"clean:project:xml:hardis",
|
|
11384
|
-
"hardis:clean:xml:project",
|
|
11385
|
-
"clean:hardis:xml:project",
|
|
11386
|
-
"clean:xml:hardis:project",
|
|
11387
|
-
"clean:xml:project:hardis",
|
|
11388
|
-
"hardis:project:xml:clean",
|
|
11389
|
-
"project:hardis:xml:clean",
|
|
11390
|
-
"project:xml:hardis:clean",
|
|
11391
|
-
"project:xml:clean:hardis",
|
|
11392
|
-
"hardis:xml:project:clean",
|
|
11393
|
-
"xml:hardis:project:clean",
|
|
11394
|
-
"xml:project:hardis:clean",
|
|
11395
|
-
"xml:project:clean:hardis",
|
|
11396
|
-
"hardis:xml:clean:project",
|
|
11397
|
-
"xml:hardis:clean:project",
|
|
11398
|
-
"xml:clean:hardis:project",
|
|
11399
|
-
"xml:clean:project:hardis"
|
|
11400
|
-
]
|
|
11401
|
-
},
|
|
11402
|
-
"hardis:project:fix:profiletabs": {
|
|
11403
|
-
"aliases": [],
|
|
11404
|
-
"args": {},
|
|
11405
|
-
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
|
|
11406
|
-
"examples": [
|
|
11407
|
-
"$ sf hardis:project:fix:profiletabs"
|
|
11408
|
-
],
|
|
11409
|
-
"flags": {
|
|
11410
|
-
"json": {
|
|
11411
|
-
"description": "Format output as json.",
|
|
11412
|
-
"helpGroup": "GLOBAL",
|
|
11413
|
-
"name": "json",
|
|
11414
|
-
"allowNo": false,
|
|
11415
|
-
"type": "boolean"
|
|
11416
|
-
},
|
|
11417
|
-
"flags-dir": {
|
|
11418
|
-
"helpGroup": "GLOBAL",
|
|
11419
|
-
"name": "flags-dir",
|
|
11420
|
-
"summary": "Import flag values from a directory.",
|
|
11421
|
-
"hasDynamicHelp": false,
|
|
11422
|
-
"multiple": false,
|
|
11423
|
-
"type": "option"
|
|
11424
|
-
},
|
|
11425
|
-
"path": {
|
|
11426
|
-
"char": "p",
|
|
11427
|
-
"description": "Root folder",
|
|
11428
|
-
"name": "path",
|
|
11429
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
11430
|
-
"hasDynamicHelp": false,
|
|
11431
|
-
"multiple": false,
|
|
11432
|
-
"type": "option"
|
|
11433
|
-
},
|
|
11434
|
-
"debug": {
|
|
11435
|
-
"char": "d",
|
|
11436
|
-
"description": "Activate debug mode (more logs)",
|
|
11437
|
-
"name": "debug",
|
|
11438
|
-
"allowNo": false,
|
|
11439
|
-
"type": "boolean"
|
|
11440
|
-
},
|
|
11441
|
-
"websocket": {
|
|
11442
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11443
|
-
"name": "websocket",
|
|
11444
|
-
"hasDynamicHelp": false,
|
|
11445
|
-
"multiple": false,
|
|
11446
|
-
"type": "option"
|
|
11447
|
-
},
|
|
11448
|
-
"skipauth": {
|
|
11449
|
-
"description": "Skip authentication check when a default username is required",
|
|
11450
|
-
"name": "skipauth",
|
|
11451
|
-
"allowNo": false,
|
|
11452
|
-
"type": "boolean"
|
|
11453
|
-
},
|
|
11454
|
-
"target-org": {
|
|
11455
|
-
"aliases": [
|
|
11456
|
-
"targetusername",
|
|
11457
|
-
"u"
|
|
11458
|
-
],
|
|
11459
|
-
"char": "o",
|
|
11460
|
-
"deprecateAliases": true,
|
|
11461
|
-
"name": "target-org",
|
|
11462
|
-
"noCacheDefault": true,
|
|
11463
|
-
"required": true,
|
|
11464
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
11465
|
-
"hasDynamicHelp": true,
|
|
11466
|
-
"multiple": false,
|
|
11467
|
-
"type": "option"
|
|
11468
|
-
}
|
|
11469
|
-
},
|
|
11470
|
-
"hasDynamicHelp": true,
|
|
11471
|
-
"hiddenAliases": [],
|
|
11472
|
-
"id": "hardis:project:fix:profiletabs",
|
|
11473
|
-
"pluginAlias": "sfdx-hardis",
|
|
11474
|
-
"pluginName": "sfdx-hardis",
|
|
11475
|
-
"pluginType": "core",
|
|
11476
|
-
"strict": true,
|
|
11477
|
-
"enableJsonFlag": true,
|
|
11478
|
-
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
11479
|
-
"requiresProject": true,
|
|
11480
|
-
"isESM": true,
|
|
11481
|
-
"relativePath": [
|
|
11482
|
-
"lib",
|
|
11483
|
-
"commands",
|
|
11484
|
-
"hardis",
|
|
11485
|
-
"project",
|
|
11486
|
-
"fix",
|
|
11487
|
-
"profiletabs.js"
|
|
11488
|
-
],
|
|
11489
|
-
"aliasPermutations": [],
|
|
11490
|
-
"permutations": [
|
|
11491
|
-
"hardis:project:fix:profiletabs",
|
|
11492
|
-
"project:hardis:fix:profiletabs",
|
|
11493
|
-
"project:fix:hardis:profiletabs",
|
|
11494
|
-
"project:fix:profiletabs:hardis",
|
|
11495
|
-
"hardis:fix:project:profiletabs",
|
|
11496
|
-
"fix:hardis:project:profiletabs",
|
|
11497
|
-
"fix:project:hardis:profiletabs",
|
|
11498
|
-
"fix:project:profiletabs:hardis",
|
|
11499
|
-
"hardis:fix:profiletabs:project",
|
|
11500
|
-
"fix:hardis:profiletabs:project",
|
|
11501
|
-
"fix:profiletabs:hardis:project",
|
|
11502
|
-
"fix:profiletabs:project:hardis",
|
|
11503
|
-
"hardis:project:profiletabs:fix",
|
|
11504
|
-
"project:hardis:profiletabs:fix",
|
|
11505
|
-
"project:profiletabs:hardis:fix",
|
|
11506
|
-
"project:profiletabs:fix:hardis",
|
|
11507
|
-
"hardis:profiletabs:project:fix",
|
|
11508
|
-
"profiletabs:hardis:project:fix",
|
|
11509
|
-
"profiletabs:project:hardis:fix",
|
|
11510
|
-
"profiletabs:project:fix:hardis",
|
|
11511
|
-
"hardis:profiletabs:fix:project",
|
|
11512
|
-
"profiletabs:hardis:fix:project",
|
|
11513
|
-
"profiletabs:fix:hardis:project",
|
|
11514
|
-
"profiletabs:fix:project:hardis"
|
|
11515
|
-
]
|
|
11516
|
-
},
|
|
11517
|
-
"hardis:project:fix:v53flexipages": {
|
|
11518
|
-
"aliases": [],
|
|
11519
|
-
"args": {},
|
|
11520
|
-
"description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n</details>\n",
|
|
11521
|
-
"examples": [
|
|
11522
|
-
"$ sf hardis:project:fix:v53flexipages"
|
|
11523
|
-
],
|
|
11524
|
-
"flags": {
|
|
11525
|
-
"json": {
|
|
11526
|
-
"description": "Format output as json.",
|
|
11527
|
-
"helpGroup": "GLOBAL",
|
|
11528
|
-
"name": "json",
|
|
11529
|
-
"allowNo": false,
|
|
11530
|
-
"type": "boolean"
|
|
11531
|
-
},
|
|
11532
|
-
"flags-dir": {
|
|
11533
|
-
"helpGroup": "GLOBAL",
|
|
11534
|
-
"name": "flags-dir",
|
|
11535
|
-
"summary": "Import flag values from a directory.",
|
|
11536
|
-
"hasDynamicHelp": false,
|
|
11537
|
-
"multiple": false,
|
|
11538
|
-
"type": "option"
|
|
11539
|
-
},
|
|
11540
|
-
"path": {
|
|
11541
|
-
"char": "p",
|
|
11542
|
-
"description": "Root folder",
|
|
11543
|
-
"name": "path",
|
|
11544
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
11545
|
-
"hasDynamicHelp": false,
|
|
11546
|
-
"multiple": false,
|
|
11547
|
-
"type": "option"
|
|
11548
|
-
},
|
|
11549
|
-
"debug": {
|
|
11550
|
-
"char": "d",
|
|
11551
|
-
"description": "Activate debug mode (more logs)",
|
|
11552
|
-
"name": "debug",
|
|
11553
|
-
"allowNo": false,
|
|
11554
|
-
"type": "boolean"
|
|
11555
|
-
},
|
|
11556
|
-
"websocket": {
|
|
11557
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11558
|
-
"name": "websocket",
|
|
11559
|
-
"hasDynamicHelp": false,
|
|
11560
|
-
"multiple": false,
|
|
11561
|
-
"type": "option"
|
|
11562
|
-
},
|
|
11563
|
-
"skipauth": {
|
|
11564
|
-
"description": "Skip authentication check when a default username is required",
|
|
11565
|
-
"name": "skipauth",
|
|
11566
|
-
"allowNo": false,
|
|
11567
|
-
"type": "boolean"
|
|
11568
|
-
}
|
|
11569
|
-
},
|
|
11570
|
-
"hasDynamicHelp": false,
|
|
11571
|
-
"hiddenAliases": [],
|
|
11572
|
-
"id": "hardis:project:fix:v53flexipages",
|
|
11573
|
-
"pluginAlias": "sfdx-hardis",
|
|
11574
|
-
"pluginName": "sfdx-hardis",
|
|
11575
|
-
"pluginType": "core",
|
|
11576
|
-
"strict": true,
|
|
11577
|
-
"enableJsonFlag": true,
|
|
11578
|
-
"title": "Fix flexipages for v53",
|
|
11579
|
-
"requiresProject": true,
|
|
11580
|
-
"isESM": true,
|
|
11581
|
-
"relativePath": [
|
|
11582
|
-
"lib",
|
|
11583
|
-
"commands",
|
|
11584
|
-
"hardis",
|
|
11585
|
-
"project",
|
|
11586
|
-
"fix",
|
|
11587
|
-
"v53flexipages.js"
|
|
11588
|
-
],
|
|
11589
|
-
"aliasPermutations": [],
|
|
11590
|
-
"permutations": [
|
|
11591
|
-
"hardis:project:fix:v53flexipages",
|
|
11592
|
-
"project:hardis:fix:v53flexipages",
|
|
11593
|
-
"project:fix:hardis:v53flexipages",
|
|
11594
|
-
"project:fix:v53flexipages:hardis",
|
|
11595
|
-
"hardis:fix:project:v53flexipages",
|
|
11596
|
-
"fix:hardis:project:v53flexipages",
|
|
11597
|
-
"fix:project:hardis:v53flexipages",
|
|
11598
|
-
"fix:project:v53flexipages:hardis",
|
|
11599
|
-
"hardis:fix:v53flexipages:project",
|
|
11600
|
-
"fix:hardis:v53flexipages:project",
|
|
11601
|
-
"fix:v53flexipages:hardis:project",
|
|
11602
|
-
"fix:v53flexipages:project:hardis",
|
|
11603
|
-
"hardis:project:v53flexipages:fix",
|
|
11604
|
-
"project:hardis:v53flexipages:fix",
|
|
11605
|
-
"project:v53flexipages:hardis:fix",
|
|
11606
|
-
"project:v53flexipages:fix:hardis",
|
|
11607
|
-
"hardis:v53flexipages:project:fix",
|
|
11608
|
-
"v53flexipages:hardis:project:fix",
|
|
11609
|
-
"v53flexipages:project:hardis:fix",
|
|
11610
|
-
"v53flexipages:project:fix:hardis",
|
|
11611
|
-
"hardis:v53flexipages:fix:project",
|
|
11612
|
-
"v53flexipages:hardis:fix:project",
|
|
11613
|
-
"v53flexipages:fix:hardis:project",
|
|
11614
|
-
"v53flexipages:fix:project:hardis"
|
|
11359
|
+
"pluginName": "sfdx-hardis",
|
|
11360
|
+
"pluginType": "core",
|
|
11361
|
+
"strict": true,
|
|
11362
|
+
"enableJsonFlag": true,
|
|
11363
|
+
"title": "Clean retrieved empty items in dx sources",
|
|
11364
|
+
"requiresProject": true,
|
|
11365
|
+
"isESM": true,
|
|
11366
|
+
"relativePath": [
|
|
11367
|
+
"lib",
|
|
11368
|
+
"commands",
|
|
11369
|
+
"hardis",
|
|
11370
|
+
"project",
|
|
11371
|
+
"clean",
|
|
11372
|
+
"xml.js"
|
|
11373
|
+
],
|
|
11374
|
+
"aliasPermutations": [],
|
|
11375
|
+
"permutations": [
|
|
11376
|
+
"hardis:project:clean:xml",
|
|
11377
|
+
"project:hardis:clean:xml",
|
|
11378
|
+
"project:clean:hardis:xml",
|
|
11379
|
+
"project:clean:xml:hardis",
|
|
11380
|
+
"hardis:clean:project:xml",
|
|
11381
|
+
"clean:hardis:project:xml",
|
|
11382
|
+
"clean:project:hardis:xml",
|
|
11383
|
+
"clean:project:xml:hardis",
|
|
11384
|
+
"hardis:clean:xml:project",
|
|
11385
|
+
"clean:hardis:xml:project",
|
|
11386
|
+
"clean:xml:hardis:project",
|
|
11387
|
+
"clean:xml:project:hardis",
|
|
11388
|
+
"hardis:project:xml:clean",
|
|
11389
|
+
"project:hardis:xml:clean",
|
|
11390
|
+
"project:xml:hardis:clean",
|
|
11391
|
+
"project:xml:clean:hardis",
|
|
11392
|
+
"hardis:xml:project:clean",
|
|
11393
|
+
"xml:hardis:project:clean",
|
|
11394
|
+
"xml:project:hardis:clean",
|
|
11395
|
+
"xml:project:clean:hardis",
|
|
11396
|
+
"hardis:xml:clean:project",
|
|
11397
|
+
"xml:hardis:clean:project",
|
|
11398
|
+
"xml:clean:hardis:project",
|
|
11399
|
+
"xml:clean:project:hardis"
|
|
11615
11400
|
]
|
|
11616
11401
|
},
|
|
11617
11402
|
"hardis:project:deploy:notify": {
|
|
@@ -12789,6 +12574,221 @@
|
|
|
12789
12574
|
"validate:deploy:project:hardis"
|
|
12790
12575
|
]
|
|
12791
12576
|
},
|
|
12577
|
+
"hardis:project:fix:profiletabs": {
|
|
12578
|
+
"aliases": [],
|
|
12579
|
+
"args": {},
|
|
12580
|
+
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
|
|
12581
|
+
"examples": [
|
|
12582
|
+
"$ sf hardis:project:fix:profiletabs"
|
|
12583
|
+
],
|
|
12584
|
+
"flags": {
|
|
12585
|
+
"json": {
|
|
12586
|
+
"description": "Format output as json.",
|
|
12587
|
+
"helpGroup": "GLOBAL",
|
|
12588
|
+
"name": "json",
|
|
12589
|
+
"allowNo": false,
|
|
12590
|
+
"type": "boolean"
|
|
12591
|
+
},
|
|
12592
|
+
"flags-dir": {
|
|
12593
|
+
"helpGroup": "GLOBAL",
|
|
12594
|
+
"name": "flags-dir",
|
|
12595
|
+
"summary": "Import flag values from a directory.",
|
|
12596
|
+
"hasDynamicHelp": false,
|
|
12597
|
+
"multiple": false,
|
|
12598
|
+
"type": "option"
|
|
12599
|
+
},
|
|
12600
|
+
"path": {
|
|
12601
|
+
"char": "p",
|
|
12602
|
+
"description": "Root folder",
|
|
12603
|
+
"name": "path",
|
|
12604
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12605
|
+
"hasDynamicHelp": false,
|
|
12606
|
+
"multiple": false,
|
|
12607
|
+
"type": "option"
|
|
12608
|
+
},
|
|
12609
|
+
"debug": {
|
|
12610
|
+
"char": "d",
|
|
12611
|
+
"description": "Activate debug mode (more logs)",
|
|
12612
|
+
"name": "debug",
|
|
12613
|
+
"allowNo": false,
|
|
12614
|
+
"type": "boolean"
|
|
12615
|
+
},
|
|
12616
|
+
"websocket": {
|
|
12617
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12618
|
+
"name": "websocket",
|
|
12619
|
+
"hasDynamicHelp": false,
|
|
12620
|
+
"multiple": false,
|
|
12621
|
+
"type": "option"
|
|
12622
|
+
},
|
|
12623
|
+
"skipauth": {
|
|
12624
|
+
"description": "Skip authentication check when a default username is required",
|
|
12625
|
+
"name": "skipauth",
|
|
12626
|
+
"allowNo": false,
|
|
12627
|
+
"type": "boolean"
|
|
12628
|
+
},
|
|
12629
|
+
"target-org": {
|
|
12630
|
+
"aliases": [
|
|
12631
|
+
"targetusername",
|
|
12632
|
+
"u"
|
|
12633
|
+
],
|
|
12634
|
+
"char": "o",
|
|
12635
|
+
"deprecateAliases": true,
|
|
12636
|
+
"name": "target-org",
|
|
12637
|
+
"noCacheDefault": true,
|
|
12638
|
+
"required": true,
|
|
12639
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
12640
|
+
"hasDynamicHelp": true,
|
|
12641
|
+
"multiple": false,
|
|
12642
|
+
"type": "option"
|
|
12643
|
+
}
|
|
12644
|
+
},
|
|
12645
|
+
"hasDynamicHelp": true,
|
|
12646
|
+
"hiddenAliases": [],
|
|
12647
|
+
"id": "hardis:project:fix:profiletabs",
|
|
12648
|
+
"pluginAlias": "sfdx-hardis",
|
|
12649
|
+
"pluginName": "sfdx-hardis",
|
|
12650
|
+
"pluginType": "core",
|
|
12651
|
+
"strict": true,
|
|
12652
|
+
"enableJsonFlag": true,
|
|
12653
|
+
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
12654
|
+
"requiresProject": true,
|
|
12655
|
+
"isESM": true,
|
|
12656
|
+
"relativePath": [
|
|
12657
|
+
"lib",
|
|
12658
|
+
"commands",
|
|
12659
|
+
"hardis",
|
|
12660
|
+
"project",
|
|
12661
|
+
"fix",
|
|
12662
|
+
"profiletabs.js"
|
|
12663
|
+
],
|
|
12664
|
+
"aliasPermutations": [],
|
|
12665
|
+
"permutations": [
|
|
12666
|
+
"hardis:project:fix:profiletabs",
|
|
12667
|
+
"project:hardis:fix:profiletabs",
|
|
12668
|
+
"project:fix:hardis:profiletabs",
|
|
12669
|
+
"project:fix:profiletabs:hardis",
|
|
12670
|
+
"hardis:fix:project:profiletabs",
|
|
12671
|
+
"fix:hardis:project:profiletabs",
|
|
12672
|
+
"fix:project:hardis:profiletabs",
|
|
12673
|
+
"fix:project:profiletabs:hardis",
|
|
12674
|
+
"hardis:fix:profiletabs:project",
|
|
12675
|
+
"fix:hardis:profiletabs:project",
|
|
12676
|
+
"fix:profiletabs:hardis:project",
|
|
12677
|
+
"fix:profiletabs:project:hardis",
|
|
12678
|
+
"hardis:project:profiletabs:fix",
|
|
12679
|
+
"project:hardis:profiletabs:fix",
|
|
12680
|
+
"project:profiletabs:hardis:fix",
|
|
12681
|
+
"project:profiletabs:fix:hardis",
|
|
12682
|
+
"hardis:profiletabs:project:fix",
|
|
12683
|
+
"profiletabs:hardis:project:fix",
|
|
12684
|
+
"profiletabs:project:hardis:fix",
|
|
12685
|
+
"profiletabs:project:fix:hardis",
|
|
12686
|
+
"hardis:profiletabs:fix:project",
|
|
12687
|
+
"profiletabs:hardis:fix:project",
|
|
12688
|
+
"profiletabs:fix:hardis:project",
|
|
12689
|
+
"profiletabs:fix:project:hardis"
|
|
12690
|
+
]
|
|
12691
|
+
},
|
|
12692
|
+
"hardis:project:fix:v53flexipages": {
|
|
12693
|
+
"aliases": [],
|
|
12694
|
+
"args": {},
|
|
12695
|
+
"description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n</details>\n",
|
|
12696
|
+
"examples": [
|
|
12697
|
+
"$ sf hardis:project:fix:v53flexipages"
|
|
12698
|
+
],
|
|
12699
|
+
"flags": {
|
|
12700
|
+
"json": {
|
|
12701
|
+
"description": "Format output as json.",
|
|
12702
|
+
"helpGroup": "GLOBAL",
|
|
12703
|
+
"name": "json",
|
|
12704
|
+
"allowNo": false,
|
|
12705
|
+
"type": "boolean"
|
|
12706
|
+
},
|
|
12707
|
+
"flags-dir": {
|
|
12708
|
+
"helpGroup": "GLOBAL",
|
|
12709
|
+
"name": "flags-dir",
|
|
12710
|
+
"summary": "Import flag values from a directory.",
|
|
12711
|
+
"hasDynamicHelp": false,
|
|
12712
|
+
"multiple": false,
|
|
12713
|
+
"type": "option"
|
|
12714
|
+
},
|
|
12715
|
+
"path": {
|
|
12716
|
+
"char": "p",
|
|
12717
|
+
"description": "Root folder",
|
|
12718
|
+
"name": "path",
|
|
12719
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12720
|
+
"hasDynamicHelp": false,
|
|
12721
|
+
"multiple": false,
|
|
12722
|
+
"type": "option"
|
|
12723
|
+
},
|
|
12724
|
+
"debug": {
|
|
12725
|
+
"char": "d",
|
|
12726
|
+
"description": "Activate debug mode (more logs)",
|
|
12727
|
+
"name": "debug",
|
|
12728
|
+
"allowNo": false,
|
|
12729
|
+
"type": "boolean"
|
|
12730
|
+
},
|
|
12731
|
+
"websocket": {
|
|
12732
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12733
|
+
"name": "websocket",
|
|
12734
|
+
"hasDynamicHelp": false,
|
|
12735
|
+
"multiple": false,
|
|
12736
|
+
"type": "option"
|
|
12737
|
+
},
|
|
12738
|
+
"skipauth": {
|
|
12739
|
+
"description": "Skip authentication check when a default username is required",
|
|
12740
|
+
"name": "skipauth",
|
|
12741
|
+
"allowNo": false,
|
|
12742
|
+
"type": "boolean"
|
|
12743
|
+
}
|
|
12744
|
+
},
|
|
12745
|
+
"hasDynamicHelp": false,
|
|
12746
|
+
"hiddenAliases": [],
|
|
12747
|
+
"id": "hardis:project:fix:v53flexipages",
|
|
12748
|
+
"pluginAlias": "sfdx-hardis",
|
|
12749
|
+
"pluginName": "sfdx-hardis",
|
|
12750
|
+
"pluginType": "core",
|
|
12751
|
+
"strict": true,
|
|
12752
|
+
"enableJsonFlag": true,
|
|
12753
|
+
"title": "Fix flexipages for v53",
|
|
12754
|
+
"requiresProject": true,
|
|
12755
|
+
"isESM": true,
|
|
12756
|
+
"relativePath": [
|
|
12757
|
+
"lib",
|
|
12758
|
+
"commands",
|
|
12759
|
+
"hardis",
|
|
12760
|
+
"project",
|
|
12761
|
+
"fix",
|
|
12762
|
+
"v53flexipages.js"
|
|
12763
|
+
],
|
|
12764
|
+
"aliasPermutations": [],
|
|
12765
|
+
"permutations": [
|
|
12766
|
+
"hardis:project:fix:v53flexipages",
|
|
12767
|
+
"project:hardis:fix:v53flexipages",
|
|
12768
|
+
"project:fix:hardis:v53flexipages",
|
|
12769
|
+
"project:fix:v53flexipages:hardis",
|
|
12770
|
+
"hardis:fix:project:v53flexipages",
|
|
12771
|
+
"fix:hardis:project:v53flexipages",
|
|
12772
|
+
"fix:project:hardis:v53flexipages",
|
|
12773
|
+
"fix:project:v53flexipages:hardis",
|
|
12774
|
+
"hardis:fix:v53flexipages:project",
|
|
12775
|
+
"fix:hardis:v53flexipages:project",
|
|
12776
|
+
"fix:v53flexipages:hardis:project",
|
|
12777
|
+
"fix:v53flexipages:project:hardis",
|
|
12778
|
+
"hardis:project:v53flexipages:fix",
|
|
12779
|
+
"project:hardis:v53flexipages:fix",
|
|
12780
|
+
"project:v53flexipages:hardis:fix",
|
|
12781
|
+
"project:v53flexipages:fix:hardis",
|
|
12782
|
+
"hardis:v53flexipages:project:fix",
|
|
12783
|
+
"v53flexipages:hardis:project:fix",
|
|
12784
|
+
"v53flexipages:project:hardis:fix",
|
|
12785
|
+
"v53flexipages:project:fix:hardis",
|
|
12786
|
+
"hardis:v53flexipages:fix:project",
|
|
12787
|
+
"v53flexipages:hardis:fix:project",
|
|
12788
|
+
"v53flexipages:fix:hardis:project",
|
|
12789
|
+
"v53flexipages:fix:project:hardis"
|
|
12790
|
+
]
|
|
12791
|
+
},
|
|
12792
12792
|
"hardis:project:generate:bypass": {
|
|
12793
12793
|
"aliases": [],
|
|
12794
12794
|
"args": {},
|
|
@@ -15271,5 +15271,5 @@
|
|
|
15271
15271
|
]
|
|
15272
15272
|
}
|
|
15273
15273
|
},
|
|
15274
|
-
"version": "6.
|
|
15274
|
+
"version": "6.4.1-beta202509082207.0"
|
|
15275
15275
|
}
|