sfdx-hardis 6.1.1-beta202508240003.0 → 6.1.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 +7 -0
- package/lib/commands/hardis/org/retrieve/packageconfig.js +5 -1
- package/lib/commands/hardis/org/retrieve/packageconfig.js.map +1 -1
- package/lib/commands/hardis/scratch/create.js +1 -1
- package/lib/commands/hardis/scratch/create.js.map +1 -1
- package/lib/common/utils/authUtils.js +2 -2
- package/lib/common/utils/authUtils.js.map +1 -1
- package/lib/common/utils/orgUtils.js +69 -42
- package/lib/common/utils/orgUtils.js.map +1 -1
- package/lib/config/index.d.ts +2 -2
- package/lib/config/index.js +2 -1
- package/lib/config/index.js.map +1 -1
- package/oclif.manifest.json +885 -886
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -57,12 +57,13 @@
|
|
|
57
57
|
"world:hello"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
|
-
"hardis:
|
|
60
|
+
"hardis:auth:login": {
|
|
61
61
|
"aliases": [],
|
|
62
62
|
"args": {},
|
|
63
|
-
"description": "\n## Command Behavior\n\n**
|
|
63
|
+
"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",
|
|
64
64
|
"examples": [
|
|
65
|
-
"$ sf hardis:
|
|
65
|
+
"$ sf hardis:auth:login",
|
|
66
|
+
"CI=true sf hardis:auth:login"
|
|
66
67
|
],
|
|
67
68
|
"flags": {
|
|
68
69
|
"json": {
|
|
@@ -80,6 +81,28 @@
|
|
|
80
81
|
"multiple": false,
|
|
81
82
|
"type": "option"
|
|
82
83
|
},
|
|
84
|
+
"instanceurl": {
|
|
85
|
+
"char": "r",
|
|
86
|
+
"description": "URL of org instance",
|
|
87
|
+
"name": "instanceurl",
|
|
88
|
+
"hasDynamicHelp": false,
|
|
89
|
+
"multiple": false,
|
|
90
|
+
"type": "option"
|
|
91
|
+
},
|
|
92
|
+
"devhub": {
|
|
93
|
+
"char": "h",
|
|
94
|
+
"description": "Also connect associated DevHub",
|
|
95
|
+
"name": "devhub",
|
|
96
|
+
"allowNo": false,
|
|
97
|
+
"type": "boolean"
|
|
98
|
+
},
|
|
99
|
+
"scratchorg": {
|
|
100
|
+
"char": "s",
|
|
101
|
+
"description": "Scratch org",
|
|
102
|
+
"name": "scratchorg",
|
|
103
|
+
"allowNo": false,
|
|
104
|
+
"type": "boolean"
|
|
105
|
+
},
|
|
83
106
|
"debug": {
|
|
84
107
|
"char": "d",
|
|
85
108
|
"description": "Activate debug mode (more logs)",
|
|
@@ -103,41 +126,38 @@
|
|
|
103
126
|
},
|
|
104
127
|
"hasDynamicHelp": false,
|
|
105
128
|
"hiddenAliases": [],
|
|
106
|
-
"id": "hardis:
|
|
129
|
+
"id": "hardis:auth:login",
|
|
107
130
|
"pluginAlias": "sfdx-hardis",
|
|
108
131
|
"pluginName": "sfdx-hardis",
|
|
109
132
|
"pluginType": "core",
|
|
110
133
|
"strict": true,
|
|
111
134
|
"enableJsonFlag": true,
|
|
112
|
-
"title": "
|
|
113
|
-
"uiConfig": {
|
|
114
|
-
"hide": true
|
|
115
|
-
},
|
|
135
|
+
"title": "Login",
|
|
116
136
|
"requiresProject": false,
|
|
117
137
|
"isESM": true,
|
|
118
138
|
"relativePath": [
|
|
119
139
|
"lib",
|
|
120
140
|
"commands",
|
|
121
141
|
"hardis",
|
|
122
|
-
"
|
|
123
|
-
"
|
|
142
|
+
"auth",
|
|
143
|
+
"login.js"
|
|
124
144
|
],
|
|
125
145
|
"aliasPermutations": [],
|
|
126
146
|
"permutations": [
|
|
127
|
-
"hardis:
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"hardis:
|
|
131
|
-
"
|
|
132
|
-
"
|
|
147
|
+
"hardis:auth:login",
|
|
148
|
+
"auth:hardis:login",
|
|
149
|
+
"auth:login:hardis",
|
|
150
|
+
"hardis:login:auth",
|
|
151
|
+
"login:hardis:auth",
|
|
152
|
+
"login:auth:hardis"
|
|
133
153
|
]
|
|
134
154
|
},
|
|
135
|
-
"hardis:
|
|
155
|
+
"hardis:cache:clear": {
|
|
136
156
|
"aliases": [],
|
|
137
157
|
"args": {},
|
|
138
|
-
"description": "\n## Command Behavior\n\n**
|
|
158
|
+
"description": "\n## Command Behavior\n\n**Clears the local cache generated by the sfdx-hardis plugin.**\n\nThis command is designed to remove temporary files, stored configurations, and other cached data that sfdx-hardis uses to optimize its operations. Clearing the cache can be beneficial for:\n\n- **Troubleshooting:** Resolving unexpected behavior or inconsistencies.\n- **Disk Space Management:** Freeing up storage on your local machine.\n- **Ensuring Fresh Data:** Guaranteeing that the plugin operates with the most current data and configurations.\n\n## Technical explanations\n\nThe command's technical implementation is straightforward:\n\n- **Direct Function Call:** It directly invokes the `clearCache()` function, which is imported from \buri../../../common/cache/index.js\buri.\n- **Cache Management Logic:** The \buriclearCache()` function encapsulates the logic for identifying and removing the specific files and directories that constitute the sfdx-hardis cache.\n",
|
|
139
159
|
"examples": [
|
|
140
|
-
"$ sf hardis:
|
|
160
|
+
"$ sf hardis:cache:clear"
|
|
141
161
|
],
|
|
142
162
|
"flags": {
|
|
143
163
|
"json": {
|
|
@@ -155,20 +175,6 @@
|
|
|
155
175
|
"multiple": false,
|
|
156
176
|
"type": "option"
|
|
157
177
|
},
|
|
158
|
-
"level": {
|
|
159
|
-
"char": "l",
|
|
160
|
-
"description": "project,branch or user",
|
|
161
|
-
"name": "level",
|
|
162
|
-
"default": "project",
|
|
163
|
-
"hasDynamicHelp": false,
|
|
164
|
-
"multiple": false,
|
|
165
|
-
"options": [
|
|
166
|
-
"project",
|
|
167
|
-
"branch",
|
|
168
|
-
"user"
|
|
169
|
-
],
|
|
170
|
-
"type": "option"
|
|
171
|
-
},
|
|
172
178
|
"debug": {
|
|
173
179
|
"char": "d",
|
|
174
180
|
"description": "Activate debug mode (more logs)",
|
|
@@ -192,39 +198,41 @@
|
|
|
192
198
|
},
|
|
193
199
|
"hasDynamicHelp": false,
|
|
194
200
|
"hiddenAliases": [],
|
|
195
|
-
"id": "hardis:
|
|
201
|
+
"id": "hardis:cache:clear",
|
|
196
202
|
"pluginAlias": "sfdx-hardis",
|
|
197
203
|
"pluginName": "sfdx-hardis",
|
|
198
204
|
"pluginType": "core",
|
|
199
205
|
"strict": true,
|
|
200
206
|
"enableJsonFlag": true,
|
|
201
|
-
"title": "
|
|
207
|
+
"title": "Clear sfdx-hardis cache",
|
|
208
|
+
"uiConfig": {
|
|
209
|
+
"hide": true
|
|
210
|
+
},
|
|
202
211
|
"requiresProject": false,
|
|
203
212
|
"isESM": true,
|
|
204
213
|
"relativePath": [
|
|
205
214
|
"lib",
|
|
206
215
|
"commands",
|
|
207
216
|
"hardis",
|
|
208
|
-
"
|
|
209
|
-
"
|
|
217
|
+
"cache",
|
|
218
|
+
"clear.js"
|
|
210
219
|
],
|
|
211
220
|
"aliasPermutations": [],
|
|
212
221
|
"permutations": [
|
|
213
|
-
"hardis:
|
|
214
|
-
"
|
|
215
|
-
"
|
|
216
|
-
"hardis:
|
|
217
|
-
"
|
|
218
|
-
"
|
|
222
|
+
"hardis:cache:clear",
|
|
223
|
+
"cache:hardis:clear",
|
|
224
|
+
"cache:clear:hardis",
|
|
225
|
+
"hardis:clear:cache",
|
|
226
|
+
"clear:hardis:cache",
|
|
227
|
+
"clear:cache: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": {
|
|
@@ -3101,8 +3101,7 @@
|
|
|
3101
3101
|
"title": "Create and initialize scratch org",
|
|
3102
3102
|
"requiresProject": true,
|
|
3103
3103
|
"requiresSfdxPlugins": [
|
|
3104
|
-
"sfdmu"
|
|
3105
|
-
"texei-sfdx-plugin"
|
|
3104
|
+
"sfdmu"
|
|
3106
3105
|
],
|
|
3107
3106
|
"isESM": true,
|
|
3108
3107
|
"relativePath": [
|
|
@@ -5489,12 +5488,15 @@
|
|
|
5489
5488
|
"import:data:org:hardis"
|
|
5490
5489
|
]
|
|
5491
5490
|
},
|
|
5492
|
-
"hardis:org:
|
|
5491
|
+
"hardis:org:diagnose:audittrail": {
|
|
5493
5492
|
"aliases": [],
|
|
5494
5493
|
"args": {},
|
|
5495
|
-
"description": "
|
|
5494
|
+
"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",
|
|
5496
5495
|
"examples": [
|
|
5497
|
-
"$ sf hardis:org:
|
|
5496
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5497
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5498
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5499
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5498
5500
|
],
|
|
5499
5501
|
"flags": {
|
|
5500
5502
|
"json": {
|
|
@@ -5512,37 +5514,26 @@
|
|
|
5512
5514
|
"multiple": false,
|
|
5513
5515
|
"type": "option"
|
|
5514
5516
|
},
|
|
5515
|
-
"
|
|
5516
|
-
"char": "
|
|
5517
|
-
"description": "
|
|
5518
|
-
"name": "
|
|
5519
|
-
"hasDynamicHelp": false,
|
|
5520
|
-
"multiple": false,
|
|
5521
|
-
"type": "option"
|
|
5522
|
-
},
|
|
5523
|
-
"chunksize": {
|
|
5524
|
-
"char": "c",
|
|
5525
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
5526
|
-
"name": "chunksize",
|
|
5527
|
-
"default": 1000,
|
|
5517
|
+
"excludeusers": {
|
|
5518
|
+
"char": "e",
|
|
5519
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5520
|
+
"name": "excludeusers",
|
|
5528
5521
|
"hasDynamicHelp": false,
|
|
5529
5522
|
"multiple": false,
|
|
5530
5523
|
"type": "option"
|
|
5531
5524
|
},
|
|
5532
|
-
"
|
|
5525
|
+
"lastndays": {
|
|
5533
5526
|
"char": "t",
|
|
5534
|
-
"description": "
|
|
5535
|
-
"name": "
|
|
5536
|
-
"default": 300000,
|
|
5527
|
+
"description": "Number of days to extract from today (included)",
|
|
5528
|
+
"name": "lastndays",
|
|
5537
5529
|
"hasDynamicHelp": false,
|
|
5538
5530
|
"multiple": false,
|
|
5539
5531
|
"type": "option"
|
|
5540
5532
|
},
|
|
5541
|
-
"
|
|
5542
|
-
"char": "
|
|
5543
|
-
"description": "
|
|
5544
|
-
"name": "
|
|
5545
|
-
"default": 0,
|
|
5533
|
+
"outputfile": {
|
|
5534
|
+
"char": "f",
|
|
5535
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5536
|
+
"name": "outputfile",
|
|
5546
5537
|
"hasDynamicHelp": false,
|
|
5547
5538
|
"multiple": false,
|
|
5548
5539
|
"type": "option"
|
|
@@ -5585,13 +5576,13 @@
|
|
|
5585
5576
|
},
|
|
5586
5577
|
"hasDynamicHelp": true,
|
|
5587
5578
|
"hiddenAliases": [],
|
|
5588
|
-
"id": "hardis:org:
|
|
5579
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5589
5580
|
"pluginAlias": "sfdx-hardis",
|
|
5590
5581
|
"pluginName": "sfdx-hardis",
|
|
5591
5582
|
"pluginType": "core",
|
|
5592
5583
|
"strict": true,
|
|
5593
5584
|
"enableJsonFlag": true,
|
|
5594
|
-
"title": "
|
|
5585
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5595
5586
|
"requiresProject": false,
|
|
5596
5587
|
"isESM": true,
|
|
5597
5588
|
"relativePath": [
|
|
@@ -5599,43 +5590,43 @@
|
|
|
5599
5590
|
"commands",
|
|
5600
5591
|
"hardis",
|
|
5601
5592
|
"org",
|
|
5602
|
-
"
|
|
5603
|
-
"
|
|
5593
|
+
"diagnose",
|
|
5594
|
+
"audittrail.js"
|
|
5604
5595
|
],
|
|
5605
5596
|
"aliasPermutations": [],
|
|
5606
5597
|
"permutations": [
|
|
5607
|
-
"hardis:org:
|
|
5608
|
-
"org:hardis:
|
|
5609
|
-
"org:
|
|
5610
|
-
"org:
|
|
5611
|
-
"hardis:
|
|
5612
|
-
"
|
|
5613
|
-
"
|
|
5614
|
-
"
|
|
5615
|
-
"hardis:
|
|
5616
|
-
"
|
|
5617
|
-
"
|
|
5618
|
-
"
|
|
5619
|
-
"hardis:org:
|
|
5620
|
-
"org:hardis:
|
|
5621
|
-
"org:
|
|
5622
|
-
"org:
|
|
5623
|
-
"hardis:
|
|
5624
|
-
"
|
|
5625
|
-
"
|
|
5626
|
-
"
|
|
5627
|
-
"hardis:
|
|
5628
|
-
"
|
|
5629
|
-
"
|
|
5630
|
-
"
|
|
5598
|
+
"hardis:org:diagnose:audittrail",
|
|
5599
|
+
"org:hardis:diagnose:audittrail",
|
|
5600
|
+
"org:diagnose:hardis:audittrail",
|
|
5601
|
+
"org:diagnose:audittrail:hardis",
|
|
5602
|
+
"hardis:diagnose:org:audittrail",
|
|
5603
|
+
"diagnose:hardis:org:audittrail",
|
|
5604
|
+
"diagnose:org:hardis:audittrail",
|
|
5605
|
+
"diagnose:org:audittrail:hardis",
|
|
5606
|
+
"hardis:diagnose:audittrail:org",
|
|
5607
|
+
"diagnose:hardis:audittrail:org",
|
|
5608
|
+
"diagnose:audittrail:hardis:org",
|
|
5609
|
+
"diagnose:audittrail:org:hardis",
|
|
5610
|
+
"hardis:org:audittrail:diagnose",
|
|
5611
|
+
"org:hardis:audittrail:diagnose",
|
|
5612
|
+
"org:audittrail:hardis:diagnose",
|
|
5613
|
+
"org:audittrail:diagnose:hardis",
|
|
5614
|
+
"hardis:audittrail:org:diagnose",
|
|
5615
|
+
"audittrail:hardis:org:diagnose",
|
|
5616
|
+
"audittrail:org:hardis:diagnose",
|
|
5617
|
+
"audittrail:org:diagnose:hardis",
|
|
5618
|
+
"hardis:audittrail:diagnose:org",
|
|
5619
|
+
"audittrail:hardis:diagnose:org",
|
|
5620
|
+
"audittrail:diagnose:hardis:org",
|
|
5621
|
+
"audittrail:diagnose:org:hardis"
|
|
5631
5622
|
]
|
|
5632
5623
|
},
|
|
5633
|
-
"hardis:org:
|
|
5624
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5634
5625
|
"aliases": [],
|
|
5635
5626
|
"args": {},
|
|
5636
|
-
"description": "\
|
|
5627
|
+
"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",
|
|
5637
5628
|
"examples": [
|
|
5638
|
-
"$ sf hardis:org:
|
|
5629
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5639
5630
|
],
|
|
5640
5631
|
"flags": {
|
|
5641
5632
|
"json": {
|
|
@@ -5653,21 +5644,6 @@
|
|
|
5653
5644
|
"multiple": false,
|
|
5654
5645
|
"type": "option"
|
|
5655
5646
|
},
|
|
5656
|
-
"path": {
|
|
5657
|
-
"char": "p",
|
|
5658
|
-
"description": "Path to the file export project",
|
|
5659
|
-
"name": "path",
|
|
5660
|
-
"hasDynamicHelp": false,
|
|
5661
|
-
"multiple": false,
|
|
5662
|
-
"type": "option"
|
|
5663
|
-
},
|
|
5664
|
-
"overwrite": {
|
|
5665
|
-
"char": "f",
|
|
5666
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
5667
|
-
"name": "overwrite",
|
|
5668
|
-
"allowNo": false,
|
|
5669
|
-
"type": "boolean"
|
|
5670
|
-
},
|
|
5671
5647
|
"debug": {
|
|
5672
5648
|
"char": "d",
|
|
5673
5649
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5706,13 +5682,13 @@
|
|
|
5706
5682
|
},
|
|
5707
5683
|
"hasDynamicHelp": true,
|
|
5708
5684
|
"hiddenAliases": [],
|
|
5709
|
-
"id": "hardis:org:
|
|
5685
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
5710
5686
|
"pluginAlias": "sfdx-hardis",
|
|
5711
5687
|
"pluginName": "sfdx-hardis",
|
|
5712
5688
|
"pluginType": "core",
|
|
5713
5689
|
"strict": true,
|
|
5714
5690
|
"enableJsonFlag": true,
|
|
5715
|
-
"title": "
|
|
5691
|
+
"title": "Get Instance Upgrade date",
|
|
5716
5692
|
"requiresProject": false,
|
|
5717
5693
|
"isESM": true,
|
|
5718
5694
|
"relativePath": [
|
|
@@ -5720,44 +5696,46 @@
|
|
|
5720
5696
|
"commands",
|
|
5721
5697
|
"hardis",
|
|
5722
5698
|
"org",
|
|
5723
|
-
"
|
|
5724
|
-
"
|
|
5699
|
+
"diagnose",
|
|
5700
|
+
"instanceupgrade.js"
|
|
5725
5701
|
],
|
|
5726
5702
|
"aliasPermutations": [],
|
|
5727
5703
|
"permutations": [
|
|
5728
|
-
"hardis:org:
|
|
5729
|
-
"org:hardis:
|
|
5730
|
-
"org:
|
|
5731
|
-
"org:
|
|
5732
|
-
"hardis:
|
|
5733
|
-
"
|
|
5734
|
-
"
|
|
5735
|
-
"
|
|
5736
|
-
"hardis:
|
|
5737
|
-
"
|
|
5738
|
-
"
|
|
5739
|
-
"
|
|
5740
|
-
"hardis:org:
|
|
5741
|
-
"org:hardis:
|
|
5742
|
-
"org:
|
|
5743
|
-
"org:
|
|
5744
|
-
"hardis:
|
|
5745
|
-
"
|
|
5746
|
-
"
|
|
5747
|
-
"
|
|
5748
|
-
"hardis:
|
|
5749
|
-
"
|
|
5750
|
-
"
|
|
5751
|
-
"
|
|
5704
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
5705
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
5706
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
5707
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
5708
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
5709
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
5710
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
5711
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
5712
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
5713
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
5714
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
5715
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
5716
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
5717
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
5718
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
5719
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
5720
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
5721
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
5722
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
5723
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
5724
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
5725
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
5726
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
5727
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
5752
5728
|
]
|
|
5753
5729
|
},
|
|
5754
|
-
"hardis:org:
|
|
5730
|
+
"hardis:org:diagnose:legacyapi": {
|
|
5755
5731
|
"aliases": [],
|
|
5756
5732
|
"args": {},
|
|
5757
|
-
"description": "
|
|
5733
|
+
"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",
|
|
5758
5734
|
"examples": [
|
|
5759
|
-
"$ sf hardis:org:
|
|
5760
|
-
"$ sf hardis:org:
|
|
5735
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
5736
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
5737
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
5738
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
5761
5739
|
],
|
|
5762
5740
|
"flags": {
|
|
5763
5741
|
"json": {
|
|
@@ -5775,10 +5753,28 @@
|
|
|
5775
5753
|
"multiple": false,
|
|
5776
5754
|
"type": "option"
|
|
5777
5755
|
},
|
|
5778
|
-
"
|
|
5756
|
+
"eventtype": {
|
|
5757
|
+
"char": "e",
|
|
5758
|
+
"description": "Type of EventLogFile event to analyze",
|
|
5759
|
+
"name": "eventtype",
|
|
5760
|
+
"default": "ApiTotalUsage",
|
|
5761
|
+
"hasDynamicHelp": false,
|
|
5762
|
+
"multiple": false,
|
|
5763
|
+
"type": "option"
|
|
5764
|
+
},
|
|
5765
|
+
"limit": {
|
|
5779
5766
|
"char": "l",
|
|
5780
|
-
"description": "
|
|
5781
|
-
"name": "
|
|
5767
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
5768
|
+
"name": "limit",
|
|
5769
|
+
"default": 999,
|
|
5770
|
+
"hasDynamicHelp": false,
|
|
5771
|
+
"multiple": false,
|
|
5772
|
+
"type": "option"
|
|
5773
|
+
},
|
|
5774
|
+
"outputfile": {
|
|
5775
|
+
"char": "f",
|
|
5776
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5777
|
+
"name": "outputfile",
|
|
5782
5778
|
"hasDynamicHelp": false,
|
|
5783
5779
|
"multiple": false,
|
|
5784
5780
|
"type": "option"
|
|
@@ -5821,60 +5817,57 @@
|
|
|
5821
5817
|
},
|
|
5822
5818
|
"hasDynamicHelp": true,
|
|
5823
5819
|
"hiddenAliases": [],
|
|
5824
|
-
"id": "hardis:org:
|
|
5820
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
5825
5821
|
"pluginAlias": "sfdx-hardis",
|
|
5826
5822
|
"pluginName": "sfdx-hardis",
|
|
5827
5823
|
"pluginType": "core",
|
|
5828
5824
|
"strict": true,
|
|
5829
5825
|
"enableJsonFlag": true,
|
|
5830
|
-
"title": "
|
|
5831
|
-
"requiresProject":
|
|
5826
|
+
"title": "Check for legacy API use",
|
|
5827
|
+
"requiresProject": false,
|
|
5832
5828
|
"isESM": true,
|
|
5833
5829
|
"relativePath": [
|
|
5834
5830
|
"lib",
|
|
5835
5831
|
"commands",
|
|
5836
5832
|
"hardis",
|
|
5837
5833
|
"org",
|
|
5838
|
-
"
|
|
5839
|
-
"
|
|
5834
|
+
"diagnose",
|
|
5835
|
+
"legacyapi.js"
|
|
5840
5836
|
],
|
|
5841
5837
|
"aliasPermutations": [],
|
|
5842
5838
|
"permutations": [
|
|
5843
|
-
"hardis:org:
|
|
5844
|
-
"org:hardis:
|
|
5845
|
-
"org:
|
|
5846
|
-
"org:
|
|
5847
|
-
"hardis:
|
|
5848
|
-
"
|
|
5849
|
-
"
|
|
5850
|
-
"
|
|
5851
|
-
"hardis:
|
|
5852
|
-
"
|
|
5853
|
-
"
|
|
5854
|
-
"
|
|
5855
|
-
"hardis:org:
|
|
5856
|
-
"org:hardis:
|
|
5857
|
-
"org:
|
|
5858
|
-
"org:
|
|
5859
|
-
"hardis:
|
|
5860
|
-
"
|
|
5861
|
-
"
|
|
5862
|
-
"
|
|
5863
|
-
"hardis:
|
|
5864
|
-
"
|
|
5865
|
-
"
|
|
5866
|
-
"
|
|
5839
|
+
"hardis:org:diagnose:legacyapi",
|
|
5840
|
+
"org:hardis:diagnose:legacyapi",
|
|
5841
|
+
"org:diagnose:hardis:legacyapi",
|
|
5842
|
+
"org:diagnose:legacyapi:hardis",
|
|
5843
|
+
"hardis:diagnose:org:legacyapi",
|
|
5844
|
+
"diagnose:hardis:org:legacyapi",
|
|
5845
|
+
"diagnose:org:hardis:legacyapi",
|
|
5846
|
+
"diagnose:org:legacyapi:hardis",
|
|
5847
|
+
"hardis:diagnose:legacyapi:org",
|
|
5848
|
+
"diagnose:hardis:legacyapi:org",
|
|
5849
|
+
"diagnose:legacyapi:hardis:org",
|
|
5850
|
+
"diagnose:legacyapi:org:hardis",
|
|
5851
|
+
"hardis:org:legacyapi:diagnose",
|
|
5852
|
+
"org:hardis:legacyapi:diagnose",
|
|
5853
|
+
"org:legacyapi:hardis:diagnose",
|
|
5854
|
+
"org:legacyapi:diagnose:hardis",
|
|
5855
|
+
"hardis:legacyapi:org:diagnose",
|
|
5856
|
+
"legacyapi:hardis:org:diagnose",
|
|
5857
|
+
"legacyapi:org:hardis:diagnose",
|
|
5858
|
+
"legacyapi:org:diagnose:hardis",
|
|
5859
|
+
"hardis:legacyapi:diagnose:org",
|
|
5860
|
+
"legacyapi:hardis:diagnose:org",
|
|
5861
|
+
"legacyapi:diagnose:hardis:org",
|
|
5862
|
+
"legacyapi:diagnose:org:hardis"
|
|
5867
5863
|
]
|
|
5868
5864
|
},
|
|
5869
|
-
"hardis:org:diagnose:
|
|
5865
|
+
"hardis:org:diagnose:licenses": {
|
|
5870
5866
|
"aliases": [],
|
|
5871
5867
|
"args": {},
|
|
5872
|
-
"description": "
|
|
5868
|
+
"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",
|
|
5873
5869
|
"examples": [
|
|
5874
|
-
"$ sf hardis:org:diagnose:
|
|
5875
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5876
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5877
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5870
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
5878
5871
|
],
|
|
5879
5872
|
"flags": {
|
|
5880
5873
|
"json": {
|
|
@@ -5892,22 +5885,6 @@
|
|
|
5892
5885
|
"multiple": false,
|
|
5893
5886
|
"type": "option"
|
|
5894
5887
|
},
|
|
5895
|
-
"excludeusers": {
|
|
5896
|
-
"char": "e",
|
|
5897
|
-
"description": "Comma-separated list of usernames to exclude",
|
|
5898
|
-
"name": "excludeusers",
|
|
5899
|
-
"hasDynamicHelp": false,
|
|
5900
|
-
"multiple": false,
|
|
5901
|
-
"type": "option"
|
|
5902
|
-
},
|
|
5903
|
-
"lastndays": {
|
|
5904
|
-
"char": "t",
|
|
5905
|
-
"description": "Number of days to extract from today (included)",
|
|
5906
|
-
"name": "lastndays",
|
|
5907
|
-
"hasDynamicHelp": false,
|
|
5908
|
-
"multiple": false,
|
|
5909
|
-
"type": "option"
|
|
5910
|
-
},
|
|
5911
5888
|
"outputfile": {
|
|
5912
5889
|
"char": "f",
|
|
5913
5890
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -5916,6 +5893,13 @@
|
|
|
5916
5893
|
"multiple": false,
|
|
5917
5894
|
"type": "option"
|
|
5918
5895
|
},
|
|
5896
|
+
"usedonly": {
|
|
5897
|
+
"char": "u",
|
|
5898
|
+
"description": "Filter to have only used licenses",
|
|
5899
|
+
"name": "usedonly",
|
|
5900
|
+
"allowNo": false,
|
|
5901
|
+
"type": "boolean"
|
|
5902
|
+
},
|
|
5919
5903
|
"debug": {
|
|
5920
5904
|
"char": "d",
|
|
5921
5905
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5954,13 +5938,13 @@
|
|
|
5954
5938
|
},
|
|
5955
5939
|
"hasDynamicHelp": true,
|
|
5956
5940
|
"hiddenAliases": [],
|
|
5957
|
-
"id": "hardis:org:diagnose:
|
|
5941
|
+
"id": "hardis:org:diagnose:licenses",
|
|
5958
5942
|
"pluginAlias": "sfdx-hardis",
|
|
5959
5943
|
"pluginName": "sfdx-hardis",
|
|
5960
5944
|
"pluginType": "core",
|
|
5961
5945
|
"strict": true,
|
|
5962
5946
|
"enableJsonFlag": true,
|
|
5963
|
-
"title": "
|
|
5947
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
5964
5948
|
"requiresProject": false,
|
|
5965
5949
|
"isESM": true,
|
|
5966
5950
|
"relativePath": [
|
|
@@ -5969,42 +5953,42 @@
|
|
|
5969
5953
|
"hardis",
|
|
5970
5954
|
"org",
|
|
5971
5955
|
"diagnose",
|
|
5972
|
-
"
|
|
5956
|
+
"licenses.js"
|
|
5973
5957
|
],
|
|
5974
5958
|
"aliasPermutations": [],
|
|
5975
5959
|
"permutations": [
|
|
5976
|
-
"hardis:org:diagnose:
|
|
5977
|
-
"org:hardis:diagnose:
|
|
5978
|
-
"org:diagnose:hardis:
|
|
5979
|
-
"org:diagnose:
|
|
5980
|
-
"hardis:diagnose:org:
|
|
5981
|
-
"diagnose:hardis:org:
|
|
5982
|
-
"diagnose:org:hardis:
|
|
5983
|
-
"diagnose:org:
|
|
5984
|
-
"hardis:diagnose:
|
|
5985
|
-
"diagnose:hardis:
|
|
5986
|
-
"diagnose:
|
|
5987
|
-
"diagnose:
|
|
5988
|
-
"hardis:org:
|
|
5989
|
-
"org:hardis:
|
|
5990
|
-
"org:
|
|
5991
|
-
"org:
|
|
5992
|
-
"hardis:
|
|
5993
|
-
"
|
|
5994
|
-
"
|
|
5995
|
-
"
|
|
5996
|
-
"hardis:
|
|
5997
|
-
"
|
|
5998
|
-
"
|
|
5999
|
-
"
|
|
5960
|
+
"hardis:org:diagnose:licenses",
|
|
5961
|
+
"org:hardis:diagnose:licenses",
|
|
5962
|
+
"org:diagnose:hardis:licenses",
|
|
5963
|
+
"org:diagnose:licenses:hardis",
|
|
5964
|
+
"hardis:diagnose:org:licenses",
|
|
5965
|
+
"diagnose:hardis:org:licenses",
|
|
5966
|
+
"diagnose:org:hardis:licenses",
|
|
5967
|
+
"diagnose:org:licenses:hardis",
|
|
5968
|
+
"hardis:diagnose:licenses:org",
|
|
5969
|
+
"diagnose:hardis:licenses:org",
|
|
5970
|
+
"diagnose:licenses:hardis:org",
|
|
5971
|
+
"diagnose:licenses:org:hardis",
|
|
5972
|
+
"hardis:org:licenses:diagnose",
|
|
5973
|
+
"org:hardis:licenses:diagnose",
|
|
5974
|
+
"org:licenses:hardis:diagnose",
|
|
5975
|
+
"org:licenses:diagnose:hardis",
|
|
5976
|
+
"hardis:licenses:org:diagnose",
|
|
5977
|
+
"licenses:hardis:org:diagnose",
|
|
5978
|
+
"licenses:org:hardis:diagnose",
|
|
5979
|
+
"licenses:org:diagnose:hardis",
|
|
5980
|
+
"hardis:licenses:diagnose:org",
|
|
5981
|
+
"licenses:hardis:diagnose:org",
|
|
5982
|
+
"licenses:diagnose:hardis:org",
|
|
5983
|
+
"licenses:diagnose:org:hardis"
|
|
6000
5984
|
]
|
|
6001
5985
|
},
|
|
6002
|
-
"hardis:org:diagnose:
|
|
5986
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6003
5987
|
"aliases": [],
|
|
6004
5988
|
"args": {},
|
|
6005
|
-
"description": "
|
|
5989
|
+
"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",
|
|
6006
5990
|
"examples": [
|
|
6007
|
-
"$ sf hardis:org:diagnose:
|
|
5991
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6008
5992
|
],
|
|
6009
5993
|
"flags": {
|
|
6010
5994
|
"json": {
|
|
@@ -6022,8 +6006,16 @@
|
|
|
6022
6006
|
"multiple": false,
|
|
6023
6007
|
"type": "option"
|
|
6024
6008
|
},
|
|
6025
|
-
"
|
|
6026
|
-
"char": "
|
|
6009
|
+
"outputfile": {
|
|
6010
|
+
"char": "f",
|
|
6011
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6012
|
+
"name": "outputfile",
|
|
6013
|
+
"hasDynamicHelp": false,
|
|
6014
|
+
"multiple": false,
|
|
6015
|
+
"type": "option"
|
|
6016
|
+
},
|
|
6017
|
+
"debug": {
|
|
6018
|
+
"char": "d",
|
|
6027
6019
|
"description": "Activate debug mode (more logs)",
|
|
6028
6020
|
"name": "debug",
|
|
6029
6021
|
"allowNo": false,
|
|
@@ -6060,13 +6052,13 @@
|
|
|
6060
6052
|
},
|
|
6061
6053
|
"hasDynamicHelp": true,
|
|
6062
6054
|
"hiddenAliases": [],
|
|
6063
|
-
"id": "hardis:org:diagnose:
|
|
6055
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6064
6056
|
"pluginAlias": "sfdx-hardis",
|
|
6065
6057
|
"pluginName": "sfdx-hardis",
|
|
6066
6058
|
"pluginType": "core",
|
|
6067
6059
|
"strict": true,
|
|
6068
6060
|
"enableJsonFlag": true,
|
|
6069
|
-
"title": "
|
|
6061
|
+
"title": "Check Release Updates of an org",
|
|
6070
6062
|
"requiresProject": false,
|
|
6071
6063
|
"isESM": true,
|
|
6072
6064
|
"relativePath": [
|
|
@@ -6075,45 +6067,43 @@
|
|
|
6075
6067
|
"hardis",
|
|
6076
6068
|
"org",
|
|
6077
6069
|
"diagnose",
|
|
6078
|
-
"
|
|
6070
|
+
"releaseupdates.js"
|
|
6079
6071
|
],
|
|
6080
6072
|
"aliasPermutations": [],
|
|
6081
6073
|
"permutations": [
|
|
6082
|
-
"hardis:org:diagnose:
|
|
6083
|
-
"org:hardis:diagnose:
|
|
6084
|
-
"org:diagnose:hardis:
|
|
6085
|
-
"org:diagnose:
|
|
6086
|
-
"hardis:diagnose:org:
|
|
6087
|
-
"diagnose:hardis:org:
|
|
6088
|
-
"diagnose:org:hardis:
|
|
6089
|
-
"diagnose:org:
|
|
6090
|
-
"hardis:diagnose:
|
|
6091
|
-
"diagnose:hardis:
|
|
6092
|
-
"diagnose:
|
|
6093
|
-
"diagnose:
|
|
6094
|
-
"hardis:org:
|
|
6095
|
-
"org:hardis:
|
|
6096
|
-
"org:
|
|
6097
|
-
"org:
|
|
6098
|
-
"hardis:
|
|
6099
|
-
"
|
|
6100
|
-
"
|
|
6101
|
-
"
|
|
6102
|
-
"hardis:
|
|
6103
|
-
"
|
|
6104
|
-
"
|
|
6105
|
-
"
|
|
6074
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6075
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6076
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6077
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6078
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6079
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6080
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6081
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6082
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6083
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6084
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6085
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6086
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6087
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6088
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6089
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6090
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6091
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6092
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6093
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6094
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6095
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6096
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6097
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6106
6098
|
]
|
|
6107
6099
|
},
|
|
6108
|
-
"hardis:org:diagnose:
|
|
6100
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6109
6101
|
"aliases": [],
|
|
6110
6102
|
"args": {},
|
|
6111
|
-
"description": "
|
|
6103
|
+
"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",
|
|
6112
6104
|
"examples": [
|
|
6113
|
-
"$ sf hardis:org:diagnose:
|
|
6114
|
-
"$ sf hardis:org:diagnose:
|
|
6115
|
-
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6116
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6105
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6106
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6117
6107
|
],
|
|
6118
6108
|
"flags": {
|
|
6119
6109
|
"json": {
|
|
@@ -6131,24 +6121,6 @@
|
|
|
6131
6121
|
"multiple": false,
|
|
6132
6122
|
"type": "option"
|
|
6133
6123
|
},
|
|
6134
|
-
"eventtype": {
|
|
6135
|
-
"char": "e",
|
|
6136
|
-
"description": "Type of EventLogFile event to analyze",
|
|
6137
|
-
"name": "eventtype",
|
|
6138
|
-
"default": "ApiTotalUsage",
|
|
6139
|
-
"hasDynamicHelp": false,
|
|
6140
|
-
"multiple": false,
|
|
6141
|
-
"type": "option"
|
|
6142
|
-
},
|
|
6143
|
-
"limit": {
|
|
6144
|
-
"char": "l",
|
|
6145
|
-
"description": "Number of latest EventLogFile events to analyze",
|
|
6146
|
-
"name": "limit",
|
|
6147
|
-
"default": 999,
|
|
6148
|
-
"hasDynamicHelp": false,
|
|
6149
|
-
"multiple": false,
|
|
6150
|
-
"type": "option"
|
|
6151
|
-
},
|
|
6152
6124
|
"outputfile": {
|
|
6153
6125
|
"char": "f",
|
|
6154
6126
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6157,6 +6129,14 @@
|
|
|
6157
6129
|
"multiple": false,
|
|
6158
6130
|
"type": "option"
|
|
6159
6131
|
},
|
|
6132
|
+
"days": {
|
|
6133
|
+
"char": "t",
|
|
6134
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6135
|
+
"name": "days",
|
|
6136
|
+
"hasDynamicHelp": false,
|
|
6137
|
+
"multiple": false,
|
|
6138
|
+
"type": "option"
|
|
6139
|
+
},
|
|
6160
6140
|
"debug": {
|
|
6161
6141
|
"char": "d",
|
|
6162
6142
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6195,13 +6175,13 @@
|
|
|
6195
6175
|
},
|
|
6196
6176
|
"hasDynamicHelp": true,
|
|
6197
6177
|
"hiddenAliases": [],
|
|
6198
|
-
"id": "hardis:org:diagnose:
|
|
6178
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6199
6179
|
"pluginAlias": "sfdx-hardis",
|
|
6200
6180
|
"pluginName": "sfdx-hardis",
|
|
6201
6181
|
"pluginType": "core",
|
|
6202
6182
|
"strict": true,
|
|
6203
6183
|
"enableJsonFlag": true,
|
|
6204
|
-
"title": "
|
|
6184
|
+
"title": "Detect unused Apex classes in an org",
|
|
6205
6185
|
"requiresProject": false,
|
|
6206
6186
|
"isESM": true,
|
|
6207
6187
|
"relativePath": [
|
|
@@ -6210,42 +6190,42 @@
|
|
|
6210
6190
|
"hardis",
|
|
6211
6191
|
"org",
|
|
6212
6192
|
"diagnose",
|
|
6213
|
-
"
|
|
6193
|
+
"unused-apex-classes.js"
|
|
6214
6194
|
],
|
|
6215
6195
|
"aliasPermutations": [],
|
|
6216
6196
|
"permutations": [
|
|
6217
|
-
"hardis:org:diagnose:
|
|
6218
|
-
"org:hardis:diagnose:
|
|
6219
|
-
"org:diagnose:hardis:
|
|
6220
|
-
"org:diagnose:
|
|
6221
|
-
"hardis:diagnose:org:
|
|
6222
|
-
"diagnose:hardis:org:
|
|
6223
|
-
"diagnose:org:hardis:
|
|
6224
|
-
"diagnose:org:
|
|
6225
|
-
"hardis:diagnose:
|
|
6226
|
-
"diagnose:hardis:
|
|
6227
|
-
"diagnose:
|
|
6228
|
-
"diagnose:
|
|
6229
|
-
"hardis:org:
|
|
6230
|
-
"org:hardis:
|
|
6231
|
-
"org:
|
|
6232
|
-
"org:
|
|
6233
|
-
"hardis:
|
|
6234
|
-
"
|
|
6235
|
-
"
|
|
6236
|
-
"
|
|
6237
|
-
"hardis:
|
|
6238
|
-
"
|
|
6239
|
-
"
|
|
6240
|
-
"
|
|
6197
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6198
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6199
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6200
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6201
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6202
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6203
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6204
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6205
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6206
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6207
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6208
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6209
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6210
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6211
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6212
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6213
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6214
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6215
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6216
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6217
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6218
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6219
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6220
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6241
6221
|
]
|
|
6242
6222
|
},
|
|
6243
|
-
"hardis:org:diagnose:
|
|
6223
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6244
6224
|
"aliases": [],
|
|
6245
6225
|
"args": {},
|
|
6246
|
-
"description": "\n
|
|
6226
|
+
"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",
|
|
6247
6227
|
"examples": [
|
|
6248
|
-
"$ sf hardis:org:diagnose:
|
|
6228
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6249
6229
|
],
|
|
6250
6230
|
"flags": {
|
|
6251
6231
|
"json": {
|
|
@@ -6271,13 +6251,6 @@
|
|
|
6271
6251
|
"multiple": false,
|
|
6272
6252
|
"type": "option"
|
|
6273
6253
|
},
|
|
6274
|
-
"usedonly": {
|
|
6275
|
-
"char": "u",
|
|
6276
|
-
"description": "Filter to have only used licenses",
|
|
6277
|
-
"name": "usedonly",
|
|
6278
|
-
"allowNo": false,
|
|
6279
|
-
"type": "boolean"
|
|
6280
|
-
},
|
|
6281
6254
|
"debug": {
|
|
6282
6255
|
"char": "d",
|
|
6283
6256
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6316,13 +6289,30 @@
|
|
|
6316
6289
|
},
|
|
6317
6290
|
"hasDynamicHelp": true,
|
|
6318
6291
|
"hiddenAliases": [],
|
|
6319
|
-
"id": "hardis:org:diagnose:
|
|
6292
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6320
6293
|
"pluginAlias": "sfdx-hardis",
|
|
6321
6294
|
"pluginName": "sfdx-hardis",
|
|
6322
6295
|
"pluginType": "core",
|
|
6323
6296
|
"strict": true,
|
|
6324
6297
|
"enableJsonFlag": true,
|
|
6325
|
-
"title": "
|
|
6298
|
+
"title": "Unused Connected Apps in an org",
|
|
6299
|
+
"allowedInactiveConnectedApps": [
|
|
6300
|
+
"Ant Migration Tool",
|
|
6301
|
+
"Chatter Desktop",
|
|
6302
|
+
"Chatter Mobile for BlackBerry",
|
|
6303
|
+
"Force.com IDE",
|
|
6304
|
+
"OIQ_Integration",
|
|
6305
|
+
"Salesforce CLI",
|
|
6306
|
+
"Salesforce Files",
|
|
6307
|
+
"Salesforce Mobile Dashboards",
|
|
6308
|
+
"Salesforce Touch",
|
|
6309
|
+
"Salesforce for Outlook",
|
|
6310
|
+
"SalesforceA",
|
|
6311
|
+
"SalesforceA for Android",
|
|
6312
|
+
"SalesforceA for iOS",
|
|
6313
|
+
"SalesforceDX Namespace Registry",
|
|
6314
|
+
"SalesforceIQ"
|
|
6315
|
+
],
|
|
6326
6316
|
"requiresProject": false,
|
|
6327
6317
|
"isESM": true,
|
|
6328
6318
|
"relativePath": [
|
|
@@ -6331,42 +6321,43 @@
|
|
|
6331
6321
|
"hardis",
|
|
6332
6322
|
"org",
|
|
6333
6323
|
"diagnose",
|
|
6334
|
-
"
|
|
6324
|
+
"unused-connected-apps.js"
|
|
6335
6325
|
],
|
|
6336
6326
|
"aliasPermutations": [],
|
|
6337
6327
|
"permutations": [
|
|
6338
|
-
"hardis:org:diagnose:
|
|
6339
|
-
"org:hardis:diagnose:
|
|
6340
|
-
"org:diagnose:hardis:
|
|
6341
|
-
"org:diagnose:
|
|
6342
|
-
"hardis:diagnose:org:
|
|
6343
|
-
"diagnose:hardis:org:
|
|
6344
|
-
"diagnose:org:hardis:
|
|
6345
|
-
"diagnose:org:
|
|
6346
|
-
"hardis:diagnose:
|
|
6347
|
-
"diagnose:hardis:
|
|
6348
|
-
"diagnose:
|
|
6349
|
-
"diagnose:
|
|
6350
|
-
"hardis:org:
|
|
6351
|
-
"org:hardis:
|
|
6352
|
-
"org:
|
|
6353
|
-
"org:
|
|
6354
|
-
"hardis:
|
|
6355
|
-
"
|
|
6356
|
-
"
|
|
6357
|
-
"
|
|
6358
|
-
"hardis:
|
|
6359
|
-
"
|
|
6360
|
-
"
|
|
6361
|
-
"
|
|
6328
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6329
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6330
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6331
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6332
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6333
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6334
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6335
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6336
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6337
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6338
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6339
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6340
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6341
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6342
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6343
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6344
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6345
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6346
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6347
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6348
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6349
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6350
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6351
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6362
6352
|
]
|
|
6363
6353
|
},
|
|
6364
|
-
"hardis:org:diagnose:
|
|
6354
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6365
6355
|
"aliases": [],
|
|
6366
6356
|
"args": {},
|
|
6367
|
-
"description": "
|
|
6357
|
+
"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",
|
|
6368
6358
|
"examples": [
|
|
6369
|
-
"$ sf hardis:org:diagnose:
|
|
6359
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6360
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6370
6361
|
],
|
|
6371
6362
|
"flags": {
|
|
6372
6363
|
"json": {
|
|
@@ -6430,58 +6421,79 @@
|
|
|
6430
6421
|
},
|
|
6431
6422
|
"hasDynamicHelp": true,
|
|
6432
6423
|
"hiddenAliases": [],
|
|
6433
|
-
"id": "hardis:org:diagnose:
|
|
6424
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
6434
6425
|
"pluginAlias": "sfdx-hardis",
|
|
6435
6426
|
"pluginName": "sfdx-hardis",
|
|
6436
6427
|
"pluginType": "core",
|
|
6437
6428
|
"strict": true,
|
|
6438
6429
|
"enableJsonFlag": true,
|
|
6439
|
-
"title": "
|
|
6430
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
6440
6431
|
"requiresProject": false,
|
|
6441
|
-
"
|
|
6442
|
-
|
|
6443
|
-
|
|
6444
|
-
|
|
6445
|
-
|
|
6446
|
-
|
|
6447
|
-
|
|
6448
|
-
|
|
6432
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6433
|
+
"Sales_User"
|
|
6434
|
+
],
|
|
6435
|
+
"permSetsPermSetLicenses": [
|
|
6436
|
+
{
|
|
6437
|
+
"permSet": "Sales_User",
|
|
6438
|
+
"permSetLicense": "SalesUserPsl"
|
|
6439
|
+
}
|
|
6440
|
+
],
|
|
6441
|
+
"profilesPermissionSetLicenses": [
|
|
6442
|
+
{
|
|
6443
|
+
"profile": "Salesforce API Only",
|
|
6444
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6445
|
+
}
|
|
6446
|
+
],
|
|
6447
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6448
|
+
"IdentityConnect"
|
|
6449
|
+
],
|
|
6450
|
+
"isESM": true,
|
|
6451
|
+
"relativePath": [
|
|
6452
|
+
"lib",
|
|
6453
|
+
"commands",
|
|
6454
|
+
"hardis",
|
|
6455
|
+
"org",
|
|
6456
|
+
"diagnose",
|
|
6457
|
+
"unusedlicenses.js"
|
|
6449
6458
|
],
|
|
6450
6459
|
"aliasPermutations": [],
|
|
6451
6460
|
"permutations": [
|
|
6452
|
-
"hardis:org:diagnose:
|
|
6453
|
-
"org:hardis:diagnose:
|
|
6454
|
-
"org:diagnose:hardis:
|
|
6455
|
-
"org:diagnose:
|
|
6456
|
-
"hardis:diagnose:org:
|
|
6457
|
-
"diagnose:hardis:org:
|
|
6458
|
-
"diagnose:org:hardis:
|
|
6459
|
-
"diagnose:org:
|
|
6460
|
-
"hardis:diagnose:
|
|
6461
|
-
"diagnose:hardis:
|
|
6462
|
-
"diagnose:
|
|
6463
|
-
"diagnose:
|
|
6464
|
-
"hardis:org:
|
|
6465
|
-
"org:hardis:
|
|
6466
|
-
"org:
|
|
6467
|
-
"org:
|
|
6468
|
-
"hardis:
|
|
6469
|
-
"
|
|
6470
|
-
"
|
|
6471
|
-
"
|
|
6472
|
-
"hardis:
|
|
6473
|
-
"
|
|
6474
|
-
"
|
|
6475
|
-
"
|
|
6461
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
6462
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
6463
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
6464
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
6465
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
6466
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
6467
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
6468
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
6469
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
6470
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
6471
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
6472
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
6473
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
6474
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
6475
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
6476
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
6477
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
6478
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
6479
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
6480
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
6481
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
6482
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
6483
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
6484
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
6476
6485
|
]
|
|
6477
6486
|
},
|
|
6478
|
-
"hardis:org:diagnose:
|
|
6487
|
+
"hardis:org:diagnose:unusedusers": {
|
|
6479
6488
|
"aliases": [],
|
|
6480
6489
|
"args": {},
|
|
6481
|
-
"description": "
|
|
6490
|
+
"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>",
|
|
6482
6491
|
"examples": [
|
|
6483
|
-
"$ sf hardis:org:diagnose:
|
|
6484
|
-
"$ sf hardis:org:diagnose:
|
|
6492
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
6493
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6494
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6495
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6496
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6485
6497
|
],
|
|
6486
6498
|
"flags": {
|
|
6487
6499
|
"json": {
|
|
@@ -6515,6 +6527,33 @@
|
|
|
6515
6527
|
"multiple": false,
|
|
6516
6528
|
"type": "option"
|
|
6517
6529
|
},
|
|
6530
|
+
"licensetypes": {
|
|
6531
|
+
"char": "l",
|
|
6532
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6533
|
+
"name": "licensetypes",
|
|
6534
|
+
"hasDynamicHelp": false,
|
|
6535
|
+
"multiple": false,
|
|
6536
|
+
"options": [
|
|
6537
|
+
"all",
|
|
6538
|
+
"all-crm",
|
|
6539
|
+
"all-paying"
|
|
6540
|
+
],
|
|
6541
|
+
"type": "option"
|
|
6542
|
+
},
|
|
6543
|
+
"licenseidentifiers": {
|
|
6544
|
+
"char": "i",
|
|
6545
|
+
"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",
|
|
6546
|
+
"name": "licenseidentifiers",
|
|
6547
|
+
"hasDynamicHelp": false,
|
|
6548
|
+
"multiple": false,
|
|
6549
|
+
"type": "option"
|
|
6550
|
+
},
|
|
6551
|
+
"returnactiveusers": {
|
|
6552
|
+
"description": "Inverts the command by returning the active users",
|
|
6553
|
+
"name": "returnactiveusers",
|
|
6554
|
+
"allowNo": false,
|
|
6555
|
+
"type": "boolean"
|
|
6556
|
+
},
|
|
6518
6557
|
"debug": {
|
|
6519
6558
|
"char": "d",
|
|
6520
6559
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6553,13 +6592,13 @@
|
|
|
6553
6592
|
},
|
|
6554
6593
|
"hasDynamicHelp": true,
|
|
6555
6594
|
"hiddenAliases": [],
|
|
6556
|
-
"id": "hardis:org:diagnose:
|
|
6595
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
6557
6596
|
"pluginAlias": "sfdx-hardis",
|
|
6558
6597
|
"pluginName": "sfdx-hardis",
|
|
6559
6598
|
"pluginType": "core",
|
|
6560
6599
|
"strict": true,
|
|
6561
6600
|
"enableJsonFlag": true,
|
|
6562
|
-
"title": "Detect unused
|
|
6601
|
+
"title": "Detect unused Users in Salesforce",
|
|
6563
6602
|
"requiresProject": false,
|
|
6564
6603
|
"isESM": true,
|
|
6565
6604
|
"relativePath": [
|
|
@@ -6568,42 +6607,42 @@
|
|
|
6568
6607
|
"hardis",
|
|
6569
6608
|
"org",
|
|
6570
6609
|
"diagnose",
|
|
6571
|
-
"
|
|
6610
|
+
"unusedusers.js"
|
|
6572
6611
|
],
|
|
6573
6612
|
"aliasPermutations": [],
|
|
6574
6613
|
"permutations": [
|
|
6575
|
-
"hardis:org:diagnose:
|
|
6576
|
-
"org:hardis:diagnose:
|
|
6577
|
-
"org:diagnose:hardis:
|
|
6578
|
-
"org:diagnose:
|
|
6579
|
-
"hardis:diagnose:org:
|
|
6580
|
-
"diagnose:hardis:org:
|
|
6581
|
-
"diagnose:org:hardis:
|
|
6582
|
-
"diagnose:org:
|
|
6583
|
-
"hardis:diagnose:
|
|
6584
|
-
"diagnose:hardis:
|
|
6585
|
-
"diagnose:
|
|
6586
|
-
"diagnose:
|
|
6587
|
-
"hardis:org:
|
|
6588
|
-
"org:hardis:
|
|
6589
|
-
"org:
|
|
6590
|
-
"org:
|
|
6591
|
-
"hardis:
|
|
6592
|
-
"
|
|
6593
|
-
"
|
|
6594
|
-
"
|
|
6595
|
-
"hardis:
|
|
6596
|
-
"
|
|
6597
|
-
"
|
|
6598
|
-
"
|
|
6614
|
+
"hardis:org:diagnose:unusedusers",
|
|
6615
|
+
"org:hardis:diagnose:unusedusers",
|
|
6616
|
+
"org:diagnose:hardis:unusedusers",
|
|
6617
|
+
"org:diagnose:unusedusers:hardis",
|
|
6618
|
+
"hardis:diagnose:org:unusedusers",
|
|
6619
|
+
"diagnose:hardis:org:unusedusers",
|
|
6620
|
+
"diagnose:org:hardis:unusedusers",
|
|
6621
|
+
"diagnose:org:unusedusers:hardis",
|
|
6622
|
+
"hardis:diagnose:unusedusers:org",
|
|
6623
|
+
"diagnose:hardis:unusedusers:org",
|
|
6624
|
+
"diagnose:unusedusers:hardis:org",
|
|
6625
|
+
"diagnose:unusedusers:org:hardis",
|
|
6626
|
+
"hardis:org:unusedusers:diagnose",
|
|
6627
|
+
"org:hardis:unusedusers:diagnose",
|
|
6628
|
+
"org:unusedusers:hardis:diagnose",
|
|
6629
|
+
"org:unusedusers:diagnose:hardis",
|
|
6630
|
+
"hardis:unusedusers:org:diagnose",
|
|
6631
|
+
"unusedusers:hardis:org:diagnose",
|
|
6632
|
+
"unusedusers:org:hardis:diagnose",
|
|
6633
|
+
"unusedusers:org:diagnose:hardis",
|
|
6634
|
+
"hardis:unusedusers:diagnose:org",
|
|
6635
|
+
"unusedusers:hardis:diagnose:org",
|
|
6636
|
+
"unusedusers:diagnose:hardis:org",
|
|
6637
|
+
"unusedusers:diagnose:org:hardis"
|
|
6599
6638
|
]
|
|
6600
6639
|
},
|
|
6601
|
-
"hardis:org:
|
|
6640
|
+
"hardis:org:files:export": {
|
|
6602
6641
|
"aliases": [],
|
|
6603
6642
|
"args": {},
|
|
6604
|
-
"description": "\n## Command Behavior\n\n**
|
|
6643
|
+
"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",
|
|
6605
6644
|
"examples": [
|
|
6606
|
-
"$ sf hardis:org:
|
|
6645
|
+
"$ sf hardis:org:files:export"
|
|
6607
6646
|
],
|
|
6608
6647
|
"flags": {
|
|
6609
6648
|
"json": {
|
|
@@ -6621,10 +6660,37 @@
|
|
|
6621
6660
|
"multiple": false,
|
|
6622
6661
|
"type": "option"
|
|
6623
6662
|
},
|
|
6624
|
-
"
|
|
6625
|
-
"char": "
|
|
6626
|
-
"description": "
|
|
6627
|
-
"name": "
|
|
6663
|
+
"path": {
|
|
6664
|
+
"char": "p",
|
|
6665
|
+
"description": "Path to the file export project",
|
|
6666
|
+
"name": "path",
|
|
6667
|
+
"hasDynamicHelp": false,
|
|
6668
|
+
"multiple": false,
|
|
6669
|
+
"type": "option"
|
|
6670
|
+
},
|
|
6671
|
+
"chunksize": {
|
|
6672
|
+
"char": "c",
|
|
6673
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
6674
|
+
"name": "chunksize",
|
|
6675
|
+
"default": 1000,
|
|
6676
|
+
"hasDynamicHelp": false,
|
|
6677
|
+
"multiple": false,
|
|
6678
|
+
"type": "option"
|
|
6679
|
+
},
|
|
6680
|
+
"polltimeout": {
|
|
6681
|
+
"char": "t",
|
|
6682
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
6683
|
+
"name": "polltimeout",
|
|
6684
|
+
"default": 300000,
|
|
6685
|
+
"hasDynamicHelp": false,
|
|
6686
|
+
"multiple": false,
|
|
6687
|
+
"type": "option"
|
|
6688
|
+
},
|
|
6689
|
+
"startchunknumber": {
|
|
6690
|
+
"char": "s",
|
|
6691
|
+
"description": "Chunk number to start from",
|
|
6692
|
+
"name": "startchunknumber",
|
|
6693
|
+
"default": 0,
|
|
6628
6694
|
"hasDynamicHelp": false,
|
|
6629
6695
|
"multiple": false,
|
|
6630
6696
|
"type": "option"
|
|
@@ -6667,30 +6733,13 @@
|
|
|
6667
6733
|
},
|
|
6668
6734
|
"hasDynamicHelp": true,
|
|
6669
6735
|
"hiddenAliases": [],
|
|
6670
|
-
"id": "hardis:org:
|
|
6736
|
+
"id": "hardis:org:files:export",
|
|
6671
6737
|
"pluginAlias": "sfdx-hardis",
|
|
6672
6738
|
"pluginName": "sfdx-hardis",
|
|
6673
6739
|
"pluginType": "core",
|
|
6674
6740
|
"strict": true,
|
|
6675
6741
|
"enableJsonFlag": true,
|
|
6676
|
-
"title": "
|
|
6677
|
-
"allowedInactiveConnectedApps": [
|
|
6678
|
-
"Ant Migration Tool",
|
|
6679
|
-
"Chatter Desktop",
|
|
6680
|
-
"Chatter Mobile for BlackBerry",
|
|
6681
|
-
"Force.com IDE",
|
|
6682
|
-
"OIQ_Integration",
|
|
6683
|
-
"Salesforce CLI",
|
|
6684
|
-
"Salesforce Files",
|
|
6685
|
-
"Salesforce Mobile Dashboards",
|
|
6686
|
-
"Salesforce Touch",
|
|
6687
|
-
"Salesforce for Outlook",
|
|
6688
|
-
"SalesforceA",
|
|
6689
|
-
"SalesforceA for Android",
|
|
6690
|
-
"SalesforceA for iOS",
|
|
6691
|
-
"SalesforceDX Namespace Registry",
|
|
6692
|
-
"SalesforceIQ"
|
|
6693
|
-
],
|
|
6742
|
+
"title": "Export files",
|
|
6694
6743
|
"requiresProject": false,
|
|
6695
6744
|
"isESM": true,
|
|
6696
6745
|
"relativePath": [
|
|
@@ -6698,44 +6747,43 @@
|
|
|
6698
6747
|
"commands",
|
|
6699
6748
|
"hardis",
|
|
6700
6749
|
"org",
|
|
6701
|
-
"
|
|
6702
|
-
"
|
|
6750
|
+
"files",
|
|
6751
|
+
"export.js"
|
|
6703
6752
|
],
|
|
6704
6753
|
"aliasPermutations": [],
|
|
6705
6754
|
"permutations": [
|
|
6706
|
-
"hardis:org:
|
|
6707
|
-
"org:hardis:
|
|
6708
|
-
"org:
|
|
6709
|
-
"org:
|
|
6710
|
-
"hardis:
|
|
6711
|
-
"
|
|
6712
|
-
"
|
|
6713
|
-
"
|
|
6714
|
-
"hardis:
|
|
6715
|
-
"
|
|
6716
|
-
"
|
|
6717
|
-
"
|
|
6718
|
-
"hardis:org:
|
|
6719
|
-
"org:hardis:
|
|
6720
|
-
"org:
|
|
6721
|
-
"org:
|
|
6722
|
-
"hardis:
|
|
6723
|
-
"
|
|
6724
|
-
"
|
|
6725
|
-
"
|
|
6726
|
-
"hardis:
|
|
6727
|
-
"
|
|
6728
|
-
"
|
|
6729
|
-
"
|
|
6755
|
+
"hardis:org:files:export",
|
|
6756
|
+
"org:hardis:files:export",
|
|
6757
|
+
"org:files:hardis:export",
|
|
6758
|
+
"org:files:export:hardis",
|
|
6759
|
+
"hardis:files:org:export",
|
|
6760
|
+
"files:hardis:org:export",
|
|
6761
|
+
"files:org:hardis:export",
|
|
6762
|
+
"files:org:export:hardis",
|
|
6763
|
+
"hardis:files:export:org",
|
|
6764
|
+
"files:hardis:export:org",
|
|
6765
|
+
"files:export:hardis:org",
|
|
6766
|
+
"files:export:org:hardis",
|
|
6767
|
+
"hardis:org:export:files",
|
|
6768
|
+
"org:hardis:export:files",
|
|
6769
|
+
"org:export:hardis:files",
|
|
6770
|
+
"org:export:files:hardis",
|
|
6771
|
+
"hardis:export:org:files",
|
|
6772
|
+
"export:hardis:org:files",
|
|
6773
|
+
"export:org:hardis:files",
|
|
6774
|
+
"export:org:files:hardis",
|
|
6775
|
+
"hardis:export:files:org",
|
|
6776
|
+
"export:hardis:files:org",
|
|
6777
|
+
"export:files:hardis:org",
|
|
6778
|
+
"export:files:org:hardis"
|
|
6730
6779
|
]
|
|
6731
6780
|
},
|
|
6732
|
-
"hardis:org:
|
|
6781
|
+
"hardis:org:files:import": {
|
|
6733
6782
|
"aliases": [],
|
|
6734
6783
|
"args": {},
|
|
6735
|
-
"description": "\
|
|
6784
|
+
"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",
|
|
6736
6785
|
"examples": [
|
|
6737
|
-
"$ sf hardis:org:
|
|
6738
|
-
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6786
|
+
"$ sf hardis:org:files:import"
|
|
6739
6787
|
],
|
|
6740
6788
|
"flags": {
|
|
6741
6789
|
"json": {
|
|
@@ -6753,14 +6801,21 @@
|
|
|
6753
6801
|
"multiple": false,
|
|
6754
6802
|
"type": "option"
|
|
6755
6803
|
},
|
|
6756
|
-
"
|
|
6757
|
-
"char": "
|
|
6758
|
-
"description": "
|
|
6759
|
-
"name": "
|
|
6804
|
+
"path": {
|
|
6805
|
+
"char": "p",
|
|
6806
|
+
"description": "Path to the file export project",
|
|
6807
|
+
"name": "path",
|
|
6760
6808
|
"hasDynamicHelp": false,
|
|
6761
6809
|
"multiple": false,
|
|
6762
6810
|
"type": "option"
|
|
6763
6811
|
},
|
|
6812
|
+
"overwrite": {
|
|
6813
|
+
"char": "f",
|
|
6814
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
6815
|
+
"name": "overwrite",
|
|
6816
|
+
"allowNo": false,
|
|
6817
|
+
"type": "boolean"
|
|
6818
|
+
},
|
|
6764
6819
|
"debug": {
|
|
6765
6820
|
"char": "d",
|
|
6766
6821
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6799,79 +6854,58 @@
|
|
|
6799
6854
|
},
|
|
6800
6855
|
"hasDynamicHelp": true,
|
|
6801
6856
|
"hiddenAliases": [],
|
|
6802
|
-
"id": "hardis:org:
|
|
6857
|
+
"id": "hardis:org:files:import",
|
|
6803
6858
|
"pluginAlias": "sfdx-hardis",
|
|
6804
6859
|
"pluginName": "sfdx-hardis",
|
|
6805
6860
|
"pluginType": "core",
|
|
6806
6861
|
"strict": true,
|
|
6807
6862
|
"enableJsonFlag": true,
|
|
6808
|
-
"title": "
|
|
6863
|
+
"title": "Import files",
|
|
6809
6864
|
"requiresProject": false,
|
|
6810
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
6811
|
-
"Sales_User"
|
|
6812
|
-
],
|
|
6813
|
-
"permSetsPermSetLicenses": [
|
|
6814
|
-
{
|
|
6815
|
-
"permSet": "Sales_User",
|
|
6816
|
-
"permSetLicense": "SalesUserPsl"
|
|
6817
|
-
}
|
|
6818
|
-
],
|
|
6819
|
-
"profilesPermissionSetLicenses": [
|
|
6820
|
-
{
|
|
6821
|
-
"profile": "Salesforce API Only",
|
|
6822
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6823
|
-
}
|
|
6824
|
-
],
|
|
6825
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6826
|
-
"IdentityConnect"
|
|
6827
|
-
],
|
|
6828
6865
|
"isESM": true,
|
|
6829
6866
|
"relativePath": [
|
|
6830
6867
|
"lib",
|
|
6831
6868
|
"commands",
|
|
6832
6869
|
"hardis",
|
|
6833
6870
|
"org",
|
|
6834
|
-
"
|
|
6835
|
-
"
|
|
6871
|
+
"files",
|
|
6872
|
+
"import.js"
|
|
6836
6873
|
],
|
|
6837
6874
|
"aliasPermutations": [],
|
|
6838
6875
|
"permutations": [
|
|
6839
|
-
"hardis:org:
|
|
6840
|
-
"org:hardis:
|
|
6841
|
-
"org:
|
|
6842
|
-
"org:
|
|
6843
|
-
"hardis:
|
|
6844
|
-
"
|
|
6845
|
-
"
|
|
6846
|
-
"
|
|
6847
|
-
"hardis:
|
|
6848
|
-
"
|
|
6849
|
-
"
|
|
6850
|
-
"
|
|
6851
|
-
"hardis:org:
|
|
6852
|
-
"org:hardis:
|
|
6853
|
-
"org:
|
|
6854
|
-
"org:
|
|
6855
|
-
"hardis:
|
|
6856
|
-
"
|
|
6857
|
-
"
|
|
6858
|
-
"
|
|
6859
|
-
"hardis:
|
|
6860
|
-
"
|
|
6861
|
-
"
|
|
6862
|
-
"
|
|
6876
|
+
"hardis:org:files:import",
|
|
6877
|
+
"org:hardis:files:import",
|
|
6878
|
+
"org:files:hardis:import",
|
|
6879
|
+
"org:files:import:hardis",
|
|
6880
|
+
"hardis:files:org:import",
|
|
6881
|
+
"files:hardis:org:import",
|
|
6882
|
+
"files:org:hardis:import",
|
|
6883
|
+
"files:org:import:hardis",
|
|
6884
|
+
"hardis:files:import:org",
|
|
6885
|
+
"files:hardis:import:org",
|
|
6886
|
+
"files:import:hardis:org",
|
|
6887
|
+
"files:import:org:hardis",
|
|
6888
|
+
"hardis:org:import:files",
|
|
6889
|
+
"org:hardis:import:files",
|
|
6890
|
+
"org:import:hardis:files",
|
|
6891
|
+
"org:import:files:hardis",
|
|
6892
|
+
"hardis:import:org:files",
|
|
6893
|
+
"import:hardis:org:files",
|
|
6894
|
+
"import:org:hardis:files",
|
|
6895
|
+
"import:org:files:hardis",
|
|
6896
|
+
"hardis:import:files:org",
|
|
6897
|
+
"import:hardis:files:org",
|
|
6898
|
+
"import:files:hardis:org",
|
|
6899
|
+
"import:files:org:hardis"
|
|
6863
6900
|
]
|
|
6864
6901
|
},
|
|
6865
|
-
"hardis:org:
|
|
6902
|
+
"hardis:org:fix:listviewmine": {
|
|
6866
6903
|
"aliases": [],
|
|
6867
6904
|
"args": {},
|
|
6868
|
-
"description": "
|
|
6905
|
+
"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",
|
|
6869
6906
|
"examples": [
|
|
6870
|
-
"$ sf hardis:org:
|
|
6871
|
-
"$ sf hardis:org:
|
|
6872
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6873
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6874
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6907
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
6908
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
6875
6909
|
],
|
|
6876
6910
|
"flags": {
|
|
6877
6911
|
"json": {
|
|
@@ -6889,49 +6923,14 @@
|
|
|
6889
6923
|
"multiple": false,
|
|
6890
6924
|
"type": "option"
|
|
6891
6925
|
},
|
|
6892
|
-
"
|
|
6893
|
-
"char": "f",
|
|
6894
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6895
|
-
"name": "outputfile",
|
|
6896
|
-
"hasDynamicHelp": false,
|
|
6897
|
-
"multiple": false,
|
|
6898
|
-
"type": "option"
|
|
6899
|
-
},
|
|
6900
|
-
"days": {
|
|
6901
|
-
"char": "t",
|
|
6902
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6903
|
-
"name": "days",
|
|
6904
|
-
"hasDynamicHelp": false,
|
|
6905
|
-
"multiple": false,
|
|
6906
|
-
"type": "option"
|
|
6907
|
-
},
|
|
6908
|
-
"licensetypes": {
|
|
6926
|
+
"listviews": {
|
|
6909
6927
|
"char": "l",
|
|
6910
|
-
"description": "
|
|
6911
|
-
"name": "
|
|
6912
|
-
"hasDynamicHelp": false,
|
|
6913
|
-
"multiple": false,
|
|
6914
|
-
"options": [
|
|
6915
|
-
"all",
|
|
6916
|
-
"all-crm",
|
|
6917
|
-
"all-paying"
|
|
6918
|
-
],
|
|
6919
|
-
"type": "option"
|
|
6920
|
-
},
|
|
6921
|
-
"licenseidentifiers": {
|
|
6922
|
-
"char": "i",
|
|
6923
|
-
"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",
|
|
6924
|
-
"name": "licenseidentifiers",
|
|
6928
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
6929
|
+
"name": "listviews",
|
|
6925
6930
|
"hasDynamicHelp": false,
|
|
6926
6931
|
"multiple": false,
|
|
6927
6932
|
"type": "option"
|
|
6928
6933
|
},
|
|
6929
|
-
"returnactiveusers": {
|
|
6930
|
-
"description": "Inverts the command by returning the active users",
|
|
6931
|
-
"name": "returnactiveusers",
|
|
6932
|
-
"allowNo": false,
|
|
6933
|
-
"type": "boolean"
|
|
6934
|
-
},
|
|
6935
6934
|
"debug": {
|
|
6936
6935
|
"char": "d",
|
|
6937
6936
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6970,49 +6969,49 @@
|
|
|
6970
6969
|
},
|
|
6971
6970
|
"hasDynamicHelp": true,
|
|
6972
6971
|
"hiddenAliases": [],
|
|
6973
|
-
"id": "hardis:org:
|
|
6972
|
+
"id": "hardis:org:fix:listviewmine",
|
|
6974
6973
|
"pluginAlias": "sfdx-hardis",
|
|
6975
6974
|
"pluginName": "sfdx-hardis",
|
|
6976
6975
|
"pluginType": "core",
|
|
6977
6976
|
"strict": true,
|
|
6978
6977
|
"enableJsonFlag": true,
|
|
6979
|
-
"title": "
|
|
6980
|
-
"requiresProject":
|
|
6978
|
+
"title": "Fix listviews with ",
|
|
6979
|
+
"requiresProject": true,
|
|
6981
6980
|
"isESM": true,
|
|
6982
6981
|
"relativePath": [
|
|
6983
6982
|
"lib",
|
|
6984
6983
|
"commands",
|
|
6985
6984
|
"hardis",
|
|
6986
6985
|
"org",
|
|
6987
|
-
"
|
|
6988
|
-
"
|
|
6986
|
+
"fix",
|
|
6987
|
+
"listviewmine.js"
|
|
6989
6988
|
],
|
|
6990
6989
|
"aliasPermutations": [],
|
|
6991
6990
|
"permutations": [
|
|
6992
|
-
"hardis:org:
|
|
6993
|
-
"org:hardis:
|
|
6994
|
-
"org:
|
|
6995
|
-
"org:
|
|
6996
|
-
"hardis:
|
|
6997
|
-
"
|
|
6998
|
-
"
|
|
6999
|
-
"
|
|
7000
|
-
"hardis:
|
|
7001
|
-
"
|
|
7002
|
-
"
|
|
7003
|
-
"
|
|
7004
|
-
"hardis:org:
|
|
7005
|
-
"org:hardis:
|
|
7006
|
-
"org:
|
|
7007
|
-
"org:
|
|
7008
|
-
"hardis:
|
|
7009
|
-
"
|
|
7010
|
-
"
|
|
7011
|
-
"
|
|
7012
|
-
"hardis:
|
|
7013
|
-
"
|
|
7014
|
-
"
|
|
7015
|
-
"
|
|
6991
|
+
"hardis:org:fix:listviewmine",
|
|
6992
|
+
"org:hardis:fix:listviewmine",
|
|
6993
|
+
"org:fix:hardis:listviewmine",
|
|
6994
|
+
"org:fix:listviewmine:hardis",
|
|
6995
|
+
"hardis:fix:org:listviewmine",
|
|
6996
|
+
"fix:hardis:org:listviewmine",
|
|
6997
|
+
"fix:org:hardis:listviewmine",
|
|
6998
|
+
"fix:org:listviewmine:hardis",
|
|
6999
|
+
"hardis:fix:listviewmine:org",
|
|
7000
|
+
"fix:hardis:listviewmine:org",
|
|
7001
|
+
"fix:listviewmine:hardis:org",
|
|
7002
|
+
"fix:listviewmine:org:hardis",
|
|
7003
|
+
"hardis:org:listviewmine:fix",
|
|
7004
|
+
"org:hardis:listviewmine:fix",
|
|
7005
|
+
"org:listviewmine:hardis:fix",
|
|
7006
|
+
"org:listviewmine:fix:hardis",
|
|
7007
|
+
"hardis:listviewmine:org:fix",
|
|
7008
|
+
"listviewmine:hardis:org:fix",
|
|
7009
|
+
"listviewmine:org:hardis:fix",
|
|
7010
|
+
"listviewmine:org:fix:hardis",
|
|
7011
|
+
"hardis:listviewmine:fix:org",
|
|
7012
|
+
"listviewmine:hardis:fix:org",
|
|
7013
|
+
"listviewmine:fix:hardis:org",
|
|
7014
|
+
"listviewmine:fix:org:hardis"
|
|
7016
7015
|
]
|
|
7017
7016
|
},
|
|
7018
7017
|
"hardis:org:generate:packagexmlfull": {
|
|
@@ -9487,262 +9486,30 @@
|
|
|
9487
9486
|
],
|
|
9488
9487
|
"aliasPermutations": [],
|
|
9489
9488
|
"permutations": [
|
|
9490
|
-
"hardis:project:audit:remotesites",
|
|
9491
|
-
"project:hardis:audit:remotesites",
|
|
9492
|
-
"project:audit:hardis:remotesites",
|
|
9493
|
-
"project:audit:remotesites:hardis",
|
|
9494
|
-
"hardis:audit:project:remotesites",
|
|
9495
|
-
"audit:hardis:project:remotesites",
|
|
9496
|
-
"audit:project:hardis:remotesites",
|
|
9497
|
-
"audit:project:remotesites:hardis",
|
|
9498
|
-
"hardis:audit:remotesites:project",
|
|
9499
|
-
"audit:hardis:remotesites:project",
|
|
9500
|
-
"audit:remotesites:hardis:project",
|
|
9501
|
-
"audit:remotesites:project:hardis",
|
|
9502
|
-
"hardis:project:remotesites:audit",
|
|
9503
|
-
"project:hardis:remotesites:audit",
|
|
9504
|
-
"project:remotesites:hardis:audit",
|
|
9505
|
-
"project:remotesites:audit:hardis",
|
|
9506
|
-
"hardis:remotesites:project:audit",
|
|
9507
|
-
"remotesites:hardis:project:audit",
|
|
9508
|
-
"remotesites:project:hardis:audit",
|
|
9509
|
-
"remotesites:project:audit:hardis",
|
|
9510
|
-
"hardis:remotesites:audit:project",
|
|
9511
|
-
"remotesites:hardis:audit:project",
|
|
9512
|
-
"remotesites:audit:hardis:project",
|
|
9513
|
-
"remotesites:audit:project:hardis"
|
|
9514
|
-
]
|
|
9515
|
-
},
|
|
9516
|
-
"hardis:project:configure:auth": {
|
|
9517
|
-
"aliases": [],
|
|
9518
|
-
"args": {},
|
|
9519
|
-
"description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
|
|
9520
|
-
"examples": [
|
|
9521
|
-
"$ sf hardis:project:configure:auth"
|
|
9522
|
-
],
|
|
9523
|
-
"flags": {
|
|
9524
|
-
"json": {
|
|
9525
|
-
"description": "Format output as json.",
|
|
9526
|
-
"helpGroup": "GLOBAL",
|
|
9527
|
-
"name": "json",
|
|
9528
|
-
"allowNo": false,
|
|
9529
|
-
"type": "boolean"
|
|
9530
|
-
},
|
|
9531
|
-
"flags-dir": {
|
|
9532
|
-
"helpGroup": "GLOBAL",
|
|
9533
|
-
"name": "flags-dir",
|
|
9534
|
-
"summary": "Import flag values from a directory.",
|
|
9535
|
-
"hasDynamicHelp": false,
|
|
9536
|
-
"multiple": false,
|
|
9537
|
-
"type": "option"
|
|
9538
|
-
},
|
|
9539
|
-
"devhub": {
|
|
9540
|
-
"char": "b",
|
|
9541
|
-
"description": "Configure project DevHub",
|
|
9542
|
-
"name": "devhub",
|
|
9543
|
-
"allowNo": false,
|
|
9544
|
-
"type": "boolean"
|
|
9545
|
-
},
|
|
9546
|
-
"debug": {
|
|
9547
|
-
"char": "d",
|
|
9548
|
-
"description": "Activate debug mode (more logs)",
|
|
9549
|
-
"name": "debug",
|
|
9550
|
-
"allowNo": false,
|
|
9551
|
-
"type": "boolean"
|
|
9552
|
-
},
|
|
9553
|
-
"websocket": {
|
|
9554
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9555
|
-
"name": "websocket",
|
|
9556
|
-
"hasDynamicHelp": false,
|
|
9557
|
-
"multiple": false,
|
|
9558
|
-
"type": "option"
|
|
9559
|
-
},
|
|
9560
|
-
"skipauth": {
|
|
9561
|
-
"description": "Skip authentication check when a default username is required",
|
|
9562
|
-
"name": "skipauth",
|
|
9563
|
-
"allowNo": false,
|
|
9564
|
-
"type": "boolean"
|
|
9565
|
-
},
|
|
9566
|
-
"target-org": {
|
|
9567
|
-
"aliases": [
|
|
9568
|
-
"targetusername",
|
|
9569
|
-
"u"
|
|
9570
|
-
],
|
|
9571
|
-
"char": "o",
|
|
9572
|
-
"deprecateAliases": true,
|
|
9573
|
-
"name": "target-org",
|
|
9574
|
-
"noCacheDefault": true,
|
|
9575
|
-
"summary": "Username or alias of the target org.",
|
|
9576
|
-
"hasDynamicHelp": true,
|
|
9577
|
-
"multiple": false,
|
|
9578
|
-
"type": "option"
|
|
9579
|
-
},
|
|
9580
|
-
"target-dev-hub": {
|
|
9581
|
-
"aliases": [
|
|
9582
|
-
"targetdevhubusername"
|
|
9583
|
-
],
|
|
9584
|
-
"char": "v",
|
|
9585
|
-
"deprecateAliases": true,
|
|
9586
|
-
"name": "target-dev-hub",
|
|
9587
|
-
"noCacheDefault": true,
|
|
9588
|
-
"required": false,
|
|
9589
|
-
"summary": "Username or alias of the Dev Hub org.",
|
|
9590
|
-
"hasDynamicHelp": true,
|
|
9591
|
-
"multiple": false,
|
|
9592
|
-
"type": "option"
|
|
9593
|
-
}
|
|
9594
|
-
},
|
|
9595
|
-
"hasDynamicHelp": true,
|
|
9596
|
-
"hiddenAliases": [],
|
|
9597
|
-
"id": "hardis:project:configure:auth",
|
|
9598
|
-
"pluginAlias": "sfdx-hardis",
|
|
9599
|
-
"pluginName": "sfdx-hardis",
|
|
9600
|
-
"pluginType": "core",
|
|
9601
|
-
"strict": true,
|
|
9602
|
-
"enableJsonFlag": true,
|
|
9603
|
-
"title": "Configure authentication",
|
|
9604
|
-
"requiresProject": false,
|
|
9605
|
-
"requiresDependencies": [
|
|
9606
|
-
"openssl"
|
|
9607
|
-
],
|
|
9608
|
-
"isESM": true,
|
|
9609
|
-
"relativePath": [
|
|
9610
|
-
"lib",
|
|
9611
|
-
"commands",
|
|
9612
|
-
"hardis",
|
|
9613
|
-
"project",
|
|
9614
|
-
"configure",
|
|
9615
|
-
"auth.js"
|
|
9616
|
-
],
|
|
9617
|
-
"aliasPermutations": [],
|
|
9618
|
-
"permutations": [
|
|
9619
|
-
"hardis:project:configure:auth",
|
|
9620
|
-
"project:hardis:configure:auth",
|
|
9621
|
-
"project:configure:hardis:auth",
|
|
9622
|
-
"project:configure:auth:hardis",
|
|
9623
|
-
"hardis:configure:project:auth",
|
|
9624
|
-
"configure:hardis:project:auth",
|
|
9625
|
-
"configure:project:hardis:auth",
|
|
9626
|
-
"configure:project:auth:hardis",
|
|
9627
|
-
"hardis:configure:auth:project",
|
|
9628
|
-
"configure:hardis:auth:project",
|
|
9629
|
-
"configure:auth:hardis:project",
|
|
9630
|
-
"configure:auth:project:hardis",
|
|
9631
|
-
"hardis:project:auth:configure",
|
|
9632
|
-
"project:hardis:auth:configure",
|
|
9633
|
-
"project:auth:hardis:configure",
|
|
9634
|
-
"project:auth:configure:hardis",
|
|
9635
|
-
"hardis:auth:project:configure",
|
|
9636
|
-
"auth:hardis:project:configure",
|
|
9637
|
-
"auth:project:hardis:configure",
|
|
9638
|
-
"auth:project:configure:hardis",
|
|
9639
|
-
"hardis:auth:configure:project",
|
|
9640
|
-
"auth:hardis:configure:project",
|
|
9641
|
-
"auth:configure:hardis:project",
|
|
9642
|
-
"auth:configure:project:hardis"
|
|
9643
|
-
]
|
|
9644
|
-
},
|
|
9645
|
-
"hardis:project:convert:profilestopermsets": {
|
|
9646
|
-
"aliases": [],
|
|
9647
|
-
"args": {},
|
|
9648
|
-
"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",
|
|
9649
|
-
"examples": [
|
|
9650
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
9651
|
-
],
|
|
9652
|
-
"flags": {
|
|
9653
|
-
"json": {
|
|
9654
|
-
"description": "Format output as json.",
|
|
9655
|
-
"helpGroup": "GLOBAL",
|
|
9656
|
-
"name": "json",
|
|
9657
|
-
"allowNo": false,
|
|
9658
|
-
"type": "boolean"
|
|
9659
|
-
},
|
|
9660
|
-
"flags-dir": {
|
|
9661
|
-
"helpGroup": "GLOBAL",
|
|
9662
|
-
"name": "flags-dir",
|
|
9663
|
-
"summary": "Import flag values from a directory.",
|
|
9664
|
-
"hasDynamicHelp": false,
|
|
9665
|
-
"multiple": false,
|
|
9666
|
-
"type": "option"
|
|
9667
|
-
},
|
|
9668
|
-
"except": {
|
|
9669
|
-
"char": "e",
|
|
9670
|
-
"description": "List of filters",
|
|
9671
|
-
"name": "except",
|
|
9672
|
-
"default": [],
|
|
9673
|
-
"hasDynamicHelp": false,
|
|
9674
|
-
"multiple": true,
|
|
9675
|
-
"type": "option"
|
|
9676
|
-
},
|
|
9677
|
-
"debug": {
|
|
9678
|
-
"char": "d",
|
|
9679
|
-
"description": "Activate debug mode (more logs)",
|
|
9680
|
-
"name": "debug",
|
|
9681
|
-
"allowNo": false,
|
|
9682
|
-
"type": "boolean"
|
|
9683
|
-
},
|
|
9684
|
-
"websocket": {
|
|
9685
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9686
|
-
"name": "websocket",
|
|
9687
|
-
"hasDynamicHelp": false,
|
|
9688
|
-
"multiple": false,
|
|
9689
|
-
"type": "option"
|
|
9690
|
-
},
|
|
9691
|
-
"skipauth": {
|
|
9692
|
-
"description": "Skip authentication check when a default username is required",
|
|
9693
|
-
"name": "skipauth",
|
|
9694
|
-
"allowNo": false,
|
|
9695
|
-
"type": "boolean"
|
|
9696
|
-
}
|
|
9697
|
-
},
|
|
9698
|
-
"hasDynamicHelp": false,
|
|
9699
|
-
"hiddenAliases": [],
|
|
9700
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
9701
|
-
"pluginAlias": "sfdx-hardis",
|
|
9702
|
-
"pluginName": "sfdx-hardis",
|
|
9703
|
-
"pluginType": "core",
|
|
9704
|
-
"strict": true,
|
|
9705
|
-
"enableJsonFlag": true,
|
|
9706
|
-
"title": "Convert Profiles into Permission Sets",
|
|
9707
|
-
"requiresProject": true,
|
|
9708
|
-
"requiresSfdxPlugins": [
|
|
9709
|
-
"shane-sfdx-plugins"
|
|
9710
|
-
],
|
|
9711
|
-
"isESM": true,
|
|
9712
|
-
"relativePath": [
|
|
9713
|
-
"lib",
|
|
9714
|
-
"commands",
|
|
9715
|
-
"hardis",
|
|
9716
|
-
"project",
|
|
9717
|
-
"convert",
|
|
9718
|
-
"profilestopermsets.js"
|
|
9719
|
-
],
|
|
9720
|
-
"aliasPermutations": [],
|
|
9721
|
-
"permutations": [
|
|
9722
|
-
"hardis:project:convert:profilestopermsets",
|
|
9723
|
-
"project:hardis:convert:profilestopermsets",
|
|
9724
|
-
"project:convert:hardis:profilestopermsets",
|
|
9725
|
-
"project:convert:profilestopermsets:hardis",
|
|
9726
|
-
"hardis:convert:project:profilestopermsets",
|
|
9727
|
-
"convert:hardis:project:profilestopermsets",
|
|
9728
|
-
"convert:project:hardis:profilestopermsets",
|
|
9729
|
-
"convert:project:profilestopermsets:hardis",
|
|
9730
|
-
"hardis:convert:profilestopermsets:project",
|
|
9731
|
-
"convert:hardis:profilestopermsets:project",
|
|
9732
|
-
"convert:profilestopermsets:hardis:project",
|
|
9733
|
-
"convert:profilestopermsets:project:hardis",
|
|
9734
|
-
"hardis:project:profilestopermsets:convert",
|
|
9735
|
-
"project:hardis:profilestopermsets:convert",
|
|
9736
|
-
"project:profilestopermsets:hardis:convert",
|
|
9737
|
-
"project:profilestopermsets:convert:hardis",
|
|
9738
|
-
"hardis:profilestopermsets:project:convert",
|
|
9739
|
-
"profilestopermsets:hardis:project:convert",
|
|
9740
|
-
"profilestopermsets:project:hardis:convert",
|
|
9741
|
-
"profilestopermsets:project:convert:hardis",
|
|
9742
|
-
"hardis:profilestopermsets:convert:project",
|
|
9743
|
-
"profilestopermsets:hardis:convert:project",
|
|
9744
|
-
"profilestopermsets:convert:hardis:project",
|
|
9745
|
-
"profilestopermsets:convert:project:hardis"
|
|
9489
|
+
"hardis:project:audit:remotesites",
|
|
9490
|
+
"project:hardis:audit:remotesites",
|
|
9491
|
+
"project:audit:hardis:remotesites",
|
|
9492
|
+
"project:audit:remotesites:hardis",
|
|
9493
|
+
"hardis:audit:project:remotesites",
|
|
9494
|
+
"audit:hardis:project:remotesites",
|
|
9495
|
+
"audit:project:hardis:remotesites",
|
|
9496
|
+
"audit:project:remotesites:hardis",
|
|
9497
|
+
"hardis:audit:remotesites:project",
|
|
9498
|
+
"audit:hardis:remotesites:project",
|
|
9499
|
+
"audit:remotesites:hardis:project",
|
|
9500
|
+
"audit:remotesites:project:hardis",
|
|
9501
|
+
"hardis:project:remotesites:audit",
|
|
9502
|
+
"project:hardis:remotesites:audit",
|
|
9503
|
+
"project:remotesites:hardis:audit",
|
|
9504
|
+
"project:remotesites:audit:hardis",
|
|
9505
|
+
"hardis:remotesites:project:audit",
|
|
9506
|
+
"remotesites:hardis:project:audit",
|
|
9507
|
+
"remotesites:project:hardis:audit",
|
|
9508
|
+
"remotesites:project:audit:hardis",
|
|
9509
|
+
"hardis:remotesites:audit:project",
|
|
9510
|
+
"remotesites:hardis:audit:project",
|
|
9511
|
+
"remotesites:audit:hardis:project",
|
|
9512
|
+
"remotesites:audit:project:hardis"
|
|
9746
9513
|
]
|
|
9747
9514
|
},
|
|
9748
9515
|
"hardis:project:clean:emptyitems": {
|
|
@@ -11230,6 +10997,238 @@
|
|
|
11230
10997
|
"xml:clean:project:hardis"
|
|
11231
10998
|
]
|
|
11232
10999
|
},
|
|
11000
|
+
"hardis:project:configure:auth": {
|
|
11001
|
+
"aliases": [],
|
|
11002
|
+
"args": {},
|
|
11003
|
+
"description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
|
|
11004
|
+
"examples": [
|
|
11005
|
+
"$ sf hardis:project:configure:auth"
|
|
11006
|
+
],
|
|
11007
|
+
"flags": {
|
|
11008
|
+
"json": {
|
|
11009
|
+
"description": "Format output as json.",
|
|
11010
|
+
"helpGroup": "GLOBAL",
|
|
11011
|
+
"name": "json",
|
|
11012
|
+
"allowNo": false,
|
|
11013
|
+
"type": "boolean"
|
|
11014
|
+
},
|
|
11015
|
+
"flags-dir": {
|
|
11016
|
+
"helpGroup": "GLOBAL",
|
|
11017
|
+
"name": "flags-dir",
|
|
11018
|
+
"summary": "Import flag values from a directory.",
|
|
11019
|
+
"hasDynamicHelp": false,
|
|
11020
|
+
"multiple": false,
|
|
11021
|
+
"type": "option"
|
|
11022
|
+
},
|
|
11023
|
+
"devhub": {
|
|
11024
|
+
"char": "b",
|
|
11025
|
+
"description": "Configure project DevHub",
|
|
11026
|
+
"name": "devhub",
|
|
11027
|
+
"allowNo": false,
|
|
11028
|
+
"type": "boolean"
|
|
11029
|
+
},
|
|
11030
|
+
"debug": {
|
|
11031
|
+
"char": "d",
|
|
11032
|
+
"description": "Activate debug mode (more logs)",
|
|
11033
|
+
"name": "debug",
|
|
11034
|
+
"allowNo": false,
|
|
11035
|
+
"type": "boolean"
|
|
11036
|
+
},
|
|
11037
|
+
"websocket": {
|
|
11038
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11039
|
+
"name": "websocket",
|
|
11040
|
+
"hasDynamicHelp": false,
|
|
11041
|
+
"multiple": false,
|
|
11042
|
+
"type": "option"
|
|
11043
|
+
},
|
|
11044
|
+
"skipauth": {
|
|
11045
|
+
"description": "Skip authentication check when a default username is required",
|
|
11046
|
+
"name": "skipauth",
|
|
11047
|
+
"allowNo": false,
|
|
11048
|
+
"type": "boolean"
|
|
11049
|
+
},
|
|
11050
|
+
"target-org": {
|
|
11051
|
+
"aliases": [
|
|
11052
|
+
"targetusername",
|
|
11053
|
+
"u"
|
|
11054
|
+
],
|
|
11055
|
+
"char": "o",
|
|
11056
|
+
"deprecateAliases": true,
|
|
11057
|
+
"name": "target-org",
|
|
11058
|
+
"noCacheDefault": true,
|
|
11059
|
+
"summary": "Username or alias of the target org.",
|
|
11060
|
+
"hasDynamicHelp": true,
|
|
11061
|
+
"multiple": false,
|
|
11062
|
+
"type": "option"
|
|
11063
|
+
},
|
|
11064
|
+
"target-dev-hub": {
|
|
11065
|
+
"aliases": [
|
|
11066
|
+
"targetdevhubusername"
|
|
11067
|
+
],
|
|
11068
|
+
"char": "v",
|
|
11069
|
+
"deprecateAliases": true,
|
|
11070
|
+
"name": "target-dev-hub",
|
|
11071
|
+
"noCacheDefault": true,
|
|
11072
|
+
"required": false,
|
|
11073
|
+
"summary": "Username or alias of the Dev Hub org.",
|
|
11074
|
+
"hasDynamicHelp": true,
|
|
11075
|
+
"multiple": false,
|
|
11076
|
+
"type": "option"
|
|
11077
|
+
}
|
|
11078
|
+
},
|
|
11079
|
+
"hasDynamicHelp": true,
|
|
11080
|
+
"hiddenAliases": [],
|
|
11081
|
+
"id": "hardis:project:configure:auth",
|
|
11082
|
+
"pluginAlias": "sfdx-hardis",
|
|
11083
|
+
"pluginName": "sfdx-hardis",
|
|
11084
|
+
"pluginType": "core",
|
|
11085
|
+
"strict": true,
|
|
11086
|
+
"enableJsonFlag": true,
|
|
11087
|
+
"title": "Configure authentication",
|
|
11088
|
+
"requiresProject": false,
|
|
11089
|
+
"requiresDependencies": [
|
|
11090
|
+
"openssl"
|
|
11091
|
+
],
|
|
11092
|
+
"isESM": true,
|
|
11093
|
+
"relativePath": [
|
|
11094
|
+
"lib",
|
|
11095
|
+
"commands",
|
|
11096
|
+
"hardis",
|
|
11097
|
+
"project",
|
|
11098
|
+
"configure",
|
|
11099
|
+
"auth.js"
|
|
11100
|
+
],
|
|
11101
|
+
"aliasPermutations": [],
|
|
11102
|
+
"permutations": [
|
|
11103
|
+
"hardis:project:configure:auth",
|
|
11104
|
+
"project:hardis:configure:auth",
|
|
11105
|
+
"project:configure:hardis:auth",
|
|
11106
|
+
"project:configure:auth:hardis",
|
|
11107
|
+
"hardis:configure:project:auth",
|
|
11108
|
+
"configure:hardis:project:auth",
|
|
11109
|
+
"configure:project:hardis:auth",
|
|
11110
|
+
"configure:project:auth:hardis",
|
|
11111
|
+
"hardis:configure:auth:project",
|
|
11112
|
+
"configure:hardis:auth:project",
|
|
11113
|
+
"configure:auth:hardis:project",
|
|
11114
|
+
"configure:auth:project:hardis",
|
|
11115
|
+
"hardis:project:auth:configure",
|
|
11116
|
+
"project:hardis:auth:configure",
|
|
11117
|
+
"project:auth:hardis:configure",
|
|
11118
|
+
"project:auth:configure:hardis",
|
|
11119
|
+
"hardis:auth:project:configure",
|
|
11120
|
+
"auth:hardis:project:configure",
|
|
11121
|
+
"auth:project:hardis:configure",
|
|
11122
|
+
"auth:project:configure:hardis",
|
|
11123
|
+
"hardis:auth:configure:project",
|
|
11124
|
+
"auth:hardis:configure:project",
|
|
11125
|
+
"auth:configure:hardis:project",
|
|
11126
|
+
"auth:configure:project:hardis"
|
|
11127
|
+
]
|
|
11128
|
+
},
|
|
11129
|
+
"hardis:project:convert:profilestopermsets": {
|
|
11130
|
+
"aliases": [],
|
|
11131
|
+
"args": {},
|
|
11132
|
+
"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",
|
|
11133
|
+
"examples": [
|
|
11134
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
11135
|
+
],
|
|
11136
|
+
"flags": {
|
|
11137
|
+
"json": {
|
|
11138
|
+
"description": "Format output as json.",
|
|
11139
|
+
"helpGroup": "GLOBAL",
|
|
11140
|
+
"name": "json",
|
|
11141
|
+
"allowNo": false,
|
|
11142
|
+
"type": "boolean"
|
|
11143
|
+
},
|
|
11144
|
+
"flags-dir": {
|
|
11145
|
+
"helpGroup": "GLOBAL",
|
|
11146
|
+
"name": "flags-dir",
|
|
11147
|
+
"summary": "Import flag values from a directory.",
|
|
11148
|
+
"hasDynamicHelp": false,
|
|
11149
|
+
"multiple": false,
|
|
11150
|
+
"type": "option"
|
|
11151
|
+
},
|
|
11152
|
+
"except": {
|
|
11153
|
+
"char": "e",
|
|
11154
|
+
"description": "List of filters",
|
|
11155
|
+
"name": "except",
|
|
11156
|
+
"default": [],
|
|
11157
|
+
"hasDynamicHelp": false,
|
|
11158
|
+
"multiple": true,
|
|
11159
|
+
"type": "option"
|
|
11160
|
+
},
|
|
11161
|
+
"debug": {
|
|
11162
|
+
"char": "d",
|
|
11163
|
+
"description": "Activate debug mode (more logs)",
|
|
11164
|
+
"name": "debug",
|
|
11165
|
+
"allowNo": false,
|
|
11166
|
+
"type": "boolean"
|
|
11167
|
+
},
|
|
11168
|
+
"websocket": {
|
|
11169
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11170
|
+
"name": "websocket",
|
|
11171
|
+
"hasDynamicHelp": false,
|
|
11172
|
+
"multiple": false,
|
|
11173
|
+
"type": "option"
|
|
11174
|
+
},
|
|
11175
|
+
"skipauth": {
|
|
11176
|
+
"description": "Skip authentication check when a default username is required",
|
|
11177
|
+
"name": "skipauth",
|
|
11178
|
+
"allowNo": false,
|
|
11179
|
+
"type": "boolean"
|
|
11180
|
+
}
|
|
11181
|
+
},
|
|
11182
|
+
"hasDynamicHelp": false,
|
|
11183
|
+
"hiddenAliases": [],
|
|
11184
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
11185
|
+
"pluginAlias": "sfdx-hardis",
|
|
11186
|
+
"pluginName": "sfdx-hardis",
|
|
11187
|
+
"pluginType": "core",
|
|
11188
|
+
"strict": true,
|
|
11189
|
+
"enableJsonFlag": true,
|
|
11190
|
+
"title": "Convert Profiles into Permission Sets",
|
|
11191
|
+
"requiresProject": true,
|
|
11192
|
+
"requiresSfdxPlugins": [
|
|
11193
|
+
"shane-sfdx-plugins"
|
|
11194
|
+
],
|
|
11195
|
+
"isESM": true,
|
|
11196
|
+
"relativePath": [
|
|
11197
|
+
"lib",
|
|
11198
|
+
"commands",
|
|
11199
|
+
"hardis",
|
|
11200
|
+
"project",
|
|
11201
|
+
"convert",
|
|
11202
|
+
"profilestopermsets.js"
|
|
11203
|
+
],
|
|
11204
|
+
"aliasPermutations": [],
|
|
11205
|
+
"permutations": [
|
|
11206
|
+
"hardis:project:convert:profilestopermsets",
|
|
11207
|
+
"project:hardis:convert:profilestopermsets",
|
|
11208
|
+
"project:convert:hardis:profilestopermsets",
|
|
11209
|
+
"project:convert:profilestopermsets:hardis",
|
|
11210
|
+
"hardis:convert:project:profilestopermsets",
|
|
11211
|
+
"convert:hardis:project:profilestopermsets",
|
|
11212
|
+
"convert:project:hardis:profilestopermsets",
|
|
11213
|
+
"convert:project:profilestopermsets:hardis",
|
|
11214
|
+
"hardis:convert:profilestopermsets:project",
|
|
11215
|
+
"convert:hardis:profilestopermsets:project",
|
|
11216
|
+
"convert:profilestopermsets:hardis:project",
|
|
11217
|
+
"convert:profilestopermsets:project:hardis",
|
|
11218
|
+
"hardis:project:profilestopermsets:convert",
|
|
11219
|
+
"project:hardis:profilestopermsets:convert",
|
|
11220
|
+
"project:profilestopermsets:hardis:convert",
|
|
11221
|
+
"project:profilestopermsets:convert:hardis",
|
|
11222
|
+
"hardis:profilestopermsets:project:convert",
|
|
11223
|
+
"profilestopermsets:hardis:project:convert",
|
|
11224
|
+
"profilestopermsets:project:hardis:convert",
|
|
11225
|
+
"profilestopermsets:project:convert:hardis",
|
|
11226
|
+
"hardis:profilestopermsets:convert:project",
|
|
11227
|
+
"profilestopermsets:hardis:convert:project",
|
|
11228
|
+
"profilestopermsets:convert:hardis:project",
|
|
11229
|
+
"profilestopermsets:convert:project:hardis"
|
|
11230
|
+
]
|
|
11231
|
+
},
|
|
11233
11232
|
"hardis:project:deploy:notify": {
|
|
11234
11233
|
"aliases": [],
|
|
11235
11234
|
"args": {},
|
|
@@ -15102,5 +15101,5 @@
|
|
|
15102
15101
|
]
|
|
15103
15102
|
}
|
|
15104
15103
|
},
|
|
15105
|
-
"version": "6.1.
|
|
15104
|
+
"version": "6.1.2"
|
|
15106
15105
|
}
|