sfdx-hardis 6.4.1 → 6.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -1
- package/lib/commands/hardis/org/files/export.js +12 -1
- package/lib/commands/hardis/org/files/export.js.map +1 -1
- package/lib/commands/hardis/org/files/import.js +4 -2
- package/lib/commands/hardis/org/files/import.js.map +1 -1
- package/lib/commands/hardis/work/save.js +1 -1
- package/lib/commands/hardis/work/save.js.map +1 -1
- package/lib/common/utils/filesUtils.d.ts +48 -13
- package/lib/common/utils/filesUtils.js +378 -77
- package/lib/common/utils/filesUtils.js.map +1 -1
- package/lib/common/utils/index.d.ts +4 -0
- package/lib/common/utils/index.js +9 -0
- package/lib/common/utils/index.js.map +1 -1
- package/lib/common/websocketClient.d.ts +3 -0
- package/lib/common/websocketClient.js +23 -0
- package/lib/common/websocketClient.js.map +1 -1
- package/oclif.lock +39 -39
- package/oclif.manifest.json +1112 -1112
- package/package.json +6 -6
package/oclif.manifest.json
CHANGED
|
@@ -132,12 +132,13 @@
|
|
|
132
132
|
"clear:cache:hardis"
|
|
133
133
|
]
|
|
134
134
|
},
|
|
135
|
-
"hardis:
|
|
135
|
+
"hardis:auth:login": {
|
|
136
136
|
"aliases": [],
|
|
137
137
|
"args": {},
|
|
138
|
-
"description": "\n## Command Behavior\n\n**
|
|
138
|
+
"description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n</details>\n",
|
|
139
139
|
"examples": [
|
|
140
|
-
"$ sf hardis:
|
|
140
|
+
"$ sf hardis:auth:login",
|
|
141
|
+
"CI=true sf hardis:auth:login"
|
|
141
142
|
],
|
|
142
143
|
"flags": {
|
|
143
144
|
"json": {
|
|
@@ -155,20 +156,28 @@
|
|
|
155
156
|
"multiple": false,
|
|
156
157
|
"type": "option"
|
|
157
158
|
},
|
|
158
|
-
"
|
|
159
|
-
"char": "
|
|
160
|
-
"description": "
|
|
161
|
-
"name": "
|
|
162
|
-
"default": "project",
|
|
159
|
+
"instanceurl": {
|
|
160
|
+
"char": "r",
|
|
161
|
+
"description": "URL of org instance",
|
|
162
|
+
"name": "instanceurl",
|
|
163
163
|
"hasDynamicHelp": false,
|
|
164
164
|
"multiple": false,
|
|
165
|
-
"options": [
|
|
166
|
-
"project",
|
|
167
|
-
"branch",
|
|
168
|
-
"user"
|
|
169
|
-
],
|
|
170
165
|
"type": "option"
|
|
171
166
|
},
|
|
167
|
+
"devhub": {
|
|
168
|
+
"char": "h",
|
|
169
|
+
"description": "Also connect associated DevHub",
|
|
170
|
+
"name": "devhub",
|
|
171
|
+
"allowNo": false,
|
|
172
|
+
"type": "boolean"
|
|
173
|
+
},
|
|
174
|
+
"scratchorg": {
|
|
175
|
+
"char": "s",
|
|
176
|
+
"description": "Scratch org",
|
|
177
|
+
"name": "scratchorg",
|
|
178
|
+
"allowNo": false,
|
|
179
|
+
"type": "boolean"
|
|
180
|
+
},
|
|
172
181
|
"debug": {
|
|
173
182
|
"char": "d",
|
|
174
183
|
"description": "Activate debug mode (more logs)",
|
|
@@ -192,39 +201,38 @@
|
|
|
192
201
|
},
|
|
193
202
|
"hasDynamicHelp": false,
|
|
194
203
|
"hiddenAliases": [],
|
|
195
|
-
"id": "hardis:
|
|
204
|
+
"id": "hardis:auth:login",
|
|
196
205
|
"pluginAlias": "sfdx-hardis",
|
|
197
206
|
"pluginName": "sfdx-hardis",
|
|
198
207
|
"pluginType": "core",
|
|
199
208
|
"strict": true,
|
|
200
209
|
"enableJsonFlag": true,
|
|
201
|
-
"title": "
|
|
210
|
+
"title": "Login",
|
|
202
211
|
"requiresProject": false,
|
|
203
212
|
"isESM": true,
|
|
204
213
|
"relativePath": [
|
|
205
214
|
"lib",
|
|
206
215
|
"commands",
|
|
207
216
|
"hardis",
|
|
208
|
-
"
|
|
209
|
-
"
|
|
217
|
+
"auth",
|
|
218
|
+
"login.js"
|
|
210
219
|
],
|
|
211
220
|
"aliasPermutations": [],
|
|
212
221
|
"permutations": [
|
|
213
|
-
"hardis:
|
|
214
|
-
"
|
|
215
|
-
"
|
|
216
|
-
"hardis:
|
|
217
|
-
"
|
|
218
|
-
"
|
|
222
|
+
"hardis:auth:login",
|
|
223
|
+
"auth:hardis:login",
|
|
224
|
+
"auth:login:hardis",
|
|
225
|
+
"hardis:login:auth",
|
|
226
|
+
"login:hardis:auth",
|
|
227
|
+
"login:auth:hardis"
|
|
219
228
|
]
|
|
220
229
|
},
|
|
221
|
-
"hardis:
|
|
230
|
+
"hardis:config:get": {
|
|
222
231
|
"aliases": [],
|
|
223
232
|
"args": {},
|
|
224
|
-
"description": "\n## Command Behavior\n\n**
|
|
233
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the sfdx-hardis configuration for a specified level.**\n\nThis command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.\n\n- **Configuration levels:** It can retrieve configuration from three different levels:\n - **Project:** The configuration defined in the project's `.sfdx-hardis.yml` file.\n - **Branch:** The configuration defined in a branch-specific configuration file (e.g., `.sfdx-hardis.production.yml`).\n - **User:** The global user-level configuration.\n\n## Technical explanations\n\nThe command's logic is straightforward:\n\n- **`getConfig` function:** It calls the `getConfig` utility function, passing the desired configuration level as an argument.\n- **Configuration loading:** The `getConfig` function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON.\n- **Output:** The retrieved configuration is then displayed to the user as a JSON string.\n",
|
|
225
234
|
"examples": [
|
|
226
|
-
"$ sf hardis:
|
|
227
|
-
"CI=true sf hardis:auth:login"
|
|
235
|
+
"$ sf hardis:project:deploy:sources:metadata"
|
|
228
236
|
],
|
|
229
237
|
"flags": {
|
|
230
238
|
"json": {
|
|
@@ -242,28 +250,20 @@
|
|
|
242
250
|
"multiple": false,
|
|
243
251
|
"type": "option"
|
|
244
252
|
},
|
|
245
|
-
"
|
|
246
|
-
"char": "
|
|
247
|
-
"description": "
|
|
248
|
-
"name": "
|
|
253
|
+
"level": {
|
|
254
|
+
"char": "l",
|
|
255
|
+
"description": "project,branch or user",
|
|
256
|
+
"name": "level",
|
|
257
|
+
"default": "project",
|
|
249
258
|
"hasDynamicHelp": false,
|
|
250
259
|
"multiple": false,
|
|
260
|
+
"options": [
|
|
261
|
+
"project",
|
|
262
|
+
"branch",
|
|
263
|
+
"user"
|
|
264
|
+
],
|
|
251
265
|
"type": "option"
|
|
252
266
|
},
|
|
253
|
-
"devhub": {
|
|
254
|
-
"char": "h",
|
|
255
|
-
"description": "Also connect associated DevHub",
|
|
256
|
-
"name": "devhub",
|
|
257
|
-
"allowNo": false,
|
|
258
|
-
"type": "boolean"
|
|
259
|
-
},
|
|
260
|
-
"scratchorg": {
|
|
261
|
-
"char": "s",
|
|
262
|
-
"description": "Scratch org",
|
|
263
|
-
"name": "scratchorg",
|
|
264
|
-
"allowNo": false,
|
|
265
|
-
"type": "boolean"
|
|
266
|
-
},
|
|
267
267
|
"debug": {
|
|
268
268
|
"char": "d",
|
|
269
269
|
"description": "Activate debug mode (more logs)",
|
|
@@ -287,30 +287,30 @@
|
|
|
287
287
|
},
|
|
288
288
|
"hasDynamicHelp": false,
|
|
289
289
|
"hiddenAliases": [],
|
|
290
|
-
"id": "hardis:
|
|
290
|
+
"id": "hardis:config:get",
|
|
291
291
|
"pluginAlias": "sfdx-hardis",
|
|
292
292
|
"pluginName": "sfdx-hardis",
|
|
293
293
|
"pluginType": "core",
|
|
294
294
|
"strict": true,
|
|
295
295
|
"enableJsonFlag": true,
|
|
296
|
-
"title": "
|
|
296
|
+
"title": "Deploy metadata sources to org",
|
|
297
297
|
"requiresProject": false,
|
|
298
298
|
"isESM": true,
|
|
299
299
|
"relativePath": [
|
|
300
300
|
"lib",
|
|
301
301
|
"commands",
|
|
302
302
|
"hardis",
|
|
303
|
-
"
|
|
304
|
-
"
|
|
303
|
+
"config",
|
|
304
|
+
"get.js"
|
|
305
305
|
],
|
|
306
306
|
"aliasPermutations": [],
|
|
307
307
|
"permutations": [
|
|
308
|
-
"hardis:
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"hardis:
|
|
312
|
-
"
|
|
313
|
-
"
|
|
308
|
+
"hardis:config:get",
|
|
309
|
+
"config:hardis:get",
|
|
310
|
+
"config:get:hardis",
|
|
311
|
+
"hardis:get:config",
|
|
312
|
+
"get:hardis:config",
|
|
313
|
+
"get:config:hardis"
|
|
314
314
|
]
|
|
315
315
|
},
|
|
316
316
|
"hardis:doc:fieldusage": {
|
|
@@ -5538,12 +5538,15 @@
|
|
|
5538
5538
|
"import:data:org:hardis"
|
|
5539
5539
|
]
|
|
5540
5540
|
},
|
|
5541
|
-
"hardis:org:
|
|
5541
|
+
"hardis:org:diagnose:audittrail": {
|
|
5542
5542
|
"aliases": [],
|
|
5543
5543
|
"args": {},
|
|
5544
|
-
"description": "
|
|
5544
|
+
"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",
|
|
5545
5545
|
"examples": [
|
|
5546
|
-
"$ sf hardis:org:
|
|
5546
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5547
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5548
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5549
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5547
5550
|
],
|
|
5548
5551
|
"flags": {
|
|
5549
5552
|
"json": {
|
|
@@ -5561,37 +5564,26 @@
|
|
|
5561
5564
|
"multiple": false,
|
|
5562
5565
|
"type": "option"
|
|
5563
5566
|
},
|
|
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,
|
|
5567
|
+
"excludeusers": {
|
|
5568
|
+
"char": "e",
|
|
5569
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5570
|
+
"name": "excludeusers",
|
|
5577
5571
|
"hasDynamicHelp": false,
|
|
5578
5572
|
"multiple": false,
|
|
5579
5573
|
"type": "option"
|
|
5580
5574
|
},
|
|
5581
|
-
"
|
|
5575
|
+
"lastndays": {
|
|
5582
5576
|
"char": "t",
|
|
5583
|
-
"description": "
|
|
5584
|
-
"name": "
|
|
5585
|
-
"default": 300000,
|
|
5577
|
+
"description": "Number of days to extract from today (included)",
|
|
5578
|
+
"name": "lastndays",
|
|
5586
5579
|
"hasDynamicHelp": false,
|
|
5587
5580
|
"multiple": false,
|
|
5588
5581
|
"type": "option"
|
|
5589
5582
|
},
|
|
5590
|
-
"
|
|
5591
|
-
"char": "
|
|
5592
|
-
"description": "
|
|
5593
|
-
"name": "
|
|
5594
|
-
"default": 0,
|
|
5583
|
+
"outputfile": {
|
|
5584
|
+
"char": "f",
|
|
5585
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5586
|
+
"name": "outputfile",
|
|
5595
5587
|
"hasDynamicHelp": false,
|
|
5596
5588
|
"multiple": false,
|
|
5597
5589
|
"type": "option"
|
|
@@ -5634,13 +5626,13 @@
|
|
|
5634
5626
|
},
|
|
5635
5627
|
"hasDynamicHelp": true,
|
|
5636
5628
|
"hiddenAliases": [],
|
|
5637
|
-
"id": "hardis:org:
|
|
5629
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5638
5630
|
"pluginAlias": "sfdx-hardis",
|
|
5639
5631
|
"pluginName": "sfdx-hardis",
|
|
5640
5632
|
"pluginType": "core",
|
|
5641
5633
|
"strict": true,
|
|
5642
5634
|
"enableJsonFlag": true,
|
|
5643
|
-
"title": "
|
|
5635
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5644
5636
|
"requiresProject": false,
|
|
5645
5637
|
"isESM": true,
|
|
5646
5638
|
"relativePath": [
|
|
@@ -5648,43 +5640,43 @@
|
|
|
5648
5640
|
"commands",
|
|
5649
5641
|
"hardis",
|
|
5650
5642
|
"org",
|
|
5651
|
-
"
|
|
5652
|
-
"
|
|
5643
|
+
"diagnose",
|
|
5644
|
+
"audittrail.js"
|
|
5653
5645
|
],
|
|
5654
5646
|
"aliasPermutations": [],
|
|
5655
5647
|
"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
|
-
"
|
|
5648
|
+
"hardis:org:diagnose:audittrail",
|
|
5649
|
+
"org:hardis:diagnose:audittrail",
|
|
5650
|
+
"org:diagnose:hardis:audittrail",
|
|
5651
|
+
"org:diagnose:audittrail:hardis",
|
|
5652
|
+
"hardis:diagnose:org:audittrail",
|
|
5653
|
+
"diagnose:hardis:org:audittrail",
|
|
5654
|
+
"diagnose:org:hardis:audittrail",
|
|
5655
|
+
"diagnose:org:audittrail:hardis",
|
|
5656
|
+
"hardis:diagnose:audittrail:org",
|
|
5657
|
+
"diagnose:hardis:audittrail:org",
|
|
5658
|
+
"diagnose:audittrail:hardis:org",
|
|
5659
|
+
"diagnose:audittrail:org:hardis",
|
|
5660
|
+
"hardis:org:audittrail:diagnose",
|
|
5661
|
+
"org:hardis:audittrail:diagnose",
|
|
5662
|
+
"org:audittrail:hardis:diagnose",
|
|
5663
|
+
"org:audittrail:diagnose:hardis",
|
|
5664
|
+
"hardis:audittrail:org:diagnose",
|
|
5665
|
+
"audittrail:hardis:org:diagnose",
|
|
5666
|
+
"audittrail:org:hardis:diagnose",
|
|
5667
|
+
"audittrail:org:diagnose:hardis",
|
|
5668
|
+
"hardis:audittrail:diagnose:org",
|
|
5669
|
+
"audittrail:hardis:diagnose:org",
|
|
5670
|
+
"audittrail:diagnose:hardis:org",
|
|
5671
|
+
"audittrail:diagnose:org:hardis"
|
|
5680
5672
|
]
|
|
5681
5673
|
},
|
|
5682
|
-
"hardis:org:
|
|
5674
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5683
5675
|
"aliases": [],
|
|
5684
5676
|
"args": {},
|
|
5685
|
-
"description": "\
|
|
5677
|
+
"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",
|
|
5686
5678
|
"examples": [
|
|
5687
|
-
"$ sf hardis:org:
|
|
5679
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5688
5680
|
],
|
|
5689
5681
|
"flags": {
|
|
5690
5682
|
"json": {
|
|
@@ -5702,21 +5694,6 @@
|
|
|
5702
5694
|
"multiple": false,
|
|
5703
5695
|
"type": "option"
|
|
5704
5696
|
},
|
|
5705
|
-
"path": {
|
|
5706
|
-
"char": "p",
|
|
5707
|
-
"description": "Path to the file export project",
|
|
5708
|
-
"name": "path",
|
|
5709
|
-
"hasDynamicHelp": false,
|
|
5710
|
-
"multiple": false,
|
|
5711
|
-
"type": "option"
|
|
5712
|
-
},
|
|
5713
|
-
"overwrite": {
|
|
5714
|
-
"char": "f",
|
|
5715
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
5716
|
-
"name": "overwrite",
|
|
5717
|
-
"allowNo": false,
|
|
5718
|
-
"type": "boolean"
|
|
5719
|
-
},
|
|
5720
5697
|
"debug": {
|
|
5721
5698
|
"char": "d",
|
|
5722
5699
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5755,13 +5732,13 @@
|
|
|
5755
5732
|
},
|
|
5756
5733
|
"hasDynamicHelp": true,
|
|
5757
5734
|
"hiddenAliases": [],
|
|
5758
|
-
"id": "hardis:org:
|
|
5735
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
5759
5736
|
"pluginAlias": "sfdx-hardis",
|
|
5760
5737
|
"pluginName": "sfdx-hardis",
|
|
5761
5738
|
"pluginType": "core",
|
|
5762
5739
|
"strict": true,
|
|
5763
5740
|
"enableJsonFlag": true,
|
|
5764
|
-
"title": "
|
|
5741
|
+
"title": "Get Instance Upgrade date",
|
|
5765
5742
|
"requiresProject": false,
|
|
5766
5743
|
"isESM": true,
|
|
5767
5744
|
"relativePath": [
|
|
@@ -5769,44 +5746,46 @@
|
|
|
5769
5746
|
"commands",
|
|
5770
5747
|
"hardis",
|
|
5771
5748
|
"org",
|
|
5772
|
-
"
|
|
5773
|
-
"
|
|
5749
|
+
"diagnose",
|
|
5750
|
+
"instanceupgrade.js"
|
|
5774
5751
|
],
|
|
5775
5752
|
"aliasPermutations": [],
|
|
5776
5753
|
"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
|
-
"
|
|
5754
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
5755
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
5756
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
5757
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
5758
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
5759
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
5760
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
5761
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
5762
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
5763
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
5764
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
5765
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
5766
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
5767
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
5768
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
5769
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
5770
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
5771
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
5772
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
5773
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
5774
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
5775
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
5776
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
5777
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
5801
5778
|
]
|
|
5802
5779
|
},
|
|
5803
|
-
"hardis:org:
|
|
5780
|
+
"hardis:org:diagnose:legacyapi": {
|
|
5804
5781
|
"aliases": [],
|
|
5805
5782
|
"args": {},
|
|
5806
|
-
"description": "
|
|
5783
|
+
"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",
|
|
5807
5784
|
"examples": [
|
|
5808
|
-
"$ sf hardis:org:
|
|
5809
|
-
"$ sf hardis:org:
|
|
5785
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
5786
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
5787
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
5788
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
5810
5789
|
],
|
|
5811
5790
|
"flags": {
|
|
5812
5791
|
"json": {
|
|
@@ -5824,10 +5803,28 @@
|
|
|
5824
5803
|
"multiple": false,
|
|
5825
5804
|
"type": "option"
|
|
5826
5805
|
},
|
|
5827
|
-
"
|
|
5806
|
+
"eventtype": {
|
|
5807
|
+
"char": "e",
|
|
5808
|
+
"description": "Type of EventLogFile event to analyze",
|
|
5809
|
+
"name": "eventtype",
|
|
5810
|
+
"default": "ApiTotalUsage",
|
|
5811
|
+
"hasDynamicHelp": false,
|
|
5812
|
+
"multiple": false,
|
|
5813
|
+
"type": "option"
|
|
5814
|
+
},
|
|
5815
|
+
"limit": {
|
|
5828
5816
|
"char": "l",
|
|
5829
|
-
"description": "
|
|
5830
|
-
"name": "
|
|
5817
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
5818
|
+
"name": "limit",
|
|
5819
|
+
"default": 999,
|
|
5820
|
+
"hasDynamicHelp": false,
|
|
5821
|
+
"multiple": false,
|
|
5822
|
+
"type": "option"
|
|
5823
|
+
},
|
|
5824
|
+
"outputfile": {
|
|
5825
|
+
"char": "f",
|
|
5826
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5827
|
+
"name": "outputfile",
|
|
5831
5828
|
"hasDynamicHelp": false,
|
|
5832
5829
|
"multiple": false,
|
|
5833
5830
|
"type": "option"
|
|
@@ -5870,60 +5867,57 @@
|
|
|
5870
5867
|
},
|
|
5871
5868
|
"hasDynamicHelp": true,
|
|
5872
5869
|
"hiddenAliases": [],
|
|
5873
|
-
"id": "hardis:org:
|
|
5870
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
5874
5871
|
"pluginAlias": "sfdx-hardis",
|
|
5875
5872
|
"pluginName": "sfdx-hardis",
|
|
5876
5873
|
"pluginType": "core",
|
|
5877
5874
|
"strict": true,
|
|
5878
5875
|
"enableJsonFlag": true,
|
|
5879
|
-
"title": "
|
|
5880
|
-
"requiresProject":
|
|
5876
|
+
"title": "Check for legacy API use",
|
|
5877
|
+
"requiresProject": false,
|
|
5881
5878
|
"isESM": true,
|
|
5882
5879
|
"relativePath": [
|
|
5883
5880
|
"lib",
|
|
5884
5881
|
"commands",
|
|
5885
5882
|
"hardis",
|
|
5886
5883
|
"org",
|
|
5887
|
-
"
|
|
5888
|
-
"
|
|
5884
|
+
"diagnose",
|
|
5885
|
+
"legacyapi.js"
|
|
5889
5886
|
],
|
|
5890
5887
|
"aliasPermutations": [],
|
|
5891
5888
|
"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
|
-
"
|
|
5889
|
+
"hardis:org:diagnose:legacyapi",
|
|
5890
|
+
"org:hardis:diagnose:legacyapi",
|
|
5891
|
+
"org:diagnose:hardis:legacyapi",
|
|
5892
|
+
"org:diagnose:legacyapi:hardis",
|
|
5893
|
+
"hardis:diagnose:org:legacyapi",
|
|
5894
|
+
"diagnose:hardis:org:legacyapi",
|
|
5895
|
+
"diagnose:org:hardis:legacyapi",
|
|
5896
|
+
"diagnose:org:legacyapi:hardis",
|
|
5897
|
+
"hardis:diagnose:legacyapi:org",
|
|
5898
|
+
"diagnose:hardis:legacyapi:org",
|
|
5899
|
+
"diagnose:legacyapi:hardis:org",
|
|
5900
|
+
"diagnose:legacyapi:org:hardis",
|
|
5901
|
+
"hardis:org:legacyapi:diagnose",
|
|
5902
|
+
"org:hardis:legacyapi:diagnose",
|
|
5903
|
+
"org:legacyapi:hardis:diagnose",
|
|
5904
|
+
"org:legacyapi:diagnose:hardis",
|
|
5905
|
+
"hardis:legacyapi:org:diagnose",
|
|
5906
|
+
"legacyapi:hardis:org:diagnose",
|
|
5907
|
+
"legacyapi:org:hardis:diagnose",
|
|
5908
|
+
"legacyapi:org:diagnose:hardis",
|
|
5909
|
+
"hardis:legacyapi:diagnose:org",
|
|
5910
|
+
"legacyapi:hardis:diagnose:org",
|
|
5911
|
+
"legacyapi:diagnose:hardis:org",
|
|
5912
|
+
"legacyapi:diagnose:org:hardis"
|
|
5916
5913
|
]
|
|
5917
5914
|
},
|
|
5918
|
-
"hardis:org:diagnose:
|
|
5915
|
+
"hardis:org:diagnose:licenses": {
|
|
5919
5916
|
"aliases": [],
|
|
5920
5917
|
"args": {},
|
|
5921
|
-
"description": "
|
|
5918
|
+
"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",
|
|
5922
5919
|
"examples": [
|
|
5923
|
-
"$ sf hardis:org:diagnose:
|
|
5924
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5925
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5926
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5920
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
5927
5921
|
],
|
|
5928
5922
|
"flags": {
|
|
5929
5923
|
"json": {
|
|
@@ -5941,22 +5935,6 @@
|
|
|
5941
5935
|
"multiple": false,
|
|
5942
5936
|
"type": "option"
|
|
5943
5937
|
},
|
|
5944
|
-
"excludeusers": {
|
|
5945
|
-
"char": "e",
|
|
5946
|
-
"description": "Comma-separated list of usernames to exclude",
|
|
5947
|
-
"name": "excludeusers",
|
|
5948
|
-
"hasDynamicHelp": false,
|
|
5949
|
-
"multiple": false,
|
|
5950
|
-
"type": "option"
|
|
5951
|
-
},
|
|
5952
|
-
"lastndays": {
|
|
5953
|
-
"char": "t",
|
|
5954
|
-
"description": "Number of days to extract from today (included)",
|
|
5955
|
-
"name": "lastndays",
|
|
5956
|
-
"hasDynamicHelp": false,
|
|
5957
|
-
"multiple": false,
|
|
5958
|
-
"type": "option"
|
|
5959
|
-
},
|
|
5960
5938
|
"outputfile": {
|
|
5961
5939
|
"char": "f",
|
|
5962
5940
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -5965,6 +5943,13 @@
|
|
|
5965
5943
|
"multiple": false,
|
|
5966
5944
|
"type": "option"
|
|
5967
5945
|
},
|
|
5946
|
+
"usedonly": {
|
|
5947
|
+
"char": "u",
|
|
5948
|
+
"description": "Filter to have only used licenses",
|
|
5949
|
+
"name": "usedonly",
|
|
5950
|
+
"allowNo": false,
|
|
5951
|
+
"type": "boolean"
|
|
5952
|
+
},
|
|
5968
5953
|
"debug": {
|
|
5969
5954
|
"char": "d",
|
|
5970
5955
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6003,13 +5988,13 @@
|
|
|
6003
5988
|
},
|
|
6004
5989
|
"hasDynamicHelp": true,
|
|
6005
5990
|
"hiddenAliases": [],
|
|
6006
|
-
"id": "hardis:org:diagnose:
|
|
5991
|
+
"id": "hardis:org:diagnose:licenses",
|
|
6007
5992
|
"pluginAlias": "sfdx-hardis",
|
|
6008
5993
|
"pluginName": "sfdx-hardis",
|
|
6009
5994
|
"pluginType": "core",
|
|
6010
5995
|
"strict": true,
|
|
6011
5996
|
"enableJsonFlag": true,
|
|
6012
|
-
"title": "
|
|
5997
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6013
5998
|
"requiresProject": false,
|
|
6014
5999
|
"isESM": true,
|
|
6015
6000
|
"relativePath": [
|
|
@@ -6018,42 +6003,42 @@
|
|
|
6018
6003
|
"hardis",
|
|
6019
6004
|
"org",
|
|
6020
6005
|
"diagnose",
|
|
6021
|
-
"
|
|
6006
|
+
"licenses.js"
|
|
6022
6007
|
],
|
|
6023
6008
|
"aliasPermutations": [],
|
|
6024
6009
|
"permutations": [
|
|
6025
|
-
"hardis:org:diagnose:
|
|
6026
|
-
"org:hardis:diagnose:
|
|
6027
|
-
"org:diagnose:hardis:
|
|
6028
|
-
"org:diagnose:
|
|
6029
|
-
"hardis:diagnose:org:
|
|
6030
|
-
"diagnose:hardis:org:
|
|
6031
|
-
"diagnose:org:hardis:
|
|
6032
|
-
"diagnose:org:
|
|
6033
|
-
"hardis:diagnose:
|
|
6034
|
-
"diagnose:hardis:
|
|
6035
|
-
"diagnose:
|
|
6036
|
-
"diagnose:
|
|
6037
|
-
"hardis:org:
|
|
6038
|
-
"org:hardis:
|
|
6039
|
-
"org:
|
|
6040
|
-
"org:
|
|
6041
|
-
"hardis:
|
|
6042
|
-
"
|
|
6043
|
-
"
|
|
6044
|
-
"
|
|
6045
|
-
"hardis:
|
|
6046
|
-
"
|
|
6047
|
-
"
|
|
6048
|
-
"
|
|
6010
|
+
"hardis:org:diagnose:licenses",
|
|
6011
|
+
"org:hardis:diagnose:licenses",
|
|
6012
|
+
"org:diagnose:hardis:licenses",
|
|
6013
|
+
"org:diagnose:licenses:hardis",
|
|
6014
|
+
"hardis:diagnose:org:licenses",
|
|
6015
|
+
"diagnose:hardis:org:licenses",
|
|
6016
|
+
"diagnose:org:hardis:licenses",
|
|
6017
|
+
"diagnose:org:licenses:hardis",
|
|
6018
|
+
"hardis:diagnose:licenses:org",
|
|
6019
|
+
"diagnose:hardis:licenses:org",
|
|
6020
|
+
"diagnose:licenses:hardis:org",
|
|
6021
|
+
"diagnose:licenses:org:hardis",
|
|
6022
|
+
"hardis:org:licenses:diagnose",
|
|
6023
|
+
"org:hardis:licenses:diagnose",
|
|
6024
|
+
"org:licenses:hardis:diagnose",
|
|
6025
|
+
"org:licenses:diagnose:hardis",
|
|
6026
|
+
"hardis:licenses:org:diagnose",
|
|
6027
|
+
"licenses:hardis:org:diagnose",
|
|
6028
|
+
"licenses:org:hardis:diagnose",
|
|
6029
|
+
"licenses:org:diagnose:hardis",
|
|
6030
|
+
"hardis:licenses:diagnose:org",
|
|
6031
|
+
"licenses:hardis:diagnose:org",
|
|
6032
|
+
"licenses:diagnose:hardis:org",
|
|
6033
|
+
"licenses:diagnose:org:hardis"
|
|
6049
6034
|
]
|
|
6050
6035
|
},
|
|
6051
|
-
"hardis:org:diagnose:
|
|
6036
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6052
6037
|
"aliases": [],
|
|
6053
6038
|
"args": {},
|
|
6054
|
-
"description": "
|
|
6039
|
+
"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",
|
|
6055
6040
|
"examples": [
|
|
6056
|
-
"$ sf hardis:org:diagnose:
|
|
6041
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6057
6042
|
],
|
|
6058
6043
|
"flags": {
|
|
6059
6044
|
"json": {
|
|
@@ -6071,6 +6056,14 @@
|
|
|
6071
6056
|
"multiple": false,
|
|
6072
6057
|
"type": "option"
|
|
6073
6058
|
},
|
|
6059
|
+
"outputfile": {
|
|
6060
|
+
"char": "f",
|
|
6061
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6062
|
+
"name": "outputfile",
|
|
6063
|
+
"hasDynamicHelp": false,
|
|
6064
|
+
"multiple": false,
|
|
6065
|
+
"type": "option"
|
|
6066
|
+
},
|
|
6074
6067
|
"debug": {
|
|
6075
6068
|
"char": "d",
|
|
6076
6069
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6109,13 +6102,13 @@
|
|
|
6109
6102
|
},
|
|
6110
6103
|
"hasDynamicHelp": true,
|
|
6111
6104
|
"hiddenAliases": [],
|
|
6112
|
-
"id": "hardis:org:diagnose:
|
|
6105
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6113
6106
|
"pluginAlias": "sfdx-hardis",
|
|
6114
6107
|
"pluginName": "sfdx-hardis",
|
|
6115
6108
|
"pluginType": "core",
|
|
6116
6109
|
"strict": true,
|
|
6117
6110
|
"enableJsonFlag": true,
|
|
6118
|
-
"title": "
|
|
6111
|
+
"title": "Check Release Updates of an org",
|
|
6119
6112
|
"requiresProject": false,
|
|
6120
6113
|
"isESM": true,
|
|
6121
6114
|
"relativePath": [
|
|
@@ -6124,45 +6117,42 @@
|
|
|
6124
6117
|
"hardis",
|
|
6125
6118
|
"org",
|
|
6126
6119
|
"diagnose",
|
|
6127
|
-
"
|
|
6120
|
+
"releaseupdates.js"
|
|
6128
6121
|
],
|
|
6129
6122
|
"aliasPermutations": [],
|
|
6130
6123
|
"permutations": [
|
|
6131
|
-
"hardis:org:diagnose:
|
|
6132
|
-
"org:hardis:diagnose:
|
|
6133
|
-
"org:diagnose:hardis:
|
|
6134
|
-
"org:diagnose:
|
|
6135
|
-
"hardis:diagnose:org:
|
|
6136
|
-
"diagnose:hardis:org:
|
|
6137
|
-
"diagnose:org:hardis:
|
|
6138
|
-
"diagnose:org:
|
|
6139
|
-
"hardis:diagnose:
|
|
6140
|
-
"diagnose:hardis:
|
|
6141
|
-
"diagnose:
|
|
6142
|
-
"diagnose:
|
|
6143
|
-
"hardis:org:
|
|
6144
|
-
"org:hardis:
|
|
6145
|
-
"org:
|
|
6146
|
-
"org:
|
|
6147
|
-
"hardis:
|
|
6148
|
-
"
|
|
6149
|
-
"
|
|
6150
|
-
"
|
|
6151
|
-
"hardis:
|
|
6152
|
-
"
|
|
6153
|
-
"
|
|
6154
|
-
"
|
|
6155
|
-
]
|
|
6156
|
-
},
|
|
6157
|
-
"hardis:org:diagnose:
|
|
6158
|
-
"aliases": [],
|
|
6159
|
-
"args": {},
|
|
6160
|
-
"description": "
|
|
6124
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6125
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6126
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6127
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6128
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6129
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6130
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6131
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6132
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6133
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6134
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6135
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6136
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6137
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6138
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6139
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6140
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6141
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6142
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6143
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6144
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6145
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6146
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6147
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6148
|
+
]
|
|
6149
|
+
},
|
|
6150
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
6151
|
+
"aliases": [],
|
|
6152
|
+
"args": {},
|
|
6153
|
+
"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",
|
|
6161
6154
|
"examples": [
|
|
6162
|
-
"$ sf hardis:org:diagnose:
|
|
6163
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6164
|
-
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6165
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6155
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
6166
6156
|
],
|
|
6167
6157
|
"flags": {
|
|
6168
6158
|
"json": {
|
|
@@ -6180,24 +6170,6 @@
|
|
|
6180
6170
|
"multiple": false,
|
|
6181
6171
|
"type": "option"
|
|
6182
6172
|
},
|
|
6183
|
-
"eventtype": {
|
|
6184
|
-
"char": "e",
|
|
6185
|
-
"description": "Type of EventLogFile event to analyze",
|
|
6186
|
-
"name": "eventtype",
|
|
6187
|
-
"default": "ApiTotalUsage",
|
|
6188
|
-
"hasDynamicHelp": false,
|
|
6189
|
-
"multiple": false,
|
|
6190
|
-
"type": "option"
|
|
6191
|
-
},
|
|
6192
|
-
"limit": {
|
|
6193
|
-
"char": "l",
|
|
6194
|
-
"description": "Number of latest EventLogFile events to analyze",
|
|
6195
|
-
"name": "limit",
|
|
6196
|
-
"default": 999,
|
|
6197
|
-
"hasDynamicHelp": false,
|
|
6198
|
-
"multiple": false,
|
|
6199
|
-
"type": "option"
|
|
6200
|
-
},
|
|
6201
6173
|
"outputfile": {
|
|
6202
6174
|
"char": "f",
|
|
6203
6175
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6244,13 +6216,13 @@
|
|
|
6244
6216
|
},
|
|
6245
6217
|
"hasDynamicHelp": true,
|
|
6246
6218
|
"hiddenAliases": [],
|
|
6247
|
-
"id": "hardis:org:diagnose:
|
|
6219
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
6248
6220
|
"pluginAlias": "sfdx-hardis",
|
|
6249
6221
|
"pluginName": "sfdx-hardis",
|
|
6250
6222
|
"pluginType": "core",
|
|
6251
6223
|
"strict": true,
|
|
6252
6224
|
"enableJsonFlag": true,
|
|
6253
|
-
"title": "
|
|
6225
|
+
"title": "Detect Unsecured Connected Apps",
|
|
6254
6226
|
"requiresProject": false,
|
|
6255
6227
|
"isESM": true,
|
|
6256
6228
|
"relativePath": [
|
|
@@ -6259,42 +6231,43 @@
|
|
|
6259
6231
|
"hardis",
|
|
6260
6232
|
"org",
|
|
6261
6233
|
"diagnose",
|
|
6262
|
-
"
|
|
6234
|
+
"unsecure-connected-apps.js"
|
|
6263
6235
|
],
|
|
6264
6236
|
"aliasPermutations": [],
|
|
6265
6237
|
"permutations": [
|
|
6266
|
-
"hardis:org:diagnose:
|
|
6267
|
-
"org:hardis:diagnose:
|
|
6268
|
-
"org:diagnose:hardis:
|
|
6269
|
-
"org:diagnose:
|
|
6270
|
-
"hardis:diagnose:org:
|
|
6271
|
-
"diagnose:hardis:org:
|
|
6272
|
-
"diagnose:org:hardis:
|
|
6273
|
-
"diagnose:org:
|
|
6274
|
-
"hardis:diagnose:
|
|
6275
|
-
"diagnose:hardis:
|
|
6276
|
-
"diagnose:
|
|
6277
|
-
"diagnose:
|
|
6278
|
-
"hardis:org:
|
|
6279
|
-
"org:hardis:
|
|
6280
|
-
"org:
|
|
6281
|
-
"org:
|
|
6282
|
-
"hardis:
|
|
6283
|
-
"
|
|
6284
|
-
"
|
|
6285
|
-
"
|
|
6286
|
-
"hardis:
|
|
6287
|
-
"
|
|
6288
|
-
"
|
|
6289
|
-
"
|
|
6238
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
6239
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
6240
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
6241
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
6242
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
6243
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
6244
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
6245
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
6246
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
6247
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
6248
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
6249
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
6250
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
6251
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
6252
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
6253
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
6254
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
6255
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
6256
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
6257
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
6258
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
6259
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
6260
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
6261
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
6290
6262
|
]
|
|
6291
6263
|
},
|
|
6292
|
-
"hardis:org:diagnose:
|
|
6264
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6293
6265
|
"aliases": [],
|
|
6294
6266
|
"args": {},
|
|
6295
|
-
"description": "
|
|
6267
|
+
"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",
|
|
6296
6268
|
"examples": [
|
|
6297
|
-
"$ sf hardis:org:diagnose:
|
|
6269
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6270
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6298
6271
|
],
|
|
6299
6272
|
"flags": {
|
|
6300
6273
|
"json": {
|
|
@@ -6320,12 +6293,13 @@
|
|
|
6320
6293
|
"multiple": false,
|
|
6321
6294
|
"type": "option"
|
|
6322
6295
|
},
|
|
6323
|
-
"
|
|
6324
|
-
"char": "
|
|
6325
|
-
"description": "
|
|
6326
|
-
"name": "
|
|
6327
|
-
"
|
|
6328
|
-
"
|
|
6296
|
+
"days": {
|
|
6297
|
+
"char": "t",
|
|
6298
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6299
|
+
"name": "days",
|
|
6300
|
+
"hasDynamicHelp": false,
|
|
6301
|
+
"multiple": false,
|
|
6302
|
+
"type": "option"
|
|
6329
6303
|
},
|
|
6330
6304
|
"debug": {
|
|
6331
6305
|
"char": "d",
|
|
@@ -6365,13 +6339,13 @@
|
|
|
6365
6339
|
},
|
|
6366
6340
|
"hasDynamicHelp": true,
|
|
6367
6341
|
"hiddenAliases": [],
|
|
6368
|
-
"id": "hardis:org:diagnose:
|
|
6342
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6369
6343
|
"pluginAlias": "sfdx-hardis",
|
|
6370
6344
|
"pluginName": "sfdx-hardis",
|
|
6371
6345
|
"pluginType": "core",
|
|
6372
6346
|
"strict": true,
|
|
6373
6347
|
"enableJsonFlag": true,
|
|
6374
|
-
"title": "
|
|
6348
|
+
"title": "Detect unused Apex classes in an org",
|
|
6375
6349
|
"requiresProject": false,
|
|
6376
6350
|
"isESM": true,
|
|
6377
6351
|
"relativePath": [
|
|
@@ -6380,42 +6354,42 @@
|
|
|
6380
6354
|
"hardis",
|
|
6381
6355
|
"org",
|
|
6382
6356
|
"diagnose",
|
|
6383
|
-
"
|
|
6357
|
+
"unused-apex-classes.js"
|
|
6384
6358
|
],
|
|
6385
6359
|
"aliasPermutations": [],
|
|
6386
6360
|
"permutations": [
|
|
6387
|
-
"hardis:org:diagnose:
|
|
6388
|
-
"org:hardis:diagnose:
|
|
6389
|
-
"org:diagnose:hardis:
|
|
6390
|
-
"org:diagnose:
|
|
6391
|
-
"hardis:diagnose:org:
|
|
6392
|
-
"diagnose:hardis:org:
|
|
6393
|
-
"diagnose:org:hardis:
|
|
6394
|
-
"diagnose:org:
|
|
6395
|
-
"hardis:diagnose:
|
|
6396
|
-
"diagnose:hardis:
|
|
6397
|
-
"diagnose:
|
|
6398
|
-
"diagnose:
|
|
6399
|
-
"hardis:org:
|
|
6400
|
-
"org:hardis:
|
|
6401
|
-
"org:
|
|
6402
|
-
"org:
|
|
6403
|
-
"hardis:
|
|
6404
|
-
"
|
|
6405
|
-
"
|
|
6406
|
-
"
|
|
6407
|
-
"hardis:
|
|
6408
|
-
"
|
|
6409
|
-
"
|
|
6410
|
-
"
|
|
6361
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6362
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6363
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6364
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6365
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6366
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6367
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6368
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6369
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6370
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6371
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6372
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6373
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6374
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6375
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6376
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6377
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6378
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6379
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6380
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6381
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6382
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6383
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6384
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6411
6385
|
]
|
|
6412
6386
|
},
|
|
6413
|
-
"hardis:org:diagnose:
|
|
6387
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6414
6388
|
"aliases": [],
|
|
6415
6389
|
"args": {},
|
|
6416
|
-
"description": "
|
|
6390
|
+
"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",
|
|
6417
6391
|
"examples": [
|
|
6418
|
-
"$ sf hardis:org:diagnose:
|
|
6392
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6419
6393
|
],
|
|
6420
6394
|
"flags": {
|
|
6421
6395
|
"json": {
|
|
@@ -6479,13 +6453,30 @@
|
|
|
6479
6453
|
},
|
|
6480
6454
|
"hasDynamicHelp": true,
|
|
6481
6455
|
"hiddenAliases": [],
|
|
6482
|
-
"id": "hardis:org:diagnose:
|
|
6456
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6483
6457
|
"pluginAlias": "sfdx-hardis",
|
|
6484
6458
|
"pluginName": "sfdx-hardis",
|
|
6485
6459
|
"pluginType": "core",
|
|
6486
6460
|
"strict": true,
|
|
6487
6461
|
"enableJsonFlag": true,
|
|
6488
|
-
"title": "
|
|
6462
|
+
"title": "Unused Connected Apps in an org",
|
|
6463
|
+
"allowedInactiveConnectedApps": [
|
|
6464
|
+
"Ant Migration Tool",
|
|
6465
|
+
"Chatter Desktop",
|
|
6466
|
+
"Chatter Mobile for BlackBerry",
|
|
6467
|
+
"Force.com IDE",
|
|
6468
|
+
"OIQ_Integration",
|
|
6469
|
+
"Salesforce CLI",
|
|
6470
|
+
"Salesforce Files",
|
|
6471
|
+
"Salesforce Mobile Dashboards",
|
|
6472
|
+
"Salesforce Touch",
|
|
6473
|
+
"Salesforce for Outlook",
|
|
6474
|
+
"SalesforceA",
|
|
6475
|
+
"SalesforceA for Android",
|
|
6476
|
+
"SalesforceA for iOS",
|
|
6477
|
+
"SalesforceDX Namespace Registry",
|
|
6478
|
+
"SalesforceIQ"
|
|
6479
|
+
],
|
|
6489
6480
|
"requiresProject": false,
|
|
6490
6481
|
"isESM": true,
|
|
6491
6482
|
"relativePath": [
|
|
@@ -6494,55 +6485,56 @@
|
|
|
6494
6485
|
"hardis",
|
|
6495
6486
|
"org",
|
|
6496
6487
|
"diagnose",
|
|
6497
|
-
"
|
|
6488
|
+
"unused-connected-apps.js"
|
|
6498
6489
|
],
|
|
6499
6490
|
"aliasPermutations": [],
|
|
6500
6491
|
"permutations": [
|
|
6501
|
-
"hardis:org:diagnose:
|
|
6502
|
-
"org:hardis:diagnose:
|
|
6503
|
-
"org:diagnose:hardis:
|
|
6504
|
-
"org:diagnose:
|
|
6505
|
-
"hardis:diagnose:org:
|
|
6506
|
-
"diagnose:hardis:org:
|
|
6507
|
-
"diagnose:org:hardis:
|
|
6508
|
-
"diagnose:org:
|
|
6509
|
-
"hardis:diagnose:
|
|
6510
|
-
"diagnose:hardis:
|
|
6511
|
-
"diagnose:
|
|
6512
|
-
"diagnose:
|
|
6513
|
-
"hardis:org:
|
|
6514
|
-
"org:hardis:
|
|
6515
|
-
"org:
|
|
6516
|
-
"org:
|
|
6517
|
-
"hardis:
|
|
6518
|
-
"
|
|
6519
|
-
"
|
|
6520
|
-
"
|
|
6521
|
-
"hardis:
|
|
6522
|
-
"
|
|
6523
|
-
"
|
|
6524
|
-
"
|
|
6525
|
-
]
|
|
6526
|
-
},
|
|
6527
|
-
"hardis:org:diagnose:
|
|
6528
|
-
"aliases": [],
|
|
6529
|
-
"args": {},
|
|
6530
|
-
"description": "\n## Command Behavior\n\n**Detects
|
|
6531
|
-
"examples": [
|
|
6532
|
-
"$ sf hardis:org:diagnose:
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
|
|
6536
|
-
|
|
6537
|
-
"
|
|
6538
|
-
"
|
|
6539
|
-
"
|
|
6540
|
-
"
|
|
6541
|
-
|
|
6542
|
-
|
|
6543
|
-
|
|
6544
|
-
"
|
|
6545
|
-
"
|
|
6492
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6493
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6494
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6495
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6496
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6497
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6498
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6499
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6500
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6501
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6502
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6503
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6504
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6505
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6506
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6507
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6508
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6509
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6510
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6511
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6512
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6513
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6514
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6515
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6516
|
+
]
|
|
6517
|
+
},
|
|
6518
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6519
|
+
"aliases": [],
|
|
6520
|
+
"args": {},
|
|
6521
|
+
"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",
|
|
6522
|
+
"examples": [
|
|
6523
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6524
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6525
|
+
],
|
|
6526
|
+
"flags": {
|
|
6527
|
+
"json": {
|
|
6528
|
+
"description": "Format output as json.",
|
|
6529
|
+
"helpGroup": "GLOBAL",
|
|
6530
|
+
"name": "json",
|
|
6531
|
+
"allowNo": false,
|
|
6532
|
+
"type": "boolean"
|
|
6533
|
+
},
|
|
6534
|
+
"flags-dir": {
|
|
6535
|
+
"helpGroup": "GLOBAL",
|
|
6536
|
+
"name": "flags-dir",
|
|
6537
|
+
"summary": "Import flag values from a directory.",
|
|
6546
6538
|
"hasDynamicHelp": false,
|
|
6547
6539
|
"multiple": false,
|
|
6548
6540
|
"type": "option"
|
|
@@ -6593,14 +6585,32 @@
|
|
|
6593
6585
|
},
|
|
6594
6586
|
"hasDynamicHelp": true,
|
|
6595
6587
|
"hiddenAliases": [],
|
|
6596
|
-
"id": "hardis:org:diagnose:
|
|
6588
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
6597
6589
|
"pluginAlias": "sfdx-hardis",
|
|
6598
6590
|
"pluginName": "sfdx-hardis",
|
|
6599
6591
|
"pluginType": "core",
|
|
6600
6592
|
"strict": true,
|
|
6601
6593
|
"enableJsonFlag": true,
|
|
6602
|
-
"title": "Detect
|
|
6594
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
6603
6595
|
"requiresProject": false,
|
|
6596
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6597
|
+
"Sales_User"
|
|
6598
|
+
],
|
|
6599
|
+
"permSetsPermSetLicenses": [
|
|
6600
|
+
{
|
|
6601
|
+
"permSet": "Sales_User",
|
|
6602
|
+
"permSetLicense": "SalesUserPsl"
|
|
6603
|
+
}
|
|
6604
|
+
],
|
|
6605
|
+
"profilesPermissionSetLicenses": [
|
|
6606
|
+
{
|
|
6607
|
+
"profile": "Salesforce API Only",
|
|
6608
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6609
|
+
}
|
|
6610
|
+
],
|
|
6611
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6612
|
+
"IdentityConnect"
|
|
6613
|
+
],
|
|
6604
6614
|
"isESM": true,
|
|
6605
6615
|
"relativePath": [
|
|
6606
6616
|
"lib",
|
|
@@ -6608,43 +6618,46 @@
|
|
|
6608
6618
|
"hardis",
|
|
6609
6619
|
"org",
|
|
6610
6620
|
"diagnose",
|
|
6611
|
-
"
|
|
6621
|
+
"unusedlicenses.js"
|
|
6612
6622
|
],
|
|
6613
6623
|
"aliasPermutations": [],
|
|
6614
6624
|
"permutations": [
|
|
6615
|
-
"hardis:org:diagnose:
|
|
6616
|
-
"org:hardis:diagnose:
|
|
6617
|
-
"org:diagnose:hardis:
|
|
6618
|
-
"org:diagnose:
|
|
6619
|
-
"hardis:diagnose:org:
|
|
6620
|
-
"diagnose:hardis:org:
|
|
6621
|
-
"diagnose:org:hardis:
|
|
6622
|
-
"diagnose:org:
|
|
6623
|
-
"hardis:diagnose:
|
|
6624
|
-
"diagnose:hardis:
|
|
6625
|
-
"diagnose:
|
|
6626
|
-
"diagnose:
|
|
6627
|
-
"hardis:org:
|
|
6628
|
-
"org:hardis:
|
|
6629
|
-
"org:
|
|
6630
|
-
"org:
|
|
6631
|
-
"hardis:
|
|
6632
|
-
"
|
|
6633
|
-
"
|
|
6634
|
-
"
|
|
6635
|
-
"hardis:
|
|
6636
|
-
"
|
|
6637
|
-
"
|
|
6638
|
-
"
|
|
6625
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
6626
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
6627
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
6628
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
6629
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
6630
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
6631
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
6632
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
6633
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
6634
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
6635
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
6636
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
6637
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
6638
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
6639
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
6640
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
6641
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
6642
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
6643
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
6644
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
6645
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
6646
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
6647
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
6648
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
6639
6649
|
]
|
|
6640
6650
|
},
|
|
6641
|
-
"hardis:org:diagnose:
|
|
6651
|
+
"hardis:org:diagnose:unusedusers": {
|
|
6642
6652
|
"aliases": [],
|
|
6643
6653
|
"args": {},
|
|
6644
|
-
"description": "
|
|
6654
|
+
"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>",
|
|
6645
6655
|
"examples": [
|
|
6646
|
-
"$ sf hardis:org:diagnose:
|
|
6647
|
-
"$ sf hardis:org:diagnose:
|
|
6656
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
6657
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6658
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6659
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6660
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6648
6661
|
],
|
|
6649
6662
|
"flags": {
|
|
6650
6663
|
"json": {
|
|
@@ -6678,6 +6691,33 @@
|
|
|
6678
6691
|
"multiple": false,
|
|
6679
6692
|
"type": "option"
|
|
6680
6693
|
},
|
|
6694
|
+
"licensetypes": {
|
|
6695
|
+
"char": "l",
|
|
6696
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6697
|
+
"name": "licensetypes",
|
|
6698
|
+
"hasDynamicHelp": false,
|
|
6699
|
+
"multiple": false,
|
|
6700
|
+
"options": [
|
|
6701
|
+
"all",
|
|
6702
|
+
"all-crm",
|
|
6703
|
+
"all-paying"
|
|
6704
|
+
],
|
|
6705
|
+
"type": "option"
|
|
6706
|
+
},
|
|
6707
|
+
"licenseidentifiers": {
|
|
6708
|
+
"char": "i",
|
|
6709
|
+
"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",
|
|
6710
|
+
"name": "licenseidentifiers",
|
|
6711
|
+
"hasDynamicHelp": false,
|
|
6712
|
+
"multiple": false,
|
|
6713
|
+
"type": "option"
|
|
6714
|
+
},
|
|
6715
|
+
"returnactiveusers": {
|
|
6716
|
+
"description": "Inverts the command by returning the active users",
|
|
6717
|
+
"name": "returnactiveusers",
|
|
6718
|
+
"allowNo": false,
|
|
6719
|
+
"type": "boolean"
|
|
6720
|
+
},
|
|
6681
6721
|
"debug": {
|
|
6682
6722
|
"char": "d",
|
|
6683
6723
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6716,13 +6756,13 @@
|
|
|
6716
6756
|
},
|
|
6717
6757
|
"hasDynamicHelp": true,
|
|
6718
6758
|
"hiddenAliases": [],
|
|
6719
|
-
"id": "hardis:org:diagnose:
|
|
6759
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
6720
6760
|
"pluginAlias": "sfdx-hardis",
|
|
6721
6761
|
"pluginName": "sfdx-hardis",
|
|
6722
6762
|
"pluginType": "core",
|
|
6723
6763
|
"strict": true,
|
|
6724
6764
|
"enableJsonFlag": true,
|
|
6725
|
-
"title": "Detect unused
|
|
6765
|
+
"title": "Detect unused Users in Salesforce",
|
|
6726
6766
|
"requiresProject": false,
|
|
6727
6767
|
"isESM": true,
|
|
6728
6768
|
"relativePath": [
|
|
@@ -6731,42 +6771,42 @@
|
|
|
6731
6771
|
"hardis",
|
|
6732
6772
|
"org",
|
|
6733
6773
|
"diagnose",
|
|
6734
|
-
"
|
|
6774
|
+
"unusedusers.js"
|
|
6735
6775
|
],
|
|
6736
6776
|
"aliasPermutations": [],
|
|
6737
6777
|
"permutations": [
|
|
6738
|
-
"hardis:org:diagnose:
|
|
6739
|
-
"org:hardis:diagnose:
|
|
6740
|
-
"org:diagnose:hardis:
|
|
6741
|
-
"org:diagnose:
|
|
6742
|
-
"hardis:diagnose:org:
|
|
6743
|
-
"diagnose:hardis:org:
|
|
6744
|
-
"diagnose:org:hardis:
|
|
6745
|
-
"diagnose:org:
|
|
6746
|
-
"hardis:diagnose:
|
|
6747
|
-
"diagnose:hardis:
|
|
6748
|
-
"diagnose:
|
|
6749
|
-
"diagnose:
|
|
6750
|
-
"hardis:org:
|
|
6751
|
-
"org:hardis:
|
|
6752
|
-
"org:
|
|
6753
|
-
"org:
|
|
6754
|
-
"hardis:
|
|
6755
|
-
"
|
|
6756
|
-
"
|
|
6757
|
-
"
|
|
6758
|
-
"hardis:
|
|
6759
|
-
"
|
|
6760
|
-
"
|
|
6761
|
-
"
|
|
6778
|
+
"hardis:org:diagnose:unusedusers",
|
|
6779
|
+
"org:hardis:diagnose:unusedusers",
|
|
6780
|
+
"org:diagnose:hardis:unusedusers",
|
|
6781
|
+
"org:diagnose:unusedusers:hardis",
|
|
6782
|
+
"hardis:diagnose:org:unusedusers",
|
|
6783
|
+
"diagnose:hardis:org:unusedusers",
|
|
6784
|
+
"diagnose:org:hardis:unusedusers",
|
|
6785
|
+
"diagnose:org:unusedusers:hardis",
|
|
6786
|
+
"hardis:diagnose:unusedusers:org",
|
|
6787
|
+
"diagnose:hardis:unusedusers:org",
|
|
6788
|
+
"diagnose:unusedusers:hardis:org",
|
|
6789
|
+
"diagnose:unusedusers:org:hardis",
|
|
6790
|
+
"hardis:org:unusedusers:diagnose",
|
|
6791
|
+
"org:hardis:unusedusers:diagnose",
|
|
6792
|
+
"org:unusedusers:hardis:diagnose",
|
|
6793
|
+
"org:unusedusers:diagnose:hardis",
|
|
6794
|
+
"hardis:unusedusers:org:diagnose",
|
|
6795
|
+
"unusedusers:hardis:org:diagnose",
|
|
6796
|
+
"unusedusers:org:hardis:diagnose",
|
|
6797
|
+
"unusedusers:org:diagnose:hardis",
|
|
6798
|
+
"hardis:unusedusers:diagnose:org",
|
|
6799
|
+
"unusedusers:hardis:diagnose:org",
|
|
6800
|
+
"unusedusers:diagnose:hardis:org",
|
|
6801
|
+
"unusedusers:diagnose:org:hardis"
|
|
6762
6802
|
]
|
|
6763
6803
|
},
|
|
6764
|
-
"hardis:org:
|
|
6804
|
+
"hardis:org:files:export": {
|
|
6765
6805
|
"aliases": [],
|
|
6766
6806
|
"args": {},
|
|
6767
|
-
"description": "\n## Command Behavior\n\n**
|
|
6807
|
+
"description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, and output naming conventions.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project and `promptFilesExportConfiguration` for customizing export options.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues or API limits.\n</details>\n",
|
|
6768
6808
|
"examples": [
|
|
6769
|
-
"$ sf hardis:org:
|
|
6809
|
+
"$ sf hardis:org:files:export"
|
|
6770
6810
|
],
|
|
6771
6811
|
"flags": {
|
|
6772
6812
|
"json": {
|
|
@@ -6784,10 +6824,37 @@
|
|
|
6784
6824
|
"multiple": false,
|
|
6785
6825
|
"type": "option"
|
|
6786
6826
|
},
|
|
6787
|
-
"
|
|
6788
|
-
"char": "
|
|
6789
|
-
"description": "
|
|
6790
|
-
"name": "
|
|
6827
|
+
"path": {
|
|
6828
|
+
"char": "p",
|
|
6829
|
+
"description": "Path to the file export project",
|
|
6830
|
+
"name": "path",
|
|
6831
|
+
"hasDynamicHelp": false,
|
|
6832
|
+
"multiple": false,
|
|
6833
|
+
"type": "option"
|
|
6834
|
+
},
|
|
6835
|
+
"chunksize": {
|
|
6836
|
+
"char": "c",
|
|
6837
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
6838
|
+
"name": "chunksize",
|
|
6839
|
+
"default": 1000,
|
|
6840
|
+
"hasDynamicHelp": false,
|
|
6841
|
+
"multiple": false,
|
|
6842
|
+
"type": "option"
|
|
6843
|
+
},
|
|
6844
|
+
"polltimeout": {
|
|
6845
|
+
"char": "t",
|
|
6846
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
6847
|
+
"name": "polltimeout",
|
|
6848
|
+
"default": 300000,
|
|
6849
|
+
"hasDynamicHelp": false,
|
|
6850
|
+
"multiple": false,
|
|
6851
|
+
"type": "option"
|
|
6852
|
+
},
|
|
6853
|
+
"startchunknumber": {
|
|
6854
|
+
"char": "s",
|
|
6855
|
+
"description": "Chunk number to start from",
|
|
6856
|
+
"name": "startchunknumber",
|
|
6857
|
+
"default": 0,
|
|
6791
6858
|
"hasDynamicHelp": false,
|
|
6792
6859
|
"multiple": false,
|
|
6793
6860
|
"type": "option"
|
|
@@ -6830,30 +6897,13 @@
|
|
|
6830
6897
|
},
|
|
6831
6898
|
"hasDynamicHelp": true,
|
|
6832
6899
|
"hiddenAliases": [],
|
|
6833
|
-
"id": "hardis:org:
|
|
6900
|
+
"id": "hardis:org:files:export",
|
|
6834
6901
|
"pluginAlias": "sfdx-hardis",
|
|
6835
6902
|
"pluginName": "sfdx-hardis",
|
|
6836
6903
|
"pluginType": "core",
|
|
6837
6904
|
"strict": true,
|
|
6838
6905
|
"enableJsonFlag": true,
|
|
6839
|
-
"title": "
|
|
6840
|
-
"allowedInactiveConnectedApps": [
|
|
6841
|
-
"Ant Migration Tool",
|
|
6842
|
-
"Chatter Desktop",
|
|
6843
|
-
"Chatter Mobile for BlackBerry",
|
|
6844
|
-
"Force.com IDE",
|
|
6845
|
-
"OIQ_Integration",
|
|
6846
|
-
"Salesforce CLI",
|
|
6847
|
-
"Salesforce Files",
|
|
6848
|
-
"Salesforce Mobile Dashboards",
|
|
6849
|
-
"Salesforce Touch",
|
|
6850
|
-
"Salesforce for Outlook",
|
|
6851
|
-
"SalesforceA",
|
|
6852
|
-
"SalesforceA for Android",
|
|
6853
|
-
"SalesforceA for iOS",
|
|
6854
|
-
"SalesforceDX Namespace Registry",
|
|
6855
|
-
"SalesforceIQ"
|
|
6856
|
-
],
|
|
6906
|
+
"title": "Export files",
|
|
6857
6907
|
"requiresProject": false,
|
|
6858
6908
|
"isESM": true,
|
|
6859
6909
|
"relativePath": [
|
|
@@ -6861,44 +6911,43 @@
|
|
|
6861
6911
|
"commands",
|
|
6862
6912
|
"hardis",
|
|
6863
6913
|
"org",
|
|
6864
|
-
"
|
|
6865
|
-
"
|
|
6914
|
+
"files",
|
|
6915
|
+
"export.js"
|
|
6866
6916
|
],
|
|
6867
6917
|
"aliasPermutations": [],
|
|
6868
6918
|
"permutations": [
|
|
6869
|
-
"hardis:org:
|
|
6870
|
-
"org:hardis:
|
|
6871
|
-
"org:
|
|
6872
|
-
"org:
|
|
6873
|
-
"hardis:
|
|
6874
|
-
"
|
|
6875
|
-
"
|
|
6876
|
-
"
|
|
6877
|
-
"hardis:
|
|
6878
|
-
"
|
|
6879
|
-
"
|
|
6880
|
-
"
|
|
6881
|
-
"hardis:org:
|
|
6882
|
-
"org:hardis:
|
|
6883
|
-
"org:
|
|
6884
|
-
"org:
|
|
6885
|
-
"hardis:
|
|
6886
|
-
"
|
|
6887
|
-
"
|
|
6888
|
-
"
|
|
6889
|
-
"hardis:
|
|
6890
|
-
"
|
|
6891
|
-
"
|
|
6892
|
-
"
|
|
6919
|
+
"hardis:org:files:export",
|
|
6920
|
+
"org:hardis:files:export",
|
|
6921
|
+
"org:files:hardis:export",
|
|
6922
|
+
"org:files:export:hardis",
|
|
6923
|
+
"hardis:files:org:export",
|
|
6924
|
+
"files:hardis:org:export",
|
|
6925
|
+
"files:org:hardis:export",
|
|
6926
|
+
"files:org:export:hardis",
|
|
6927
|
+
"hardis:files:export:org",
|
|
6928
|
+
"files:hardis:export:org",
|
|
6929
|
+
"files:export:hardis:org",
|
|
6930
|
+
"files:export:org:hardis",
|
|
6931
|
+
"hardis:org:export:files",
|
|
6932
|
+
"org:hardis:export:files",
|
|
6933
|
+
"org:export:hardis:files",
|
|
6934
|
+
"org:export:files:hardis",
|
|
6935
|
+
"hardis:export:org:files",
|
|
6936
|
+
"export:hardis:org:files",
|
|
6937
|
+
"export:org:hardis:files",
|
|
6938
|
+
"export:org:files:hardis",
|
|
6939
|
+
"hardis:export:files:org",
|
|
6940
|
+
"export:hardis:files:org",
|
|
6941
|
+
"export:files:hardis:org",
|
|
6942
|
+
"export:files:org:hardis"
|
|
6893
6943
|
]
|
|
6894
6944
|
},
|
|
6895
|
-
"hardis:org:
|
|
6945
|
+
"hardis:org:files:import": {
|
|
6896
6946
|
"aliases": [],
|
|
6897
6947
|
"args": {},
|
|
6898
|
-
"description": "\
|
|
6948
|
+
"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",
|
|
6899
6949
|
"examples": [
|
|
6900
|
-
"$ sf hardis:org:
|
|
6901
|
-
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6950
|
+
"$ sf hardis:org:files:import"
|
|
6902
6951
|
],
|
|
6903
6952
|
"flags": {
|
|
6904
6953
|
"json": {
|
|
@@ -6916,14 +6965,21 @@
|
|
|
6916
6965
|
"multiple": false,
|
|
6917
6966
|
"type": "option"
|
|
6918
6967
|
},
|
|
6919
|
-
"
|
|
6920
|
-
"char": "
|
|
6921
|
-
"description": "
|
|
6922
|
-
"name": "
|
|
6968
|
+
"path": {
|
|
6969
|
+
"char": "p",
|
|
6970
|
+
"description": "Path to the file export project",
|
|
6971
|
+
"name": "path",
|
|
6923
6972
|
"hasDynamicHelp": false,
|
|
6924
6973
|
"multiple": false,
|
|
6925
6974
|
"type": "option"
|
|
6926
6975
|
},
|
|
6976
|
+
"overwrite": {
|
|
6977
|
+
"char": "f",
|
|
6978
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
6979
|
+
"name": "overwrite",
|
|
6980
|
+
"allowNo": false,
|
|
6981
|
+
"type": "boolean"
|
|
6982
|
+
},
|
|
6927
6983
|
"debug": {
|
|
6928
6984
|
"char": "d",
|
|
6929
6985
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6962,79 +7018,58 @@
|
|
|
6962
7018
|
},
|
|
6963
7019
|
"hasDynamicHelp": true,
|
|
6964
7020
|
"hiddenAliases": [],
|
|
6965
|
-
"id": "hardis:org:
|
|
7021
|
+
"id": "hardis:org:files:import",
|
|
6966
7022
|
"pluginAlias": "sfdx-hardis",
|
|
6967
7023
|
"pluginName": "sfdx-hardis",
|
|
6968
7024
|
"pluginType": "core",
|
|
6969
7025
|
"strict": true,
|
|
6970
7026
|
"enableJsonFlag": true,
|
|
6971
|
-
"title": "
|
|
7027
|
+
"title": "Import files",
|
|
6972
7028
|
"requiresProject": false,
|
|
6973
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
6974
|
-
"Sales_User"
|
|
6975
|
-
],
|
|
6976
|
-
"permSetsPermSetLicenses": [
|
|
6977
|
-
{
|
|
6978
|
-
"permSet": "Sales_User",
|
|
6979
|
-
"permSetLicense": "SalesUserPsl"
|
|
6980
|
-
}
|
|
6981
|
-
],
|
|
6982
|
-
"profilesPermissionSetLicenses": [
|
|
6983
|
-
{
|
|
6984
|
-
"profile": "Salesforce API Only",
|
|
6985
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6986
|
-
}
|
|
6987
|
-
],
|
|
6988
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6989
|
-
"IdentityConnect"
|
|
6990
|
-
],
|
|
6991
7029
|
"isESM": true,
|
|
6992
7030
|
"relativePath": [
|
|
6993
7031
|
"lib",
|
|
6994
7032
|
"commands",
|
|
6995
7033
|
"hardis",
|
|
6996
7034
|
"org",
|
|
6997
|
-
"
|
|
6998
|
-
"
|
|
7035
|
+
"files",
|
|
7036
|
+
"import.js"
|
|
6999
7037
|
],
|
|
7000
7038
|
"aliasPermutations": [],
|
|
7001
7039
|
"permutations": [
|
|
7002
|
-
"hardis:org:
|
|
7003
|
-
"org:hardis:
|
|
7004
|
-
"org:
|
|
7005
|
-
"org:
|
|
7006
|
-
"hardis:
|
|
7007
|
-
"
|
|
7008
|
-
"
|
|
7009
|
-
"
|
|
7010
|
-
"hardis:
|
|
7011
|
-
"
|
|
7012
|
-
"
|
|
7013
|
-
"
|
|
7014
|
-
"hardis:org:
|
|
7015
|
-
"org:hardis:
|
|
7016
|
-
"org:
|
|
7017
|
-
"org:
|
|
7018
|
-
"hardis:
|
|
7019
|
-
"
|
|
7020
|
-
"
|
|
7021
|
-
"
|
|
7022
|
-
"hardis:
|
|
7023
|
-
"
|
|
7024
|
-
"
|
|
7025
|
-
"
|
|
7040
|
+
"hardis:org:files:import",
|
|
7041
|
+
"org:hardis:files:import",
|
|
7042
|
+
"org:files:hardis:import",
|
|
7043
|
+
"org:files:import:hardis",
|
|
7044
|
+
"hardis:files:org:import",
|
|
7045
|
+
"files:hardis:org:import",
|
|
7046
|
+
"files:org:hardis:import",
|
|
7047
|
+
"files:org:import:hardis",
|
|
7048
|
+
"hardis:files:import:org",
|
|
7049
|
+
"files:hardis:import:org",
|
|
7050
|
+
"files:import:hardis:org",
|
|
7051
|
+
"files:import:org:hardis",
|
|
7052
|
+
"hardis:org:import:files",
|
|
7053
|
+
"org:hardis:import:files",
|
|
7054
|
+
"org:import:hardis:files",
|
|
7055
|
+
"org:import:files:hardis",
|
|
7056
|
+
"hardis:import:org:files",
|
|
7057
|
+
"import:hardis:org:files",
|
|
7058
|
+
"import:org:hardis:files",
|
|
7059
|
+
"import:org:files:hardis",
|
|
7060
|
+
"hardis:import:files:org",
|
|
7061
|
+
"import:hardis:files:org",
|
|
7062
|
+
"import:files:hardis:org",
|
|
7063
|
+
"import:files:org:hardis"
|
|
7026
7064
|
]
|
|
7027
7065
|
},
|
|
7028
|
-
"hardis:org:
|
|
7066
|
+
"hardis:org:fix:listviewmine": {
|
|
7029
7067
|
"aliases": [],
|
|
7030
7068
|
"args": {},
|
|
7031
|
-
"description": "
|
|
7069
|
+
"description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
|
|
7032
7070
|
"examples": [
|
|
7033
|
-
"$ sf hardis:org:
|
|
7034
|
-
"$ sf hardis:org:
|
|
7035
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
7036
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
7037
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7071
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
7072
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
7038
7073
|
],
|
|
7039
7074
|
"flags": {
|
|
7040
7075
|
"json": {
|
|
@@ -7052,49 +7087,14 @@
|
|
|
7052
7087
|
"multiple": false,
|
|
7053
7088
|
"type": "option"
|
|
7054
7089
|
},
|
|
7055
|
-
"
|
|
7056
|
-
"char": "f",
|
|
7057
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7058
|
-
"name": "outputfile",
|
|
7059
|
-
"hasDynamicHelp": false,
|
|
7060
|
-
"multiple": false,
|
|
7061
|
-
"type": "option"
|
|
7062
|
-
},
|
|
7063
|
-
"days": {
|
|
7064
|
-
"char": "t",
|
|
7065
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7066
|
-
"name": "days",
|
|
7067
|
-
"hasDynamicHelp": false,
|
|
7068
|
-
"multiple": false,
|
|
7069
|
-
"type": "option"
|
|
7070
|
-
},
|
|
7071
|
-
"licensetypes": {
|
|
7090
|
+
"listviews": {
|
|
7072
7091
|
"char": "l",
|
|
7073
|
-
"description": "
|
|
7074
|
-
"name": "
|
|
7075
|
-
"hasDynamicHelp": false,
|
|
7076
|
-
"multiple": false,
|
|
7077
|
-
"options": [
|
|
7078
|
-
"all",
|
|
7079
|
-
"all-crm",
|
|
7080
|
-
"all-paying"
|
|
7081
|
-
],
|
|
7082
|
-
"type": "option"
|
|
7083
|
-
},
|
|
7084
|
-
"licenseidentifiers": {
|
|
7085
|
-
"char": "i",
|
|
7086
|
-
"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",
|
|
7087
|
-
"name": "licenseidentifiers",
|
|
7092
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
7093
|
+
"name": "listviews",
|
|
7088
7094
|
"hasDynamicHelp": false,
|
|
7089
7095
|
"multiple": false,
|
|
7090
7096
|
"type": "option"
|
|
7091
7097
|
},
|
|
7092
|
-
"returnactiveusers": {
|
|
7093
|
-
"description": "Inverts the command by returning the active users",
|
|
7094
|
-
"name": "returnactiveusers",
|
|
7095
|
-
"allowNo": false,
|
|
7096
|
-
"type": "boolean"
|
|
7097
|
-
},
|
|
7098
7098
|
"debug": {
|
|
7099
7099
|
"char": "d",
|
|
7100
7100
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7133,55 +7133,55 @@
|
|
|
7133
7133
|
},
|
|
7134
7134
|
"hasDynamicHelp": true,
|
|
7135
7135
|
"hiddenAliases": [],
|
|
7136
|
-
"id": "hardis:org:
|
|
7136
|
+
"id": "hardis:org:fix:listviewmine",
|
|
7137
7137
|
"pluginAlias": "sfdx-hardis",
|
|
7138
7138
|
"pluginName": "sfdx-hardis",
|
|
7139
7139
|
"pluginType": "core",
|
|
7140
7140
|
"strict": true,
|
|
7141
7141
|
"enableJsonFlag": true,
|
|
7142
|
-
"title": "
|
|
7143
|
-
"requiresProject":
|
|
7142
|
+
"title": "Fix listviews with ",
|
|
7143
|
+
"requiresProject": true,
|
|
7144
7144
|
"isESM": true,
|
|
7145
7145
|
"relativePath": [
|
|
7146
7146
|
"lib",
|
|
7147
7147
|
"commands",
|
|
7148
7148
|
"hardis",
|
|
7149
7149
|
"org",
|
|
7150
|
-
"
|
|
7151
|
-
"
|
|
7150
|
+
"fix",
|
|
7151
|
+
"listviewmine.js"
|
|
7152
7152
|
],
|
|
7153
7153
|
"aliasPermutations": [],
|
|
7154
7154
|
"permutations": [
|
|
7155
|
-
"hardis:org:
|
|
7156
|
-
"org:hardis:
|
|
7157
|
-
"org:
|
|
7158
|
-
"org:
|
|
7159
|
-
"hardis:
|
|
7160
|
-
"
|
|
7161
|
-
"
|
|
7162
|
-
"
|
|
7163
|
-
"hardis:
|
|
7164
|
-
"
|
|
7165
|
-
"
|
|
7166
|
-
"
|
|
7167
|
-
"hardis:org:
|
|
7168
|
-
"org:hardis:
|
|
7169
|
-
"org:
|
|
7170
|
-
"org:
|
|
7171
|
-
"hardis:
|
|
7172
|
-
"
|
|
7173
|
-
"
|
|
7174
|
-
"
|
|
7175
|
-
"hardis:
|
|
7176
|
-
"
|
|
7177
|
-
"
|
|
7178
|
-
"
|
|
7179
|
-
]
|
|
7180
|
-
},
|
|
7181
|
-
"hardis:org:generate:packagexmlfull": {
|
|
7182
|
-
"aliases": [],
|
|
7183
|
-
"args": {},
|
|
7184
|
-
"description": "\n## Command Behavior\n\n**Generates a comprehensive `package.xml` file for a Salesforce org, including all metadata components, even managed ones.**\n\nThis command is essential for various Salesforce development and administration tasks, especially when you need a complete snapshot of an org's metadata. It goes beyond typical source tracking by including managed package components, which is crucial for understanding the full metadata footprint of an org.\n\nKey functionalities:\n\n- **Full Org Metadata Retrieval:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a complete list of all metadata types and their members.\n- **Managed Package Inclusion:** Unlike standard source retrieval, this command explicitly includes metadata from managed packages, providing a truly comprehensive `package.xml`.\n- **Customizable Output:** Allows you to specify the output file path for the generated `package.xml`.\n- **Interactive Org Selection:** If no target org is specified, it interactively prompts the user to choose an org. (or use --no-prompt to skip this step)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce Metadata API Interaction:** It leverages the Salesforce Metadata API to list all available metadata types and then retrieve all components for each type.\n- **`buildOrgManifest` Utility:** The core logic for querying the org's metadata and constructing the `package.xml` is encapsulated within the `buildOrgManifest` utility function.\n- **XML Generation:** It dynamically builds the XML structure of the `package.xml` file, including the `types` and `members` elements for all retrieved metadata.\n- **File System Operations:** It writes the generated `package.xml` file to the specified output path.\n- **Interactive Prompts:** Uses `promptOrgUsernameDefault` to guide the user in selecting the target Salesforce org.\n</details>\n",
|
|
7155
|
+
"hardis:org:fix:listviewmine",
|
|
7156
|
+
"org:hardis:fix:listviewmine",
|
|
7157
|
+
"org:fix:hardis:listviewmine",
|
|
7158
|
+
"org:fix:listviewmine:hardis",
|
|
7159
|
+
"hardis:fix:org:listviewmine",
|
|
7160
|
+
"fix:hardis:org:listviewmine",
|
|
7161
|
+
"fix:org:hardis:listviewmine",
|
|
7162
|
+
"fix:org:listviewmine:hardis",
|
|
7163
|
+
"hardis:fix:listviewmine:org",
|
|
7164
|
+
"fix:hardis:listviewmine:org",
|
|
7165
|
+
"fix:listviewmine:hardis:org",
|
|
7166
|
+
"fix:listviewmine:org:hardis",
|
|
7167
|
+
"hardis:org:listviewmine:fix",
|
|
7168
|
+
"org:hardis:listviewmine:fix",
|
|
7169
|
+
"org:listviewmine:hardis:fix",
|
|
7170
|
+
"org:listviewmine:fix:hardis",
|
|
7171
|
+
"hardis:listviewmine:org:fix",
|
|
7172
|
+
"listviewmine:hardis:org:fix",
|
|
7173
|
+
"listviewmine:org:hardis:fix",
|
|
7174
|
+
"listviewmine:org:fix:hardis",
|
|
7175
|
+
"hardis:listviewmine:fix:org",
|
|
7176
|
+
"listviewmine:hardis:fix:org",
|
|
7177
|
+
"listviewmine:fix:hardis:org",
|
|
7178
|
+
"listviewmine:fix:org:hardis"
|
|
7179
|
+
]
|
|
7180
|
+
},
|
|
7181
|
+
"hardis:org:generate:packagexmlfull": {
|
|
7182
|
+
"aliases": [],
|
|
7183
|
+
"args": {},
|
|
7184
|
+
"description": "\n## Command Behavior\n\n**Generates a comprehensive `package.xml` file for a Salesforce org, including all metadata components, even managed ones.**\n\nThis command is essential for various Salesforce development and administration tasks, especially when you need a complete snapshot of an org's metadata. It goes beyond typical source tracking by including managed package components, which is crucial for understanding the full metadata footprint of an org.\n\nKey functionalities:\n\n- **Full Org Metadata Retrieval:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a complete list of all metadata types and their members.\n- **Managed Package Inclusion:** Unlike standard source retrieval, this command explicitly includes metadata from managed packages, providing a truly comprehensive `package.xml`.\n- **Customizable Output:** Allows you to specify the output file path for the generated `package.xml`.\n- **Interactive Org Selection:** If no target org is specified, it interactively prompts the user to choose an org. (or use --no-prompt to skip this step)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce Metadata API Interaction:** It leverages the Salesforce Metadata API to list all available metadata types and then retrieve all components for each type.\n- **`buildOrgManifest` Utility:** The core logic for querying the org's metadata and constructing the `package.xml` is encapsulated within the `buildOrgManifest` utility function.\n- **XML Generation:** It dynamically builds the XML structure of the `package.xml` file, including the `types` and `members` elements for all retrieved metadata.\n- **File System Operations:** It writes the generated `package.xml` file to the specified output path.\n- **Interactive Prompts:** Uses `promptOrgUsernameDefault` to guide the user in selecting the target Salesforce org.\n</details>\n",
|
|
7185
7185
|
"examples": [
|
|
7186
7186
|
"$ sf hardis:org:generate:packagexmlfull",
|
|
7187
7187
|
"$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
|
|
@@ -7300,12 +7300,13 @@
|
|
|
7300
7300
|
"packagexmlfull:generate:org:hardis"
|
|
7301
7301
|
]
|
|
7302
7302
|
},
|
|
7303
|
-
"hardis:org:
|
|
7303
|
+
"hardis:org:purge:apexlog": {
|
|
7304
7304
|
"aliases": [],
|
|
7305
7305
|
"args": {},
|
|
7306
|
-
"description": "
|
|
7306
|
+
"description": "\n**Purges Apex debug logs from a Salesforce org.**\n\nThis command provides a quick and efficient way to clear out accumulated Apex debug logs from your Salesforce environment. This is particularly useful for:\n\n- **Storage Management:** Freeing up valuable data storage space in your Salesforce org.\n- **Performance Optimization:** Reducing the overhead associated with large volumes of debug logs.\n- **Troubleshooting:** Ensuring that new debug logs are generated cleanly without interference from old, irrelevant logs.\n\nKey functionalities:\n\n- **Log Identification:** Queries the `ApexLog` object to identify all existing debug logs.\n- **Confirmation Prompt:** Before deletion, it prompts for user confirmation, displaying the number of Apex logs that will be deleted.\n- **Bulk Deletion:** Uses the Salesforce Bulk API to efficiently delete a large number of Apex logs.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query:** It executes a SOQL query (`SELECT Id FROM ApexLog LIMIT 50000`) to retrieve the IDs of Apex logs to be deleted. The limit is set to 50,000 to handle large volumes of logs.\n- **CSV Export:** The retrieved log IDs are temporarily exported to a CSV file (`ApexLogsToDelete_*.csv`) in the `./tmp` directory.\n- **User Confirmation:** It uses the `prompts` library to ask for user confirmation before proceeding with the deletion, displaying the count of logs to be purged.\n- **Bulk API Deletion:** It then uses the Salesforce CLI's `sf data delete bulk` command, pointing to the generated CSV file, to perform the mass deletion of Apex logs.\n- **File System Operations:** It uses `fs-extra` to create the temporary directory and manage the CSV file.\n- **Error Handling:** Includes error handling for the query and deletion operations.\n</details>\n",
|
|
7307
7307
|
"examples": [
|
|
7308
|
-
"$ sf hardis:org:
|
|
7308
|
+
"$ sf hardis:org:purge:apexlog",
|
|
7309
|
+
"$ sf hardis:org:purge:apexlog --target-org nicolas.vuillamy@gmail.com"
|
|
7309
7310
|
],
|
|
7310
7311
|
"flags": {
|
|
7311
7312
|
"json": {
|
|
@@ -7323,6 +7324,13 @@
|
|
|
7323
7324
|
"multiple": false,
|
|
7324
7325
|
"type": "option"
|
|
7325
7326
|
},
|
|
7327
|
+
"prompt": {
|
|
7328
|
+
"char": "z",
|
|
7329
|
+
"description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
|
|
7330
|
+
"name": "prompt",
|
|
7331
|
+
"allowNo": true,
|
|
7332
|
+
"type": "boolean"
|
|
7333
|
+
},
|
|
7326
7334
|
"debug": {
|
|
7327
7335
|
"char": "d",
|
|
7328
7336
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7361,159 +7369,59 @@
|
|
|
7361
7369
|
},
|
|
7362
7370
|
"hasDynamicHelp": true,
|
|
7363
7371
|
"hiddenAliases": [],
|
|
7364
|
-
"id": "hardis:org:
|
|
7372
|
+
"id": "hardis:org:purge:apexlog",
|
|
7365
7373
|
"pluginAlias": "sfdx-hardis",
|
|
7366
7374
|
"pluginName": "sfdx-hardis",
|
|
7367
7375
|
"pluginType": "core",
|
|
7368
7376
|
"strict": true,
|
|
7369
7377
|
"enableJsonFlag": true,
|
|
7370
|
-
"title": "
|
|
7371
|
-
"
|
|
7372
|
-
{
|
|
7373
|
-
"key": "AUDIT_TRAIL",
|
|
7374
|
-
"title": "Detect suspect setup actions in major org",
|
|
7375
|
-
"command": "sf hardis:org:diagnose:audittrail",
|
|
7376
|
-
"frequency": "daily"
|
|
7377
|
-
},
|
|
7378
|
-
{
|
|
7379
|
-
"key": "LEGACY_API",
|
|
7380
|
-
"title": "Detect calls to deprecated API versions",
|
|
7381
|
-
"command": "sf hardis:org:diagnose:legacyapi",
|
|
7382
|
-
"frequency": "daily"
|
|
7383
|
-
},
|
|
7384
|
-
{
|
|
7385
|
-
"key": "ORG_LIMITS",
|
|
7386
|
-
"title": "Detect if org limits are close to be reached",
|
|
7387
|
-
"command": "sf hardis:org:monitor:limits",
|
|
7388
|
-
"frequency": "daily"
|
|
7389
|
-
},
|
|
7390
|
-
{
|
|
7391
|
-
"key": "UNSECURED_CONNECTED_APPS",
|
|
7392
|
-
"title": "Detect unsecured Connected Apps in an org",
|
|
7393
|
-
"command": "sf hardis:org:diagnose:unsecure-connected-apps",
|
|
7394
|
-
"frequency": "daily"
|
|
7395
|
-
},
|
|
7396
|
-
{
|
|
7397
|
-
"key": "LICENSES",
|
|
7398
|
-
"title": "Extract licenses information",
|
|
7399
|
-
"command": "sf hardis:org:diagnose:licenses",
|
|
7400
|
-
"frequency": "weekly"
|
|
7401
|
-
},
|
|
7402
|
-
{
|
|
7403
|
-
"key": "LINT_ACCESS",
|
|
7404
|
-
"title": "Detect custom elements with no access rights defined in permission sets",
|
|
7405
|
-
"command": "sf hardis:lint:access",
|
|
7406
|
-
"frequency": "weekly"
|
|
7407
|
-
},
|
|
7408
|
-
{
|
|
7409
|
-
"key": "UNUSED_LICENSES",
|
|
7410
|
-
"title": "Detect permission set licenses that are assigned to users that do not need them",
|
|
7411
|
-
"command": "sf hardis:org:diagnose:unusedlicenses",
|
|
7412
|
-
"frequency": "weekly"
|
|
7413
|
-
},
|
|
7414
|
-
{
|
|
7415
|
-
"key": "UNUSED_USERS",
|
|
7416
|
-
"title": "Detect active users without recent logins",
|
|
7417
|
-
"command": "sf hardis:org:diagnose:unusedusers",
|
|
7418
|
-
"frequency": "weekly"
|
|
7419
|
-
},
|
|
7420
|
-
{
|
|
7421
|
-
"key": "ACTIVE_USERS",
|
|
7422
|
-
"title": "Detect active users with recent logins",
|
|
7423
|
-
"command": "sf hardis:org:diagnose:unusedusers --returnactiveusers",
|
|
7424
|
-
"frequency": "weekly"
|
|
7425
|
-
},
|
|
7426
|
-
{
|
|
7427
|
-
"key": "ORG_INFO",
|
|
7428
|
-
"title": "Get org info + SF instance info + next major upgrade date",
|
|
7429
|
-
"command": "sf hardis:org:diagnose:instanceupgrade",
|
|
7430
|
-
"frequency": "weekly"
|
|
7431
|
-
},
|
|
7432
|
-
{
|
|
7433
|
-
"key": "RELEASE_UPDATES",
|
|
7434
|
-
"title": "Gather warnings about incoming and overdue Release Updates",
|
|
7435
|
-
"command": "sf hardis:org:diagnose:releaseupdates",
|
|
7436
|
-
"frequency": "weekly"
|
|
7437
|
-
},
|
|
7438
|
-
{
|
|
7439
|
-
"key": "UNUSED_METADATAS",
|
|
7440
|
-
"title": "Detect custom labels and custom permissions that are not in use",
|
|
7441
|
-
"command": "sf hardis:lint:unusedmetadatas",
|
|
7442
|
-
"frequency": "weekly"
|
|
7443
|
-
},
|
|
7444
|
-
{
|
|
7445
|
-
"key": "UNUSED_APEX_CLASSES",
|
|
7446
|
-
"title": "Detect unused Apex classes in an org",
|
|
7447
|
-
"command": "sf hardis:org:diagnose:unused-apex-classes",
|
|
7448
|
-
"frequency": "weekly"
|
|
7449
|
-
},
|
|
7450
|
-
{
|
|
7451
|
-
"key": "CONNECTED_APPS",
|
|
7452
|
-
"title": "Detect unused Connected Apps in an org",
|
|
7453
|
-
"command": "sf hardis:org:diagnose:unused-connected-apps",
|
|
7454
|
-
"frequency": "weekly"
|
|
7455
|
-
},
|
|
7456
|
-
{
|
|
7457
|
-
"key": "METADATA_STATUS",
|
|
7458
|
-
"title": "Detect inactive metadata",
|
|
7459
|
-
"command": "sf hardis:lint:metadatastatus",
|
|
7460
|
-
"frequency": "weekly"
|
|
7461
|
-
},
|
|
7462
|
-
{
|
|
7463
|
-
"key": "MISSING_ATTRIBUTES",
|
|
7464
|
-
"title": "Detect missing description on custom field",
|
|
7465
|
-
"command": "sf hardis:lint:missingattributes",
|
|
7466
|
-
"frequency": "weekly"
|
|
7467
|
-
}
|
|
7468
|
-
],
|
|
7469
|
-
"requiresProject": true,
|
|
7470
|
-
"triggerNotification": true,
|
|
7378
|
+
"title": "Purge Apex Logs",
|
|
7379
|
+
"requiresProject": false,
|
|
7471
7380
|
"isESM": true,
|
|
7472
7381
|
"relativePath": [
|
|
7473
7382
|
"lib",
|
|
7474
7383
|
"commands",
|
|
7475
7384
|
"hardis",
|
|
7476
7385
|
"org",
|
|
7477
|
-
"
|
|
7478
|
-
"
|
|
7386
|
+
"purge",
|
|
7387
|
+
"apexlog.js"
|
|
7479
7388
|
],
|
|
7480
7389
|
"aliasPermutations": [],
|
|
7481
7390
|
"permutations": [
|
|
7482
|
-
"hardis:org:
|
|
7483
|
-
"org:hardis:
|
|
7484
|
-
"org:
|
|
7485
|
-
"org:
|
|
7486
|
-
"hardis:
|
|
7487
|
-
"
|
|
7488
|
-
"
|
|
7489
|
-
"
|
|
7490
|
-
"hardis:
|
|
7491
|
-
"
|
|
7492
|
-
"
|
|
7493
|
-
"
|
|
7494
|
-
"hardis:org:
|
|
7495
|
-
"org:hardis:
|
|
7496
|
-
"org:
|
|
7497
|
-
"org:
|
|
7498
|
-
"hardis:
|
|
7499
|
-
"
|
|
7500
|
-
"
|
|
7501
|
-
"
|
|
7502
|
-
"hardis:
|
|
7503
|
-
"
|
|
7504
|
-
"
|
|
7505
|
-
"
|
|
7391
|
+
"hardis:org:purge:apexlog",
|
|
7392
|
+
"org:hardis:purge:apexlog",
|
|
7393
|
+
"org:purge:hardis:apexlog",
|
|
7394
|
+
"org:purge:apexlog:hardis",
|
|
7395
|
+
"hardis:purge:org:apexlog",
|
|
7396
|
+
"purge:hardis:org:apexlog",
|
|
7397
|
+
"purge:org:hardis:apexlog",
|
|
7398
|
+
"purge:org:apexlog:hardis",
|
|
7399
|
+
"hardis:purge:apexlog:org",
|
|
7400
|
+
"purge:hardis:apexlog:org",
|
|
7401
|
+
"purge:apexlog:hardis:org",
|
|
7402
|
+
"purge:apexlog:org:hardis",
|
|
7403
|
+
"hardis:org:apexlog:purge",
|
|
7404
|
+
"org:hardis:apexlog:purge",
|
|
7405
|
+
"org:apexlog:hardis:purge",
|
|
7406
|
+
"org:apexlog:purge:hardis",
|
|
7407
|
+
"hardis:apexlog:org:purge",
|
|
7408
|
+
"apexlog:hardis:org:purge",
|
|
7409
|
+
"apexlog:org:hardis:purge",
|
|
7410
|
+
"apexlog:org:purge:hardis",
|
|
7411
|
+
"hardis:apexlog:purge:org",
|
|
7412
|
+
"apexlog:hardis:purge:org",
|
|
7413
|
+
"apexlog:purge:hardis:org",
|
|
7414
|
+
"apexlog:purge:org:hardis"
|
|
7506
7415
|
]
|
|
7507
7416
|
},
|
|
7508
|
-
"hardis:org:
|
|
7417
|
+
"hardis:org:purge:flow": {
|
|
7509
7418
|
"aliases": [],
|
|
7510
7419
|
"args": {},
|
|
7511
|
-
"description": "
|
|
7420
|
+
"description": "\n**Purges old or unwanted Flow versions from a Salesforce org, with an option to delete related Flow Interviews.**\n\nThis command helps maintain a clean and performant Salesforce org by removing obsolete Flow versions. Over time, multiple versions of Flows can accumulate, consuming storage and potentially impacting performance. This tool provides a controlled way to clean up these versions.\n\nKey functionalities:\n\n- **Targeted Flow Selection:** Allows you to filter Flow versions to delete by name (`--name`) and status (`--status`, e.g., `Obsolete`, `Draft`, `Inactive`).\n- **Flow Interview Deletion:** If a Flow version cannot be deleted due to active Flow Interviews, the `--delete-flow-interviews` flag (or interactive prompt) allows you to delete these interviews first, then retry the Flow version deletion.\n- **Confirmation Prompt:** In interactive mode, it prompts for confirmation before proceeding with the deletion of Flow versions and Flow Interviews.\n- **Partial Success Handling:** The `--allowpurgefailure` flag (default `true`) allows the command to continue even if some deletions fail, reporting the errors.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `Flow` object (using the Tooling API) to list Flow versions based on the provided filters (name, status, manageable state).\n- **Bulk Deletion (Tooling API):** It uses `bulkDeleteTooling` to perform mass deletions of Flow versions. If deletion fails due to active interviews, it extracts the interview IDs.\n- **Flow Interview Management:** If `delete-flow-interviews` is enabled, it queries `FlowInterview` objects, performs bulk deletion of the identified interviews using `bulkDelete`, and then retries the Flow version deletion.\n- **Interactive Prompts:** Uses the `prompts` library to interact with the user for selecting Flows, statuses, and confirming deletion actions.\n- **Error Reporting:** Logs detailed error messages for failed deletions, including the specific reasons.\n- **Command-Line Execution:** Uses `execSfdxJson` to execute Salesforce CLI commands for querying Flow data.\n</details>\n",
|
|
7512
7421
|
"examples": [
|
|
7513
|
-
"$ sf hardis:org:
|
|
7514
|
-
"$ sf hardis:org:
|
|
7515
|
-
"$ sf hardis:org:
|
|
7516
|
-
"$ sf hardis:org:monitor:backup --full --exclude-namespaces --full-apply-filters"
|
|
7422
|
+
"$ sf hardis:org:purge:flow",
|
|
7423
|
+
"$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --no-prompt --delete-flow-interviews",
|
|
7424
|
+
"$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --status \"Obsolete,Draft,InvalidDraft\" --name TestFlow"
|
|
7517
7425
|
],
|
|
7518
7426
|
"flags": {
|
|
7519
7427
|
"json": {
|
|
@@ -7531,53 +7439,48 @@
|
|
|
7531
7439
|
"multiple": false,
|
|
7532
7440
|
"type": "option"
|
|
7533
7441
|
},
|
|
7534
|
-
"
|
|
7535
|
-
"
|
|
7536
|
-
"
|
|
7537
|
-
"
|
|
7442
|
+
"prompt": {
|
|
7443
|
+
"char": "z",
|
|
7444
|
+
"description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
|
|
7445
|
+
"name": "prompt",
|
|
7446
|
+
"allowNo": true,
|
|
7538
7447
|
"type": "boolean"
|
|
7539
7448
|
},
|
|
7540
|
-
"
|
|
7541
|
-
"char": "
|
|
7542
|
-
"description": "
|
|
7543
|
-
"name": "
|
|
7544
|
-
"default": 3000,
|
|
7449
|
+
"name": {
|
|
7450
|
+
"char": "n",
|
|
7451
|
+
"description": "Filter according to Name criteria",
|
|
7452
|
+
"name": "name",
|
|
7545
7453
|
"hasDynamicHelp": false,
|
|
7546
7454
|
"multiple": false,
|
|
7547
7455
|
"type": "option"
|
|
7548
7456
|
},
|
|
7549
|
-
"
|
|
7550
|
-
"char": "
|
|
7551
|
-
"description": "
|
|
7552
|
-
"name": "
|
|
7457
|
+
"status": {
|
|
7458
|
+
"char": "s",
|
|
7459
|
+
"description": "Filter according to Status criteria",
|
|
7460
|
+
"name": "status",
|
|
7461
|
+
"hasDynamicHelp": false,
|
|
7462
|
+
"multiple": false,
|
|
7463
|
+
"type": "option"
|
|
7464
|
+
},
|
|
7465
|
+
"delete-flow-interviews": {
|
|
7466
|
+
"char": "w",
|
|
7467
|
+
"description": "If the presence of Flow interviews prevent to delete flows versions, delete them before retrying to delete flow versions",
|
|
7468
|
+
"name": "delete-flow-interviews",
|
|
7553
7469
|
"allowNo": false,
|
|
7554
7470
|
"type": "boolean"
|
|
7555
7471
|
},
|
|
7556
|
-
"
|
|
7557
|
-
"char": "
|
|
7558
|
-
"description": "
|
|
7559
|
-
"name": "
|
|
7560
|
-
"allowNo":
|
|
7472
|
+
"allowpurgefailure": {
|
|
7473
|
+
"char": "f",
|
|
7474
|
+
"description": "Allows purges to fail without exiting with 1. Use --no-allowpurgefailure to disable",
|
|
7475
|
+
"name": "allowpurgefailure",
|
|
7476
|
+
"allowNo": true,
|
|
7561
7477
|
"type": "boolean"
|
|
7562
7478
|
},
|
|
7563
|
-
"
|
|
7564
|
-
"
|
|
7565
|
-
"
|
|
7566
|
-
"
|
|
7567
|
-
"
|
|
7568
|
-
"multiple": false,
|
|
7569
|
-
"type": "option"
|
|
7570
|
-
},
|
|
7571
|
-
"skip-doc": {
|
|
7572
|
-
"description": "Skip the generation of project documentation at the end of the command",
|
|
7573
|
-
"name": "skip-doc",
|
|
7574
|
-
"allowNo": false,
|
|
7575
|
-
"type": "boolean"
|
|
7576
|
-
},
|
|
7577
|
-
"outputfile": {
|
|
7578
|
-
"char": "f",
|
|
7579
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7580
|
-
"name": "outputfile",
|
|
7479
|
+
"instanceurl": {
|
|
7480
|
+
"char": "r",
|
|
7481
|
+
"description": "URL of org instance",
|
|
7482
|
+
"name": "instanceurl",
|
|
7483
|
+
"default": "https://login.salesforce.com",
|
|
7581
7484
|
"hasDynamicHelp": false,
|
|
7582
7485
|
"multiple": false,
|
|
7583
7486
|
"type": "option"
|
|
@@ -7620,58 +7523,57 @@
|
|
|
7620
7523
|
},
|
|
7621
7524
|
"hasDynamicHelp": true,
|
|
7622
7525
|
"hiddenAliases": [],
|
|
7623
|
-
"id": "hardis:org:
|
|
7526
|
+
"id": "hardis:org:purge:flow",
|
|
7624
7527
|
"pluginAlias": "sfdx-hardis",
|
|
7625
7528
|
"pluginName": "sfdx-hardis",
|
|
7626
7529
|
"pluginType": "core",
|
|
7627
7530
|
"strict": true,
|
|
7628
7531
|
"enableJsonFlag": true,
|
|
7629
|
-
"title": "
|
|
7630
|
-
"requiresProject":
|
|
7631
|
-
"triggerNotification": true,
|
|
7532
|
+
"title": "Purge Flow versions",
|
|
7533
|
+
"requiresProject": false,
|
|
7632
7534
|
"isESM": true,
|
|
7633
7535
|
"relativePath": [
|
|
7634
7536
|
"lib",
|
|
7635
7537
|
"commands",
|
|
7636
7538
|
"hardis",
|
|
7637
7539
|
"org",
|
|
7638
|
-
"
|
|
7639
|
-
"
|
|
7540
|
+
"purge",
|
|
7541
|
+
"flow.js"
|
|
7640
7542
|
],
|
|
7641
7543
|
"aliasPermutations": [],
|
|
7642
7544
|
"permutations": [
|
|
7643
|
-
"hardis:org:
|
|
7644
|
-
"org:hardis:
|
|
7645
|
-
"org:
|
|
7646
|
-
"org:
|
|
7647
|
-
"hardis:
|
|
7648
|
-
"
|
|
7649
|
-
"
|
|
7650
|
-
"
|
|
7651
|
-
"hardis:
|
|
7652
|
-
"
|
|
7653
|
-
"
|
|
7654
|
-
"
|
|
7655
|
-
"hardis:org:
|
|
7656
|
-
"org:hardis:
|
|
7657
|
-
"org:
|
|
7658
|
-
"org:
|
|
7659
|
-
"hardis:
|
|
7660
|
-
"
|
|
7661
|
-
"
|
|
7662
|
-
"
|
|
7663
|
-
"hardis:
|
|
7664
|
-
"
|
|
7665
|
-
"
|
|
7666
|
-
"
|
|
7545
|
+
"hardis:org:purge:flow",
|
|
7546
|
+
"org:hardis:purge:flow",
|
|
7547
|
+
"org:purge:hardis:flow",
|
|
7548
|
+
"org:purge:flow:hardis",
|
|
7549
|
+
"hardis:purge:org:flow",
|
|
7550
|
+
"purge:hardis:org:flow",
|
|
7551
|
+
"purge:org:hardis:flow",
|
|
7552
|
+
"purge:org:flow:hardis",
|
|
7553
|
+
"hardis:purge:flow:org",
|
|
7554
|
+
"purge:hardis:flow:org",
|
|
7555
|
+
"purge:flow:hardis:org",
|
|
7556
|
+
"purge:flow:org:hardis",
|
|
7557
|
+
"hardis:org:flow:purge",
|
|
7558
|
+
"org:hardis:flow:purge",
|
|
7559
|
+
"org:flow:hardis:purge",
|
|
7560
|
+
"org:flow:purge:hardis",
|
|
7561
|
+
"hardis:flow:org:purge",
|
|
7562
|
+
"flow:hardis:org:purge",
|
|
7563
|
+
"flow:org:hardis:purge",
|
|
7564
|
+
"flow:org:purge:hardis",
|
|
7565
|
+
"hardis:flow:purge:org",
|
|
7566
|
+
"flow:hardis:purge:org",
|
|
7567
|
+
"flow:purge:hardis:org",
|
|
7568
|
+
"flow:purge:org:hardis"
|
|
7667
7569
|
]
|
|
7668
7570
|
},
|
|
7669
|
-
"hardis:org:monitor:
|
|
7571
|
+
"hardis:org:monitor:all": {
|
|
7670
7572
|
"aliases": [],
|
|
7671
7573
|
"args": {},
|
|
7672
|
-
"description": "
|
|
7574
|
+
"description": "Monitor org, generate reports and sends notifications\n\nYou can disable some commands defining either a **monitoringDisable** property in `.sfdx-hardis.yml`, or a comma separated list in env variable **MONITORING_DISABLE**\n\nExample in .sfdx-hardis.yml:\n \n```yaml\nmonitoringDisable:\n - METADATA_STATUS\n - MISSING_ATTRIBUTES\n - UNUSED_METADATAS\n```\n \nExample in env var:\n\n```sh\nMONITORING_DISABLE=METADATA_STATUS,MISSING_ATTRIBUTES,UNUSED_METADATAS\n```\n\nA [default list of monitoring commands](https://sfdx-hardis.cloudity.com/salesforce-monitoring-home/#monitoring-commands) is used, if you want to override it you can define property **monitoringCommands** in your .sfdx-hardis.yml file\n\nExample:\n\n```yaml\nmonitoringCommands:\n - title: My Custom command\n command: sf my:custom:command\n - title: My Custom command 2\n command: sf my:other:custom:command\n```\n\nYou can force the daily run of all commands by defining env var `MONITORING_IGNORE_FREQUENCY=true`\n\nThe default list of commands is the following:\n\n| Key | Description | Command | Frequency |\n| :---: | :---- | :---- | :-----: |\n| [AUDIT_TRAIL](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | Detect suspect setup actions in major org | [sf hardis:org:diagnose:audittrail](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | daily |\n| [LEGACY_API](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | Detect calls to deprecated API versions | [sf hardis:org:diagnose:legacyapi](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | daily |\n| [ORG_LIMITS](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | Detect if org limits are close to be reached | [sf hardis:org:monitor:limits](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | daily |\n| [UNSECURED_CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | Detect unsecured Connected Apps in an org | [sf hardis:org:diagnose:unsecure-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | daily |\n| [LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | Extract licenses information | [sf hardis:org:diagnose:licenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | weekly |\n| [LINT_ACCESS](https://sfdx-hardis.cloudity.com/hardis/lint/access) | Detect custom elements with no access rights defined in permission sets | [sf hardis:lint:access](https://sfdx-hardis.cloudity.com/hardis/lint/access) | weekly |\n| [UNUSED_LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | Detect permission set licenses that are assigned to users that do not need them | [sf hardis:org:diagnose:unusedlicenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | weekly |\n| [UNUSED_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users without recent logins | [sf hardis:org:diagnose:unusedusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ACTIVE_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users with recent logins | [sf hardis:org:diagnose:unusedusers --returnactiveusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ORG_INFO](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | Get org info + SF instance info + next major upgrade date | [sf hardis:org:diagnose:instanceupgrade](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | weekly |\n| [RELEASE_UPDATES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | Gather warnings about incoming and overdue Release Updates | [sf hardis:org:diagnose:releaseupdates](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | weekly |\n| [UNUSED_METADATAS](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | Detect custom labels and custom permissions that are not in use | [sf hardis:lint:unusedmetadatas](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | weekly |\n| [UNUSED_APEX_CLASSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | Detect unused Apex classes in an org | [sf hardis:org:diagnose:unused-apex-classes](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | weekly |\n| [CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | Detect unused Connected Apps in an org | [sf hardis:org:diagnose:unused-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | weekly |\n| [METADATA_STATUS](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | Detect inactive metadata | [sf hardis:lint:metadatastatus](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | weekly |\n| [MISSING_ATTRIBUTES](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | Detect missing description on custom field | [sf hardis:lint:missingattributes](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | weekly |\n\n",
|
|
7673
7575
|
"examples": [
|
|
7674
|
-
"$ sf hardis:org:monitor:
|
|
7576
|
+
"$ sf hardis:org:monitor:all"
|
|
7675
7577
|
],
|
|
7676
7578
|
"flags": {
|
|
7677
7579
|
"json": {
|
|
@@ -7689,14 +7591,6 @@
|
|
|
7689
7591
|
"multiple": false,
|
|
7690
7592
|
"type": "option"
|
|
7691
7593
|
},
|
|
7692
|
-
"outputfile": {
|
|
7693
|
-
"char": "f",
|
|
7694
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7695
|
-
"name": "outputfile",
|
|
7696
|
-
"hasDynamicHelp": false,
|
|
7697
|
-
"multiple": false,
|
|
7698
|
-
"type": "option"
|
|
7699
|
-
},
|
|
7700
7594
|
"debug": {
|
|
7701
7595
|
"char": "d",
|
|
7702
7596
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7735,13 +7629,111 @@
|
|
|
7735
7629
|
},
|
|
7736
7630
|
"hasDynamicHelp": true,
|
|
7737
7631
|
"hiddenAliases": [],
|
|
7738
|
-
"id": "hardis:org:monitor:
|
|
7632
|
+
"id": "hardis:org:monitor:all",
|
|
7739
7633
|
"pluginAlias": "sfdx-hardis",
|
|
7740
7634
|
"pluginName": "sfdx-hardis",
|
|
7741
7635
|
"pluginType": "core",
|
|
7742
7636
|
"strict": true,
|
|
7743
7637
|
"enableJsonFlag": true,
|
|
7744
|
-
"title": "
|
|
7638
|
+
"title": "Monitor org",
|
|
7639
|
+
"monitoringCommandsDefault": [
|
|
7640
|
+
{
|
|
7641
|
+
"key": "AUDIT_TRAIL",
|
|
7642
|
+
"title": "Detect suspect setup actions in major org",
|
|
7643
|
+
"command": "sf hardis:org:diagnose:audittrail",
|
|
7644
|
+
"frequency": "daily"
|
|
7645
|
+
},
|
|
7646
|
+
{
|
|
7647
|
+
"key": "LEGACY_API",
|
|
7648
|
+
"title": "Detect calls to deprecated API versions",
|
|
7649
|
+
"command": "sf hardis:org:diagnose:legacyapi",
|
|
7650
|
+
"frequency": "daily"
|
|
7651
|
+
},
|
|
7652
|
+
{
|
|
7653
|
+
"key": "ORG_LIMITS",
|
|
7654
|
+
"title": "Detect if org limits are close to be reached",
|
|
7655
|
+
"command": "sf hardis:org:monitor:limits",
|
|
7656
|
+
"frequency": "daily"
|
|
7657
|
+
},
|
|
7658
|
+
{
|
|
7659
|
+
"key": "UNSECURED_CONNECTED_APPS",
|
|
7660
|
+
"title": "Detect unsecured Connected Apps in an org",
|
|
7661
|
+
"command": "sf hardis:org:diagnose:unsecure-connected-apps",
|
|
7662
|
+
"frequency": "daily"
|
|
7663
|
+
},
|
|
7664
|
+
{
|
|
7665
|
+
"key": "LICENSES",
|
|
7666
|
+
"title": "Extract licenses information",
|
|
7667
|
+
"command": "sf hardis:org:diagnose:licenses",
|
|
7668
|
+
"frequency": "weekly"
|
|
7669
|
+
},
|
|
7670
|
+
{
|
|
7671
|
+
"key": "LINT_ACCESS",
|
|
7672
|
+
"title": "Detect custom elements with no access rights defined in permission sets",
|
|
7673
|
+
"command": "sf hardis:lint:access",
|
|
7674
|
+
"frequency": "weekly"
|
|
7675
|
+
},
|
|
7676
|
+
{
|
|
7677
|
+
"key": "UNUSED_LICENSES",
|
|
7678
|
+
"title": "Detect permission set licenses that are assigned to users that do not need them",
|
|
7679
|
+
"command": "sf hardis:org:diagnose:unusedlicenses",
|
|
7680
|
+
"frequency": "weekly"
|
|
7681
|
+
},
|
|
7682
|
+
{
|
|
7683
|
+
"key": "UNUSED_USERS",
|
|
7684
|
+
"title": "Detect active users without recent logins",
|
|
7685
|
+
"command": "sf hardis:org:diagnose:unusedusers",
|
|
7686
|
+
"frequency": "weekly"
|
|
7687
|
+
},
|
|
7688
|
+
{
|
|
7689
|
+
"key": "ACTIVE_USERS",
|
|
7690
|
+
"title": "Detect active users with recent logins",
|
|
7691
|
+
"command": "sf hardis:org:diagnose:unusedusers --returnactiveusers",
|
|
7692
|
+
"frequency": "weekly"
|
|
7693
|
+
},
|
|
7694
|
+
{
|
|
7695
|
+
"key": "ORG_INFO",
|
|
7696
|
+
"title": "Get org info + SF instance info + next major upgrade date",
|
|
7697
|
+
"command": "sf hardis:org:diagnose:instanceupgrade",
|
|
7698
|
+
"frequency": "weekly"
|
|
7699
|
+
},
|
|
7700
|
+
{
|
|
7701
|
+
"key": "RELEASE_UPDATES",
|
|
7702
|
+
"title": "Gather warnings about incoming and overdue Release Updates",
|
|
7703
|
+
"command": "sf hardis:org:diagnose:releaseupdates",
|
|
7704
|
+
"frequency": "weekly"
|
|
7705
|
+
},
|
|
7706
|
+
{
|
|
7707
|
+
"key": "UNUSED_METADATAS",
|
|
7708
|
+
"title": "Detect custom labels and custom permissions that are not in use",
|
|
7709
|
+
"command": "sf hardis:lint:unusedmetadatas",
|
|
7710
|
+
"frequency": "weekly"
|
|
7711
|
+
},
|
|
7712
|
+
{
|
|
7713
|
+
"key": "UNUSED_APEX_CLASSES",
|
|
7714
|
+
"title": "Detect unused Apex classes in an org",
|
|
7715
|
+
"command": "sf hardis:org:diagnose:unused-apex-classes",
|
|
7716
|
+
"frequency": "weekly"
|
|
7717
|
+
},
|
|
7718
|
+
{
|
|
7719
|
+
"key": "CONNECTED_APPS",
|
|
7720
|
+
"title": "Detect unused Connected Apps in an org",
|
|
7721
|
+
"command": "sf hardis:org:diagnose:unused-connected-apps",
|
|
7722
|
+
"frequency": "weekly"
|
|
7723
|
+
},
|
|
7724
|
+
{
|
|
7725
|
+
"key": "METADATA_STATUS",
|
|
7726
|
+
"title": "Detect inactive metadata",
|
|
7727
|
+
"command": "sf hardis:lint:metadatastatus",
|
|
7728
|
+
"frequency": "weekly"
|
|
7729
|
+
},
|
|
7730
|
+
{
|
|
7731
|
+
"key": "MISSING_ATTRIBUTES",
|
|
7732
|
+
"title": "Detect missing description on custom field",
|
|
7733
|
+
"command": "sf hardis:lint:missingattributes",
|
|
7734
|
+
"frequency": "weekly"
|
|
7735
|
+
}
|
|
7736
|
+
],
|
|
7745
7737
|
"requiresProject": true,
|
|
7746
7738
|
"triggerNotification": true,
|
|
7747
7739
|
"isESM": true,
|
|
@@ -7751,43 +7743,45 @@
|
|
|
7751
7743
|
"hardis",
|
|
7752
7744
|
"org",
|
|
7753
7745
|
"monitor",
|
|
7754
|
-
"
|
|
7746
|
+
"all.js"
|
|
7755
7747
|
],
|
|
7756
7748
|
"aliasPermutations": [],
|
|
7757
7749
|
"permutations": [
|
|
7758
|
-
"hardis:org:monitor:
|
|
7759
|
-
"org:hardis:monitor:
|
|
7760
|
-
"org:monitor:hardis:
|
|
7761
|
-
"org:monitor:
|
|
7762
|
-
"hardis:monitor:org:
|
|
7763
|
-
"monitor:hardis:org:
|
|
7764
|
-
"monitor:org:hardis:
|
|
7765
|
-
"monitor:org:
|
|
7766
|
-
"hardis:monitor:
|
|
7767
|
-
"monitor:hardis:
|
|
7768
|
-
"monitor:
|
|
7769
|
-
"monitor:
|
|
7770
|
-
"hardis:org:
|
|
7771
|
-
"org:hardis:
|
|
7772
|
-
"org:
|
|
7773
|
-
"org:
|
|
7774
|
-
"hardis:
|
|
7775
|
-
"
|
|
7776
|
-
"
|
|
7777
|
-
"
|
|
7778
|
-
"hardis:
|
|
7779
|
-
"
|
|
7780
|
-
"
|
|
7781
|
-
"
|
|
7750
|
+
"hardis:org:monitor:all",
|
|
7751
|
+
"org:hardis:monitor:all",
|
|
7752
|
+
"org:monitor:hardis:all",
|
|
7753
|
+
"org:monitor:all:hardis",
|
|
7754
|
+
"hardis:monitor:org:all",
|
|
7755
|
+
"monitor:hardis:org:all",
|
|
7756
|
+
"monitor:org:hardis:all",
|
|
7757
|
+
"monitor:org:all:hardis",
|
|
7758
|
+
"hardis:monitor:all:org",
|
|
7759
|
+
"monitor:hardis:all:org",
|
|
7760
|
+
"monitor:all:hardis:org",
|
|
7761
|
+
"monitor:all:org:hardis",
|
|
7762
|
+
"hardis:org:all:monitor",
|
|
7763
|
+
"org:hardis:all:monitor",
|
|
7764
|
+
"org:all:hardis:monitor",
|
|
7765
|
+
"org:all:monitor:hardis",
|
|
7766
|
+
"hardis:all:org:monitor",
|
|
7767
|
+
"all:hardis:org:monitor",
|
|
7768
|
+
"all:org:hardis:monitor",
|
|
7769
|
+
"all:org:monitor:hardis",
|
|
7770
|
+
"hardis:all:monitor:org",
|
|
7771
|
+
"all:hardis:monitor:org",
|
|
7772
|
+
"all:monitor:hardis:org",
|
|
7773
|
+
"all:monitor:org:hardis"
|
|
7782
7774
|
]
|
|
7783
7775
|
},
|
|
7784
|
-
"hardis:org:
|
|
7776
|
+
"hardis:org:monitor:backup": {
|
|
7785
7777
|
"aliases": [],
|
|
7786
7778
|
"args": {},
|
|
7787
|
-
"description": "
|
|
7779
|
+
"description": "Retrieve sfdx sources in the context of a monitoring backup\n\nThe command exists in 2 modes: filtered(default & recommended) and full.\n\n## Filtered mode (default, better performances)\n\nAutomatically skips metadatas from installed packages with namespace. \n\nYou can remove more metadata types from backup, especially in case you have too many metadatas and that provokes a crash, using:\n\n- Manual update of `manifest/package-skip-items.xml` config file (then commit & push in the same branch)\n\n - Works with full wildcard (`<members>*</members>`) , named metadata (`<members>Account.Name</members>`) or partial wildcards names (`<members>pi__*</members>` , `<members>*__dlm</members>` , or `<members>prefix*suffix</members>`)\n\n- Environment variable MONITORING_BACKUP_SKIP_METADATA_TYPES (example: `MONITORING_BACKUP_SKIP_METADATA_TYPES=CustomLabel,StaticResource,Translation`): that will be applied to all monitoring branches.\n\n## Full mode\n\nActivate it with **--full** parameter, or variable MONITORING_BACKUP_MODE_FULL=true\n\nIgnores filters (namespaces items & manifest/package-skip-items.xml) to retrieve ALL metadatas, including those you might not care about (reports, translations...)\n\nAs we can retrieve only 10000 files by call, the list of all metadatas will be chunked to make multiple calls (and take more time than filtered mode)\n\n- if you use `--full-apply-filters` , manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES filters will be applied anyway\n- if you use `--exclude-namespaces` , namespaced items will be ignored\n\n_With those both options, it's like if you are not using --full, but with chunked metadata download_\n\n## In CI/CD\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-metadata-backup/) and can output Grafana, Slack and MsTeams Notifications.\n\n## Troubleshooting\n\nIf you have unknown errors (it happens !), you can investigate using the full command with smaller chunks.\n\nExample: `sf hardis:org:monitor:backup --full --exclude-namespaces --full-apply-filters --max-by-chunk 500`\n\nIt will allow you the identify the responsible metadata and ignore it using package-skip-items.xml or MONITORING_BACKUP_SKIP_METADATA_TYPES env variable.\n\n## Documentation\n\n[Doc generation (including visual flows)](https://sfdx-hardis.cloudity.com/hardis/doc/project2markdown/) is triggered at the end of the command.\n\nIf you want to also upload HTML Documentation on your Salesforce Org as static resource, use variable **SFDX_HARDIS_DOC_DEPLOY_TO_ORG=\"true\"**\n\nIf you want to also upload HTML Documentation on Cloudflare, use variable **SFDX_HARDIS_DOC_DEPLOY_TO_CLOUDFLARE=\"true\"**\n\n- If you want to generate the documentation in multiple languages, define variable SFDX_DOC_LANGUAGES (ex: SFDX_DOC_LANGUAGES=en,fr,de)\n- You can define one Cloudflare site by language, for example with the following variables:\n - CLOUDFLARE_PROJECT_NAME_EN=cloudity-demo-english\n - CLOUDFLARE_PROJECT_NAME_FR=cloudity-demo-french\n - CLOUDFLARE_PROJECT_NAME_DE=cloudity-demo-german\n\nIf Flow history doc always display a single state, you probably need to update your workflow configuration:\n\n- on Gitlab: Env variable [`GIT_FETCH_EXTRA_FLAGS: --depth 10000`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)\n- on GitHub: [`fetch-depth: 0`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)\n- on Azure: [`fetchDepth: \"0\"`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)\n- on Bitbucket: [`step: clone: depth: full`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)\n",
|
|
7788
7780
|
"examples": [
|
|
7789
|
-
"$ sf hardis:org:
|
|
7790
|
-
"$ sf hardis:org:
|
|
7781
|
+
"$ sf hardis:org:monitor:backup",
|
|
7782
|
+
"$ sf hardis:org:monitor:backup --full",
|
|
7783
|
+
"$ sf hardis:org:monitor:backup --full --exclude-namespaces",
|
|
7784
|
+
"$ sf hardis:org:monitor:backup --full --exclude-namespaces --full-apply-filters"
|
|
7791
7785
|
],
|
|
7792
7786
|
"flags": {
|
|
7793
7787
|
"json": {
|
|
@@ -7805,13 +7799,57 @@
|
|
|
7805
7799
|
"multiple": false,
|
|
7806
7800
|
"type": "option"
|
|
7807
7801
|
},
|
|
7808
|
-
"
|
|
7802
|
+
"full": {
|
|
7803
|
+
"description": "Dot not take in account filtering using package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES. Efficient but much much slower !",
|
|
7804
|
+
"name": "full",
|
|
7805
|
+
"allowNo": false,
|
|
7806
|
+
"type": "boolean"
|
|
7807
|
+
},
|
|
7808
|
+
"max-by-chunk": {
|
|
7809
|
+
"char": "m",
|
|
7810
|
+
"description": "If mode --full is activated, maximum number of metadatas in a package.xml chunk",
|
|
7811
|
+
"name": "max-by-chunk",
|
|
7812
|
+
"default": 3000,
|
|
7813
|
+
"hasDynamicHelp": false,
|
|
7814
|
+
"multiple": false,
|
|
7815
|
+
"type": "option"
|
|
7816
|
+
},
|
|
7817
|
+
"exclude-namespaces": {
|
|
7818
|
+
"char": "e",
|
|
7819
|
+
"description": "If mode --full is activated, exclude namespaced metadatas",
|
|
7820
|
+
"name": "exclude-namespaces",
|
|
7821
|
+
"allowNo": false,
|
|
7822
|
+
"type": "boolean"
|
|
7823
|
+
},
|
|
7824
|
+
"full-apply-filters": {
|
|
7809
7825
|
"char": "z",
|
|
7810
|
-
"description": "
|
|
7811
|
-
"name": "
|
|
7812
|
-
"allowNo":
|
|
7826
|
+
"description": "If mode --full is activated, apply filters of manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES anyway",
|
|
7827
|
+
"name": "full-apply-filters",
|
|
7828
|
+
"allowNo": false,
|
|
7829
|
+
"type": "boolean"
|
|
7830
|
+
},
|
|
7831
|
+
"start-chunk": {
|
|
7832
|
+
"description": "Use this parameter to troubleshoot a specific chunk. It will be used as the first chunk to retrieve",
|
|
7833
|
+
"name": "start-chunk",
|
|
7834
|
+
"default": 1,
|
|
7835
|
+
"hasDynamicHelp": false,
|
|
7836
|
+
"multiple": false,
|
|
7837
|
+
"type": "option"
|
|
7838
|
+
},
|
|
7839
|
+
"skip-doc": {
|
|
7840
|
+
"description": "Skip the generation of project documentation at the end of the command",
|
|
7841
|
+
"name": "skip-doc",
|
|
7842
|
+
"allowNo": false,
|
|
7813
7843
|
"type": "boolean"
|
|
7814
7844
|
},
|
|
7845
|
+
"outputfile": {
|
|
7846
|
+
"char": "f",
|
|
7847
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7848
|
+
"name": "outputfile",
|
|
7849
|
+
"hasDynamicHelp": false,
|
|
7850
|
+
"multiple": false,
|
|
7851
|
+
"type": "option"
|
|
7852
|
+
},
|
|
7815
7853
|
"debug": {
|
|
7816
7854
|
"char": "d",
|
|
7817
7855
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7850,59 +7888,58 @@
|
|
|
7850
7888
|
},
|
|
7851
7889
|
"hasDynamicHelp": true,
|
|
7852
7890
|
"hiddenAliases": [],
|
|
7853
|
-
"id": "hardis:org:
|
|
7891
|
+
"id": "hardis:org:monitor:backup",
|
|
7854
7892
|
"pluginAlias": "sfdx-hardis",
|
|
7855
7893
|
"pluginName": "sfdx-hardis",
|
|
7856
7894
|
"pluginType": "core",
|
|
7857
7895
|
"strict": true,
|
|
7858
7896
|
"enableJsonFlag": true,
|
|
7859
|
-
"title": "
|
|
7860
|
-
"requiresProject":
|
|
7897
|
+
"title": "Backup DX sources",
|
|
7898
|
+
"requiresProject": true,
|
|
7899
|
+
"triggerNotification": true,
|
|
7861
7900
|
"isESM": true,
|
|
7862
7901
|
"relativePath": [
|
|
7863
7902
|
"lib",
|
|
7864
7903
|
"commands",
|
|
7865
7904
|
"hardis",
|
|
7866
7905
|
"org",
|
|
7867
|
-
"
|
|
7868
|
-
"
|
|
7906
|
+
"monitor",
|
|
7907
|
+
"backup.js"
|
|
7869
7908
|
],
|
|
7870
7909
|
"aliasPermutations": [],
|
|
7871
7910
|
"permutations": [
|
|
7872
|
-
"hardis:org:
|
|
7873
|
-
"org:hardis:
|
|
7874
|
-
"org:
|
|
7875
|
-
"org:
|
|
7876
|
-
"hardis:
|
|
7877
|
-
"
|
|
7878
|
-
"
|
|
7879
|
-
"
|
|
7880
|
-
"hardis:
|
|
7881
|
-
"
|
|
7882
|
-
"
|
|
7883
|
-
"
|
|
7884
|
-
"hardis:org:
|
|
7885
|
-
"org:hardis:
|
|
7886
|
-
"org:
|
|
7887
|
-
"org:
|
|
7888
|
-
"hardis:
|
|
7889
|
-
"
|
|
7890
|
-
"
|
|
7891
|
-
"
|
|
7892
|
-
"hardis:
|
|
7893
|
-
"
|
|
7894
|
-
"
|
|
7895
|
-
"
|
|
7911
|
+
"hardis:org:monitor:backup",
|
|
7912
|
+
"org:hardis:monitor:backup",
|
|
7913
|
+
"org:monitor:hardis:backup",
|
|
7914
|
+
"org:monitor:backup:hardis",
|
|
7915
|
+
"hardis:monitor:org:backup",
|
|
7916
|
+
"monitor:hardis:org:backup",
|
|
7917
|
+
"monitor:org:hardis:backup",
|
|
7918
|
+
"monitor:org:backup:hardis",
|
|
7919
|
+
"hardis:monitor:backup:org",
|
|
7920
|
+
"monitor:hardis:backup:org",
|
|
7921
|
+
"monitor:backup:hardis:org",
|
|
7922
|
+
"monitor:backup:org:hardis",
|
|
7923
|
+
"hardis:org:backup:monitor",
|
|
7924
|
+
"org:hardis:backup:monitor",
|
|
7925
|
+
"org:backup:hardis:monitor",
|
|
7926
|
+
"org:backup:monitor:hardis",
|
|
7927
|
+
"hardis:backup:org:monitor",
|
|
7928
|
+
"backup:hardis:org:monitor",
|
|
7929
|
+
"backup:org:hardis:monitor",
|
|
7930
|
+
"backup:org:monitor:hardis",
|
|
7931
|
+
"hardis:backup:monitor:org",
|
|
7932
|
+
"backup:hardis:monitor:org",
|
|
7933
|
+
"backup:monitor:hardis:org",
|
|
7934
|
+
"backup:monitor:org:hardis"
|
|
7896
7935
|
]
|
|
7897
7936
|
},
|
|
7898
|
-
"hardis:org:
|
|
7937
|
+
"hardis:org:monitor:limits": {
|
|
7899
7938
|
"aliases": [],
|
|
7900
7939
|
"args": {},
|
|
7901
|
-
"description": "\n
|
|
7940
|
+
"description": "\n## Command Behavior\n\n**Checks the current usage of various Salesforce org limits and sends notifications if thresholds are exceeded.**\n\nThis command is a critical component of proactive Salesforce org management, helping administrators and developers monitor resource consumption and prevent hitting critical limits that could impact performance or functionality. It provides early warnings when limits are approaching their capacity.\n\nKey functionalities:\n\n- **Limit Retrieval:** Fetches a comprehensive list of all Salesforce org limits using the Salesforce CLI.\n- **Usage Calculation:** Calculates the percentage of each limit that is currently being used.\n- **Threshold-Based Alerting:** Assigns a severity (success, warning, or error) to each limit based on configurable thresholds:\n - **Warning:** If usage exceeds 50% (configurable via `LIMIT_THRESHOLD_WARNING` environment variable).\n - **Error:** If usage exceeds 75% (configurable via `LIMIT_THRESHOLD_ERROR` environment variable).\n- **CSV Report Generation:** Generates a CSV file containing all org limits, their current usage, maximum allowed, and calculated percentage used, along with the assigned severity.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of limits that have exceeded the warning or error thresholds.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-limits/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce CLI Integration:** It executes the `sf org limits list` command to retrieve the current org limits. It parses the JSON output of this command.\n- **Data Processing:** It iterates through the retrieved limits, calculates the `used` and `percentUsed` values, and assigns a `severity` (success, warning, error) based on the configured thresholds.\n- **Environment Variable Configuration:** Reads `LIMIT_THRESHOLD_WARNING` and `LIMIT_THRESHOLD_ERROR` environment variables to set the warning and error thresholds for limit usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of org limits.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and detailed metrics for each limit, which can be consumed by monitoring dashboards like Grafana.\n- **Exit Code Management:** Sets the process exit code to 1 if any limit is in an 'error' state, indicating a critical issue.\n</details>\n",
|
|
7902
7941
|
"examples": [
|
|
7903
|
-
"$ sf hardis:org:
|
|
7904
|
-
"$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --no-prompt --delete-flow-interviews",
|
|
7905
|
-
"$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --status \"Obsolete,Draft,InvalidDraft\" --name TestFlow"
|
|
7942
|
+
"$ sf hardis:org:monitor:limits"
|
|
7906
7943
|
],
|
|
7907
7944
|
"flags": {
|
|
7908
7945
|
"json": {
|
|
@@ -7920,48 +7957,10 @@
|
|
|
7920
7957
|
"multiple": false,
|
|
7921
7958
|
"type": "option"
|
|
7922
7959
|
},
|
|
7923
|
-
"
|
|
7924
|
-
"char": "z",
|
|
7925
|
-
"description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
|
|
7926
|
-
"name": "prompt",
|
|
7927
|
-
"allowNo": true,
|
|
7928
|
-
"type": "boolean"
|
|
7929
|
-
},
|
|
7930
|
-
"name": {
|
|
7931
|
-
"char": "n",
|
|
7932
|
-
"description": "Filter according to Name criteria",
|
|
7933
|
-
"name": "name",
|
|
7934
|
-
"hasDynamicHelp": false,
|
|
7935
|
-
"multiple": false,
|
|
7936
|
-
"type": "option"
|
|
7937
|
-
},
|
|
7938
|
-
"status": {
|
|
7939
|
-
"char": "s",
|
|
7940
|
-
"description": "Filter according to Status criteria",
|
|
7941
|
-
"name": "status",
|
|
7942
|
-
"hasDynamicHelp": false,
|
|
7943
|
-
"multiple": false,
|
|
7944
|
-
"type": "option"
|
|
7945
|
-
},
|
|
7946
|
-
"delete-flow-interviews": {
|
|
7947
|
-
"char": "w",
|
|
7948
|
-
"description": "If the presence of Flow interviews prevent to delete flows versions, delete them before retrying to delete flow versions",
|
|
7949
|
-
"name": "delete-flow-interviews",
|
|
7950
|
-
"allowNo": false,
|
|
7951
|
-
"type": "boolean"
|
|
7952
|
-
},
|
|
7953
|
-
"allowpurgefailure": {
|
|
7960
|
+
"outputfile": {
|
|
7954
7961
|
"char": "f",
|
|
7955
|
-
"description": "
|
|
7956
|
-
"name": "
|
|
7957
|
-
"allowNo": true,
|
|
7958
|
-
"type": "boolean"
|
|
7959
|
-
},
|
|
7960
|
-
"instanceurl": {
|
|
7961
|
-
"char": "r",
|
|
7962
|
-
"description": "URL of org instance",
|
|
7963
|
-
"name": "instanceurl",
|
|
7964
|
-
"default": "https://login.salesforce.com",
|
|
7962
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7963
|
+
"name": "outputfile",
|
|
7965
7964
|
"hasDynamicHelp": false,
|
|
7966
7965
|
"multiple": false,
|
|
7967
7966
|
"type": "option"
|
|
@@ -8004,49 +8003,50 @@
|
|
|
8004
8003
|
},
|
|
8005
8004
|
"hasDynamicHelp": true,
|
|
8006
8005
|
"hiddenAliases": [],
|
|
8007
|
-
"id": "hardis:org:
|
|
8006
|
+
"id": "hardis:org:monitor:limits",
|
|
8008
8007
|
"pluginAlias": "sfdx-hardis",
|
|
8009
8008
|
"pluginName": "sfdx-hardis",
|
|
8010
8009
|
"pluginType": "core",
|
|
8011
8010
|
"strict": true,
|
|
8012
8011
|
"enableJsonFlag": true,
|
|
8013
|
-
"title": "
|
|
8014
|
-
"requiresProject":
|
|
8012
|
+
"title": "Check org limits",
|
|
8013
|
+
"requiresProject": true,
|
|
8014
|
+
"triggerNotification": true,
|
|
8015
8015
|
"isESM": true,
|
|
8016
8016
|
"relativePath": [
|
|
8017
8017
|
"lib",
|
|
8018
8018
|
"commands",
|
|
8019
8019
|
"hardis",
|
|
8020
8020
|
"org",
|
|
8021
|
-
"
|
|
8022
|
-
"
|
|
8021
|
+
"monitor",
|
|
8022
|
+
"limits.js"
|
|
8023
8023
|
],
|
|
8024
8024
|
"aliasPermutations": [],
|
|
8025
8025
|
"permutations": [
|
|
8026
|
-
"hardis:org:
|
|
8027
|
-
"org:hardis:
|
|
8028
|
-
"org:
|
|
8029
|
-
"org:
|
|
8030
|
-
"hardis:
|
|
8031
|
-
"
|
|
8032
|
-
"
|
|
8033
|
-
"
|
|
8034
|
-
"hardis:
|
|
8035
|
-
"
|
|
8036
|
-
"
|
|
8037
|
-
"
|
|
8038
|
-
"hardis:org:
|
|
8039
|
-
"org:hardis:
|
|
8040
|
-
"org:
|
|
8041
|
-
"org:
|
|
8042
|
-
"hardis:
|
|
8043
|
-
"
|
|
8044
|
-
"
|
|
8045
|
-
"
|
|
8046
|
-
"hardis:
|
|
8047
|
-
"
|
|
8048
|
-
"
|
|
8049
|
-
"
|
|
8026
|
+
"hardis:org:monitor:limits",
|
|
8027
|
+
"org:hardis:monitor:limits",
|
|
8028
|
+
"org:monitor:hardis:limits",
|
|
8029
|
+
"org:monitor:limits:hardis",
|
|
8030
|
+
"hardis:monitor:org:limits",
|
|
8031
|
+
"monitor:hardis:org:limits",
|
|
8032
|
+
"monitor:org:hardis:limits",
|
|
8033
|
+
"monitor:org:limits:hardis",
|
|
8034
|
+
"hardis:monitor:limits:org",
|
|
8035
|
+
"monitor:hardis:limits:org",
|
|
8036
|
+
"monitor:limits:hardis:org",
|
|
8037
|
+
"monitor:limits:org:hardis",
|
|
8038
|
+
"hardis:org:limits:monitor",
|
|
8039
|
+
"org:hardis:limits:monitor",
|
|
8040
|
+
"org:limits:hardis:monitor",
|
|
8041
|
+
"org:limits:monitor:hardis",
|
|
8042
|
+
"hardis:limits:org:monitor",
|
|
8043
|
+
"limits:hardis:org:monitor",
|
|
8044
|
+
"limits:org:hardis:monitor",
|
|
8045
|
+
"limits:org:monitor:hardis",
|
|
8046
|
+
"hardis:limits:monitor:org",
|
|
8047
|
+
"limits:hardis:monitor:org",
|
|
8048
|
+
"limits:monitor:hardis:org",
|
|
8049
|
+
"limits:monitor:org:hardis"
|
|
8050
8050
|
]
|
|
8051
8051
|
},
|
|
8052
8052
|
"hardis:org:refresh:after-refresh": {
|
|
@@ -9811,6 +9811,109 @@
|
|
|
9811
9811
|
"auth:configure:project:hardis"
|
|
9812
9812
|
]
|
|
9813
9813
|
},
|
|
9814
|
+
"hardis:project:convert:profilestopermsets": {
|
|
9815
|
+
"aliases": [],
|
|
9816
|
+
"args": {},
|
|
9817
|
+
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
9818
|
+
"examples": [
|
|
9819
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
9820
|
+
],
|
|
9821
|
+
"flags": {
|
|
9822
|
+
"json": {
|
|
9823
|
+
"description": "Format output as json.",
|
|
9824
|
+
"helpGroup": "GLOBAL",
|
|
9825
|
+
"name": "json",
|
|
9826
|
+
"allowNo": false,
|
|
9827
|
+
"type": "boolean"
|
|
9828
|
+
},
|
|
9829
|
+
"flags-dir": {
|
|
9830
|
+
"helpGroup": "GLOBAL",
|
|
9831
|
+
"name": "flags-dir",
|
|
9832
|
+
"summary": "Import flag values from a directory.",
|
|
9833
|
+
"hasDynamicHelp": false,
|
|
9834
|
+
"multiple": false,
|
|
9835
|
+
"type": "option"
|
|
9836
|
+
},
|
|
9837
|
+
"except": {
|
|
9838
|
+
"char": "e",
|
|
9839
|
+
"description": "List of filters",
|
|
9840
|
+
"name": "except",
|
|
9841
|
+
"default": [],
|
|
9842
|
+
"hasDynamicHelp": false,
|
|
9843
|
+
"multiple": true,
|
|
9844
|
+
"type": "option"
|
|
9845
|
+
},
|
|
9846
|
+
"debug": {
|
|
9847
|
+
"char": "d",
|
|
9848
|
+
"description": "Activate debug mode (more logs)",
|
|
9849
|
+
"name": "debug",
|
|
9850
|
+
"allowNo": false,
|
|
9851
|
+
"type": "boolean"
|
|
9852
|
+
},
|
|
9853
|
+
"websocket": {
|
|
9854
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9855
|
+
"name": "websocket",
|
|
9856
|
+
"hasDynamicHelp": false,
|
|
9857
|
+
"multiple": false,
|
|
9858
|
+
"type": "option"
|
|
9859
|
+
},
|
|
9860
|
+
"skipauth": {
|
|
9861
|
+
"description": "Skip authentication check when a default username is required",
|
|
9862
|
+
"name": "skipauth",
|
|
9863
|
+
"allowNo": false,
|
|
9864
|
+
"type": "boolean"
|
|
9865
|
+
}
|
|
9866
|
+
},
|
|
9867
|
+
"hasDynamicHelp": false,
|
|
9868
|
+
"hiddenAliases": [],
|
|
9869
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
9870
|
+
"pluginAlias": "sfdx-hardis",
|
|
9871
|
+
"pluginName": "sfdx-hardis",
|
|
9872
|
+
"pluginType": "core",
|
|
9873
|
+
"strict": true,
|
|
9874
|
+
"enableJsonFlag": true,
|
|
9875
|
+
"title": "Convert Profiles into Permission Sets",
|
|
9876
|
+
"requiresProject": true,
|
|
9877
|
+
"requiresSfdxPlugins": [
|
|
9878
|
+
"shane-sfdx-plugins"
|
|
9879
|
+
],
|
|
9880
|
+
"isESM": true,
|
|
9881
|
+
"relativePath": [
|
|
9882
|
+
"lib",
|
|
9883
|
+
"commands",
|
|
9884
|
+
"hardis",
|
|
9885
|
+
"project",
|
|
9886
|
+
"convert",
|
|
9887
|
+
"profilestopermsets.js"
|
|
9888
|
+
],
|
|
9889
|
+
"aliasPermutations": [],
|
|
9890
|
+
"permutations": [
|
|
9891
|
+
"hardis:project:convert:profilestopermsets",
|
|
9892
|
+
"project:hardis:convert:profilestopermsets",
|
|
9893
|
+
"project:convert:hardis:profilestopermsets",
|
|
9894
|
+
"project:convert:profilestopermsets:hardis",
|
|
9895
|
+
"hardis:convert:project:profilestopermsets",
|
|
9896
|
+
"convert:hardis:project:profilestopermsets",
|
|
9897
|
+
"convert:project:hardis:profilestopermsets",
|
|
9898
|
+
"convert:project:profilestopermsets:hardis",
|
|
9899
|
+
"hardis:convert:profilestopermsets:project",
|
|
9900
|
+
"convert:hardis:profilestopermsets:project",
|
|
9901
|
+
"convert:profilestopermsets:hardis:project",
|
|
9902
|
+
"convert:profilestopermsets:project:hardis",
|
|
9903
|
+
"hardis:project:profilestopermsets:convert",
|
|
9904
|
+
"project:hardis:profilestopermsets:convert",
|
|
9905
|
+
"project:profilestopermsets:hardis:convert",
|
|
9906
|
+
"project:profilestopermsets:convert:hardis",
|
|
9907
|
+
"hardis:profilestopermsets:project:convert",
|
|
9908
|
+
"profilestopermsets:hardis:project:convert",
|
|
9909
|
+
"profilestopermsets:project:hardis:convert",
|
|
9910
|
+
"profilestopermsets:project:convert:hardis",
|
|
9911
|
+
"hardis:profilestopermsets:convert:project",
|
|
9912
|
+
"profilestopermsets:hardis:convert:project",
|
|
9913
|
+
"profilestopermsets:convert:hardis:project",
|
|
9914
|
+
"profilestopermsets:convert:project:hardis"
|
|
9915
|
+
]
|
|
9916
|
+
},
|
|
9814
9917
|
"hardis:project:clean:emptyitems": {
|
|
9815
9918
|
"aliases": [],
|
|
9816
9919
|
"args": {},
|
|
@@ -11296,109 +11399,6 @@
|
|
|
11296
11399
|
"xml:clean:project:hardis"
|
|
11297
11400
|
]
|
|
11298
11401
|
},
|
|
11299
|
-
"hardis:project:convert:profilestopermsets": {
|
|
11300
|
-
"aliases": [],
|
|
11301
|
-
"args": {},
|
|
11302
|
-
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
11303
|
-
"examples": [
|
|
11304
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
11305
|
-
],
|
|
11306
|
-
"flags": {
|
|
11307
|
-
"json": {
|
|
11308
|
-
"description": "Format output as json.",
|
|
11309
|
-
"helpGroup": "GLOBAL",
|
|
11310
|
-
"name": "json",
|
|
11311
|
-
"allowNo": false,
|
|
11312
|
-
"type": "boolean"
|
|
11313
|
-
},
|
|
11314
|
-
"flags-dir": {
|
|
11315
|
-
"helpGroup": "GLOBAL",
|
|
11316
|
-
"name": "flags-dir",
|
|
11317
|
-
"summary": "Import flag values from a directory.",
|
|
11318
|
-
"hasDynamicHelp": false,
|
|
11319
|
-
"multiple": false,
|
|
11320
|
-
"type": "option"
|
|
11321
|
-
},
|
|
11322
|
-
"except": {
|
|
11323
|
-
"char": "e",
|
|
11324
|
-
"description": "List of filters",
|
|
11325
|
-
"name": "except",
|
|
11326
|
-
"default": [],
|
|
11327
|
-
"hasDynamicHelp": false,
|
|
11328
|
-
"multiple": true,
|
|
11329
|
-
"type": "option"
|
|
11330
|
-
},
|
|
11331
|
-
"debug": {
|
|
11332
|
-
"char": "d",
|
|
11333
|
-
"description": "Activate debug mode (more logs)",
|
|
11334
|
-
"name": "debug",
|
|
11335
|
-
"allowNo": false,
|
|
11336
|
-
"type": "boolean"
|
|
11337
|
-
},
|
|
11338
|
-
"websocket": {
|
|
11339
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11340
|
-
"name": "websocket",
|
|
11341
|
-
"hasDynamicHelp": false,
|
|
11342
|
-
"multiple": false,
|
|
11343
|
-
"type": "option"
|
|
11344
|
-
},
|
|
11345
|
-
"skipauth": {
|
|
11346
|
-
"description": "Skip authentication check when a default username is required",
|
|
11347
|
-
"name": "skipauth",
|
|
11348
|
-
"allowNo": false,
|
|
11349
|
-
"type": "boolean"
|
|
11350
|
-
}
|
|
11351
|
-
},
|
|
11352
|
-
"hasDynamicHelp": false,
|
|
11353
|
-
"hiddenAliases": [],
|
|
11354
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
11355
|
-
"pluginAlias": "sfdx-hardis",
|
|
11356
|
-
"pluginName": "sfdx-hardis",
|
|
11357
|
-
"pluginType": "core",
|
|
11358
|
-
"strict": true,
|
|
11359
|
-
"enableJsonFlag": true,
|
|
11360
|
-
"title": "Convert Profiles into Permission Sets",
|
|
11361
|
-
"requiresProject": true,
|
|
11362
|
-
"requiresSfdxPlugins": [
|
|
11363
|
-
"shane-sfdx-plugins"
|
|
11364
|
-
],
|
|
11365
|
-
"isESM": true,
|
|
11366
|
-
"relativePath": [
|
|
11367
|
-
"lib",
|
|
11368
|
-
"commands",
|
|
11369
|
-
"hardis",
|
|
11370
|
-
"project",
|
|
11371
|
-
"convert",
|
|
11372
|
-
"profilestopermsets.js"
|
|
11373
|
-
],
|
|
11374
|
-
"aliasPermutations": [],
|
|
11375
|
-
"permutations": [
|
|
11376
|
-
"hardis:project:convert:profilestopermsets",
|
|
11377
|
-
"project:hardis:convert:profilestopermsets",
|
|
11378
|
-
"project:convert:hardis:profilestopermsets",
|
|
11379
|
-
"project:convert:profilestopermsets:hardis",
|
|
11380
|
-
"hardis:convert:project:profilestopermsets",
|
|
11381
|
-
"convert:hardis:project:profilestopermsets",
|
|
11382
|
-
"convert:project:hardis:profilestopermsets",
|
|
11383
|
-
"convert:project:profilestopermsets:hardis",
|
|
11384
|
-
"hardis:convert:profilestopermsets:project",
|
|
11385
|
-
"convert:hardis:profilestopermsets:project",
|
|
11386
|
-
"convert:profilestopermsets:hardis:project",
|
|
11387
|
-
"convert:profilestopermsets:project:hardis",
|
|
11388
|
-
"hardis:project:profilestopermsets:convert",
|
|
11389
|
-
"project:hardis:profilestopermsets:convert",
|
|
11390
|
-
"project:profilestopermsets:hardis:convert",
|
|
11391
|
-
"project:profilestopermsets:convert:hardis",
|
|
11392
|
-
"hardis:profilestopermsets:project:convert",
|
|
11393
|
-
"profilestopermsets:hardis:project:convert",
|
|
11394
|
-
"profilestopermsets:project:hardis:convert",
|
|
11395
|
-
"profilestopermsets:project:convert:hardis",
|
|
11396
|
-
"hardis:profilestopermsets:convert:project",
|
|
11397
|
-
"profilestopermsets:hardis:convert:project",
|
|
11398
|
-
"profilestopermsets:convert:hardis:project",
|
|
11399
|
-
"profilestopermsets:convert:project:hardis"
|
|
11400
|
-
]
|
|
11401
|
-
},
|
|
11402
11402
|
"hardis:project:deploy:notify": {
|
|
11403
11403
|
"aliases": [],
|
|
11404
11404
|
"args": {},
|
|
@@ -15271,5 +15271,5 @@
|
|
|
15271
15271
|
]
|
|
15272
15272
|
}
|
|
15273
15273
|
},
|
|
15274
|
-
"version": "6.4.
|
|
15274
|
+
"version": "6.4.2"
|
|
15275
15275
|
}
|