sfdx-hardis 5.45.1-beta202508100154.0 → 6.0.1-beta202508101506.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/hardis/org/select.js +4 -0
- package/lib/commands/hardis/org/select.js.map +1 -1
- package/lib/common/utils/orgUtils.js +5 -5
- package/lib/common/utils/orgUtils.js.map +1 -1
- package/lib/common/utils/prompts.js +1 -1
- package/lib/common/utils/prompts.js.map +1 -1
- package/lib/hooks/prerun/check-dependencies.js +143 -0
- package/lib/hooks/prerun/check-dependencies.js.map +1 -1
- package/oclif.manifest.json +744 -744
- package/package.json +1 -2
- package/lib/hooks/init/check-local-sfdx-hardis-files.d.ts +0 -3
- package/lib/hooks/init/check-local-sfdx-hardis-files.js +0 -151
- package/lib/hooks/init/check-local-sfdx-hardis-files.js.map +0 -1
package/oclif.manifest.json
CHANGED
|
@@ -132,13 +132,12 @@
|
|
|
132
132
|
"clear:cache:hardis"
|
|
133
133
|
]
|
|
134
134
|
},
|
|
135
|
-
"hardis:
|
|
135
|
+
"hardis:config:get": {
|
|
136
136
|
"aliases": [],
|
|
137
137
|
"args": {},
|
|
138
|
-
"description": "\n## Command Behavior\n\n**
|
|
138
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the sfdx-hardis configuration for a specified level.**\n\nThis command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.\n\n- **Configuration levels:** It can retrieve configuration from three different levels:\n - **Project:** The configuration defined in the project's `.sfdx-hardis.yml` file.\n - **Branch:** The configuration defined in a branch-specific configuration file (e.g., `.sfdx-hardis.production.yml`).\n - **User:** The global user-level configuration.\n\n## Technical explanations\n\nThe command's logic is straightforward:\n\n- **`getConfig` function:** It calls the `getConfig` utility function, passing the desired configuration level as an argument.\n- **Configuration loading:** The `getConfig` function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON.\n- **Output:** The retrieved configuration is then displayed to the user as a JSON string.\n",
|
|
139
139
|
"examples": [
|
|
140
|
-
"$ sf hardis:
|
|
141
|
-
"CI=true sf hardis:auth:login"
|
|
140
|
+
"$ sf hardis:project:deploy:sources:metadata"
|
|
142
141
|
],
|
|
143
142
|
"flags": {
|
|
144
143
|
"json": {
|
|
@@ -156,28 +155,20 @@
|
|
|
156
155
|
"multiple": false,
|
|
157
156
|
"type": "option"
|
|
158
157
|
},
|
|
159
|
-
"
|
|
160
|
-
"char": "
|
|
161
|
-
"description": "
|
|
162
|
-
"name": "
|
|
158
|
+
"level": {
|
|
159
|
+
"char": "l",
|
|
160
|
+
"description": "project,branch or user",
|
|
161
|
+
"name": "level",
|
|
162
|
+
"default": "project",
|
|
163
163
|
"hasDynamicHelp": false,
|
|
164
164
|
"multiple": false,
|
|
165
|
+
"options": [
|
|
166
|
+
"project",
|
|
167
|
+
"branch",
|
|
168
|
+
"user"
|
|
169
|
+
],
|
|
165
170
|
"type": "option"
|
|
166
171
|
},
|
|
167
|
-
"devhub": {
|
|
168
|
-
"char": "h",
|
|
169
|
-
"description": "Also connect associated DevHub",
|
|
170
|
-
"name": "devhub",
|
|
171
|
-
"allowNo": false,
|
|
172
|
-
"type": "boolean"
|
|
173
|
-
},
|
|
174
|
-
"scratchorg": {
|
|
175
|
-
"char": "s",
|
|
176
|
-
"description": "Scratch org",
|
|
177
|
-
"name": "scratchorg",
|
|
178
|
-
"allowNo": false,
|
|
179
|
-
"type": "boolean"
|
|
180
|
-
},
|
|
181
172
|
"debug": {
|
|
182
173
|
"char": "d",
|
|
183
174
|
"description": "Activate debug mode (more logs)",
|
|
@@ -201,38 +192,39 @@
|
|
|
201
192
|
},
|
|
202
193
|
"hasDynamicHelp": false,
|
|
203
194
|
"hiddenAliases": [],
|
|
204
|
-
"id": "hardis:
|
|
195
|
+
"id": "hardis:config:get",
|
|
205
196
|
"pluginAlias": "sfdx-hardis",
|
|
206
197
|
"pluginName": "sfdx-hardis",
|
|
207
198
|
"pluginType": "core",
|
|
208
199
|
"strict": true,
|
|
209
200
|
"enableJsonFlag": true,
|
|
210
|
-
"title": "
|
|
201
|
+
"title": "Deploy metadata sources to org",
|
|
211
202
|
"requiresProject": false,
|
|
212
203
|
"isESM": true,
|
|
213
204
|
"relativePath": [
|
|
214
205
|
"lib",
|
|
215
206
|
"commands",
|
|
216
207
|
"hardis",
|
|
217
|
-
"
|
|
218
|
-
"
|
|
208
|
+
"config",
|
|
209
|
+
"get.js"
|
|
219
210
|
],
|
|
220
211
|
"aliasPermutations": [],
|
|
221
212
|
"permutations": [
|
|
222
|
-
"hardis:
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"hardis:
|
|
226
|
-
"
|
|
227
|
-
"
|
|
213
|
+
"hardis:config:get",
|
|
214
|
+
"config:hardis:get",
|
|
215
|
+
"config:get:hardis",
|
|
216
|
+
"hardis:get:config",
|
|
217
|
+
"get:hardis:config",
|
|
218
|
+
"get:config:hardis"
|
|
228
219
|
]
|
|
229
220
|
},
|
|
230
|
-
"hardis:
|
|
221
|
+
"hardis:auth:login": {
|
|
231
222
|
"aliases": [],
|
|
232
223
|
"args": {},
|
|
233
|
-
"description": "\n## Command Behavior\n\n**
|
|
224
|
+
"description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n## Technical explanations\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",
|
|
234
225
|
"examples": [
|
|
235
|
-
"$ sf hardis:
|
|
226
|
+
"$ sf hardis:auth:login",
|
|
227
|
+
"CI=true sf hardis:auth:login"
|
|
236
228
|
],
|
|
237
229
|
"flags": {
|
|
238
230
|
"json": {
|
|
@@ -250,20 +242,28 @@
|
|
|
250
242
|
"multiple": false,
|
|
251
243
|
"type": "option"
|
|
252
244
|
},
|
|
253
|
-
"
|
|
254
|
-
"char": "
|
|
255
|
-
"description": "
|
|
256
|
-
"name": "
|
|
257
|
-
"default": "project",
|
|
245
|
+
"instanceurl": {
|
|
246
|
+
"char": "r",
|
|
247
|
+
"description": "URL of org instance",
|
|
248
|
+
"name": "instanceurl",
|
|
258
249
|
"hasDynamicHelp": false,
|
|
259
250
|
"multiple": false,
|
|
260
|
-
"options": [
|
|
261
|
-
"project",
|
|
262
|
-
"branch",
|
|
263
|
-
"user"
|
|
264
|
-
],
|
|
265
251
|
"type": "option"
|
|
266
252
|
},
|
|
253
|
+
"devhub": {
|
|
254
|
+
"char": "h",
|
|
255
|
+
"description": "Also connect associated DevHub",
|
|
256
|
+
"name": "devhub",
|
|
257
|
+
"allowNo": false,
|
|
258
|
+
"type": "boolean"
|
|
259
|
+
},
|
|
260
|
+
"scratchorg": {
|
|
261
|
+
"char": "s",
|
|
262
|
+
"description": "Scratch org",
|
|
263
|
+
"name": "scratchorg",
|
|
264
|
+
"allowNo": false,
|
|
265
|
+
"type": "boolean"
|
|
266
|
+
},
|
|
267
267
|
"debug": {
|
|
268
268
|
"char": "d",
|
|
269
269
|
"description": "Activate debug mode (more logs)",
|
|
@@ -287,30 +287,30 @@
|
|
|
287
287
|
},
|
|
288
288
|
"hasDynamicHelp": false,
|
|
289
289
|
"hiddenAliases": [],
|
|
290
|
-
"id": "hardis:
|
|
290
|
+
"id": "hardis:auth:login",
|
|
291
291
|
"pluginAlias": "sfdx-hardis",
|
|
292
292
|
"pluginName": "sfdx-hardis",
|
|
293
293
|
"pluginType": "core",
|
|
294
294
|
"strict": true,
|
|
295
295
|
"enableJsonFlag": true,
|
|
296
|
-
"title": "
|
|
296
|
+
"title": "Login",
|
|
297
297
|
"requiresProject": false,
|
|
298
298
|
"isESM": true,
|
|
299
299
|
"relativePath": [
|
|
300
300
|
"lib",
|
|
301
301
|
"commands",
|
|
302
302
|
"hardis",
|
|
303
|
-
"
|
|
304
|
-
"
|
|
303
|
+
"auth",
|
|
304
|
+
"login.js"
|
|
305
305
|
],
|
|
306
306
|
"aliasPermutations": [],
|
|
307
307
|
"permutations": [
|
|
308
|
-
"hardis:
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"hardis:
|
|
312
|
-
"
|
|
313
|
-
"
|
|
308
|
+
"hardis:auth:login",
|
|
309
|
+
"auth:hardis:login",
|
|
310
|
+
"auth:login:hardis",
|
|
311
|
+
"hardis:login:auth",
|
|
312
|
+
"login:hardis:auth",
|
|
313
|
+
"login:auth:hardis"
|
|
314
314
|
]
|
|
315
315
|
},
|
|
316
316
|
"hardis:doc:fieldusage": {
|
|
@@ -5482,13 +5482,12 @@
|
|
|
5482
5482
|
"import:data:org:hardis"
|
|
5483
5483
|
]
|
|
5484
5484
|
},
|
|
5485
|
-
"hardis:org:
|
|
5485
|
+
"hardis:org:files:export": {
|
|
5486
5486
|
"aliases": [],
|
|
5487
5487
|
"args": {},
|
|
5488
|
-
"description": "
|
|
5488
|
+
"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## Technical explanations\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",
|
|
5489
5489
|
"examples": [
|
|
5490
|
-
"$ sf hardis:org:
|
|
5491
|
-
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
5490
|
+
"$ sf hardis:org:files:export"
|
|
5492
5491
|
],
|
|
5493
5492
|
"flags": {
|
|
5494
5493
|
"json": {
|
|
@@ -5506,10 +5505,37 @@
|
|
|
5506
5505
|
"multiple": false,
|
|
5507
5506
|
"type": "option"
|
|
5508
5507
|
},
|
|
5509
|
-
"
|
|
5510
|
-
"char": "
|
|
5511
|
-
"description": "
|
|
5512
|
-
"name": "
|
|
5508
|
+
"path": {
|
|
5509
|
+
"char": "p",
|
|
5510
|
+
"description": "Path to the file export project",
|
|
5511
|
+
"name": "path",
|
|
5512
|
+
"hasDynamicHelp": false,
|
|
5513
|
+
"multiple": false,
|
|
5514
|
+
"type": "option"
|
|
5515
|
+
},
|
|
5516
|
+
"chunksize": {
|
|
5517
|
+
"char": "c",
|
|
5518
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
5519
|
+
"name": "chunksize",
|
|
5520
|
+
"default": 1000,
|
|
5521
|
+
"hasDynamicHelp": false,
|
|
5522
|
+
"multiple": false,
|
|
5523
|
+
"type": "option"
|
|
5524
|
+
},
|
|
5525
|
+
"polltimeout": {
|
|
5526
|
+
"char": "t",
|
|
5527
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
5528
|
+
"name": "polltimeout",
|
|
5529
|
+
"default": 300000,
|
|
5530
|
+
"hasDynamicHelp": false,
|
|
5531
|
+
"multiple": false,
|
|
5532
|
+
"type": "option"
|
|
5533
|
+
},
|
|
5534
|
+
"startchunknumber": {
|
|
5535
|
+
"char": "s",
|
|
5536
|
+
"description": "Chunk number to start from",
|
|
5537
|
+
"name": "startchunknumber",
|
|
5538
|
+
"default": 0,
|
|
5513
5539
|
"hasDynamicHelp": false,
|
|
5514
5540
|
"multiple": false,
|
|
5515
5541
|
"type": "option"
|
|
@@ -5552,60 +5578,57 @@
|
|
|
5552
5578
|
},
|
|
5553
5579
|
"hasDynamicHelp": true,
|
|
5554
5580
|
"hiddenAliases": [],
|
|
5555
|
-
"id": "hardis:org:
|
|
5581
|
+
"id": "hardis:org:files:export",
|
|
5556
5582
|
"pluginAlias": "sfdx-hardis",
|
|
5557
5583
|
"pluginName": "sfdx-hardis",
|
|
5558
5584
|
"pluginType": "core",
|
|
5559
5585
|
"strict": true,
|
|
5560
5586
|
"enableJsonFlag": true,
|
|
5561
|
-
"title": "
|
|
5562
|
-
"requiresProject":
|
|
5587
|
+
"title": "Export files",
|
|
5588
|
+
"requiresProject": false,
|
|
5563
5589
|
"isESM": true,
|
|
5564
5590
|
"relativePath": [
|
|
5565
5591
|
"lib",
|
|
5566
5592
|
"commands",
|
|
5567
5593
|
"hardis",
|
|
5568
5594
|
"org",
|
|
5569
|
-
"
|
|
5570
|
-
"
|
|
5595
|
+
"files",
|
|
5596
|
+
"export.js"
|
|
5571
5597
|
],
|
|
5572
5598
|
"aliasPermutations": [],
|
|
5573
5599
|
"permutations": [
|
|
5574
|
-
"hardis:org:
|
|
5575
|
-
"org:hardis:
|
|
5576
|
-
"org:
|
|
5577
|
-
"org:
|
|
5578
|
-
"hardis:
|
|
5579
|
-
"
|
|
5580
|
-
"
|
|
5581
|
-
"
|
|
5582
|
-
"hardis:
|
|
5583
|
-
"
|
|
5584
|
-
"
|
|
5585
|
-
"
|
|
5586
|
-
"hardis:org:
|
|
5587
|
-
"org:hardis:
|
|
5588
|
-
"org:
|
|
5589
|
-
"org:
|
|
5590
|
-
"hardis:
|
|
5591
|
-
"
|
|
5592
|
-
"
|
|
5593
|
-
"
|
|
5594
|
-
"hardis:
|
|
5595
|
-
"
|
|
5596
|
-
"
|
|
5597
|
-
"
|
|
5600
|
+
"hardis:org:files:export",
|
|
5601
|
+
"org:hardis:files:export",
|
|
5602
|
+
"org:files:hardis:export",
|
|
5603
|
+
"org:files:export:hardis",
|
|
5604
|
+
"hardis:files:org:export",
|
|
5605
|
+
"files:hardis:org:export",
|
|
5606
|
+
"files:org:hardis:export",
|
|
5607
|
+
"files:org:export:hardis",
|
|
5608
|
+
"hardis:files:export:org",
|
|
5609
|
+
"files:hardis:export:org",
|
|
5610
|
+
"files:export:hardis:org",
|
|
5611
|
+
"files:export:org:hardis",
|
|
5612
|
+
"hardis:org:export:files",
|
|
5613
|
+
"org:hardis:export:files",
|
|
5614
|
+
"org:export:hardis:files",
|
|
5615
|
+
"org:export:files:hardis",
|
|
5616
|
+
"hardis:export:org:files",
|
|
5617
|
+
"export:hardis:org:files",
|
|
5618
|
+
"export:org:hardis:files",
|
|
5619
|
+
"export:org:files:hardis",
|
|
5620
|
+
"hardis:export:files:org",
|
|
5621
|
+
"export:hardis:files:org",
|
|
5622
|
+
"export:files:hardis:org",
|
|
5623
|
+
"export:files:org:hardis"
|
|
5598
5624
|
]
|
|
5599
5625
|
},
|
|
5600
|
-
"hardis:org:
|
|
5626
|
+
"hardis:org:files:import": {
|
|
5601
5627
|
"aliases": [],
|
|
5602
5628
|
"args": {},
|
|
5603
|
-
"description": "
|
|
5629
|
+
"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## Technical explanations\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",
|
|
5604
5630
|
"examples": [
|
|
5605
|
-
"$ sf hardis:org:
|
|
5606
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5607
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5608
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5631
|
+
"$ sf hardis:org:files:import"
|
|
5609
5632
|
],
|
|
5610
5633
|
"flags": {
|
|
5611
5634
|
"json": {
|
|
@@ -5623,29 +5646,20 @@
|
|
|
5623
5646
|
"multiple": false,
|
|
5624
5647
|
"type": "option"
|
|
5625
5648
|
},
|
|
5626
|
-
"
|
|
5627
|
-
"char": "
|
|
5628
|
-
"description": "
|
|
5629
|
-
"name": "
|
|
5630
|
-
"hasDynamicHelp": false,
|
|
5631
|
-
"multiple": false,
|
|
5632
|
-
"type": "option"
|
|
5633
|
-
},
|
|
5634
|
-
"lastndays": {
|
|
5635
|
-
"char": "t",
|
|
5636
|
-
"description": "Number of days to extract from today (included)",
|
|
5637
|
-
"name": "lastndays",
|
|
5649
|
+
"path": {
|
|
5650
|
+
"char": "p",
|
|
5651
|
+
"description": "Path to the file export project",
|
|
5652
|
+
"name": "path",
|
|
5638
5653
|
"hasDynamicHelp": false,
|
|
5639
5654
|
"multiple": false,
|
|
5640
5655
|
"type": "option"
|
|
5641
5656
|
},
|
|
5642
|
-
"
|
|
5657
|
+
"overwrite": {
|
|
5643
5658
|
"char": "f",
|
|
5644
|
-
"description": "
|
|
5645
|
-
"name": "
|
|
5646
|
-
"
|
|
5647
|
-
"
|
|
5648
|
-
"type": "option"
|
|
5659
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
5660
|
+
"name": "overwrite",
|
|
5661
|
+
"allowNo": false,
|
|
5662
|
+
"type": "boolean"
|
|
5649
5663
|
},
|
|
5650
5664
|
"debug": {
|
|
5651
5665
|
"char": "d",
|
|
@@ -5685,13 +5699,13 @@
|
|
|
5685
5699
|
},
|
|
5686
5700
|
"hasDynamicHelp": true,
|
|
5687
5701
|
"hiddenAliases": [],
|
|
5688
|
-
"id": "hardis:org:
|
|
5702
|
+
"id": "hardis:org:files:import",
|
|
5689
5703
|
"pluginAlias": "sfdx-hardis",
|
|
5690
5704
|
"pluginName": "sfdx-hardis",
|
|
5691
5705
|
"pluginType": "core",
|
|
5692
5706
|
"strict": true,
|
|
5693
5707
|
"enableJsonFlag": true,
|
|
5694
|
-
"title": "
|
|
5708
|
+
"title": "Import files",
|
|
5695
5709
|
"requiresProject": false,
|
|
5696
5710
|
"isESM": true,
|
|
5697
5711
|
"relativePath": [
|
|
@@ -5699,43 +5713,44 @@
|
|
|
5699
5713
|
"commands",
|
|
5700
5714
|
"hardis",
|
|
5701
5715
|
"org",
|
|
5702
|
-
"
|
|
5703
|
-
"
|
|
5716
|
+
"files",
|
|
5717
|
+
"import.js"
|
|
5704
5718
|
],
|
|
5705
5719
|
"aliasPermutations": [],
|
|
5706
5720
|
"permutations": [
|
|
5707
|
-
"hardis:org:
|
|
5708
|
-
"org:hardis:
|
|
5709
|
-
"org:
|
|
5710
|
-
"org:
|
|
5711
|
-
"hardis:
|
|
5712
|
-
"
|
|
5713
|
-
"
|
|
5714
|
-
"
|
|
5715
|
-
"hardis:
|
|
5716
|
-
"
|
|
5717
|
-
"
|
|
5718
|
-
"
|
|
5719
|
-
"hardis:org:
|
|
5720
|
-
"org:hardis:
|
|
5721
|
-
"org:
|
|
5722
|
-
"org:
|
|
5723
|
-
"hardis:
|
|
5724
|
-
"
|
|
5725
|
-
"
|
|
5726
|
-
"
|
|
5727
|
-
"hardis:
|
|
5728
|
-
"
|
|
5729
|
-
"
|
|
5730
|
-
"
|
|
5721
|
+
"hardis:org:files:import",
|
|
5722
|
+
"org:hardis:files:import",
|
|
5723
|
+
"org:files:hardis:import",
|
|
5724
|
+
"org:files:import:hardis",
|
|
5725
|
+
"hardis:files:org:import",
|
|
5726
|
+
"files:hardis:org:import",
|
|
5727
|
+
"files:org:hardis:import",
|
|
5728
|
+
"files:org:import:hardis",
|
|
5729
|
+
"hardis:files:import:org",
|
|
5730
|
+
"files:hardis:import:org",
|
|
5731
|
+
"files:import:hardis:org",
|
|
5732
|
+
"files:import:org:hardis",
|
|
5733
|
+
"hardis:org:import:files",
|
|
5734
|
+
"org:hardis:import:files",
|
|
5735
|
+
"org:import:hardis:files",
|
|
5736
|
+
"org:import:files:hardis",
|
|
5737
|
+
"hardis:import:org:files",
|
|
5738
|
+
"import:hardis:org:files",
|
|
5739
|
+
"import:org:hardis:files",
|
|
5740
|
+
"import:org:files:hardis",
|
|
5741
|
+
"hardis:import:files:org",
|
|
5742
|
+
"import:hardis:files:org",
|
|
5743
|
+
"import:files:hardis:org",
|
|
5744
|
+
"import:files:org:hardis"
|
|
5731
5745
|
]
|
|
5732
5746
|
},
|
|
5733
|
-
"hardis:org:
|
|
5747
|
+
"hardis:org:fix:listviewmine": {
|
|
5734
5748
|
"aliases": [],
|
|
5735
5749
|
"args": {},
|
|
5736
|
-
"description": "
|
|
5750
|
+
"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",
|
|
5737
5751
|
"examples": [
|
|
5738
|
-
"$ sf hardis:org:
|
|
5752
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
5753
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
5739
5754
|
],
|
|
5740
5755
|
"flags": {
|
|
5741
5756
|
"json": {
|
|
@@ -5753,6 +5768,14 @@
|
|
|
5753
5768
|
"multiple": false,
|
|
5754
5769
|
"type": "option"
|
|
5755
5770
|
},
|
|
5771
|
+
"listviews": {
|
|
5772
|
+
"char": "l",
|
|
5773
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
5774
|
+
"name": "listviews",
|
|
5775
|
+
"hasDynamicHelp": false,
|
|
5776
|
+
"multiple": false,
|
|
5777
|
+
"type": "option"
|
|
5778
|
+
},
|
|
5756
5779
|
"debug": {
|
|
5757
5780
|
"char": "d",
|
|
5758
5781
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5791,60 +5814,59 @@
|
|
|
5791
5814
|
},
|
|
5792
5815
|
"hasDynamicHelp": true,
|
|
5793
5816
|
"hiddenAliases": [],
|
|
5794
|
-
"id": "hardis:org:
|
|
5817
|
+
"id": "hardis:org:fix:listviewmine",
|
|
5795
5818
|
"pluginAlias": "sfdx-hardis",
|
|
5796
5819
|
"pluginName": "sfdx-hardis",
|
|
5797
5820
|
"pluginType": "core",
|
|
5798
5821
|
"strict": true,
|
|
5799
5822
|
"enableJsonFlag": true,
|
|
5800
|
-
"title": "
|
|
5801
|
-
"requiresProject":
|
|
5823
|
+
"title": "Fix listviews with ",
|
|
5824
|
+
"requiresProject": true,
|
|
5802
5825
|
"isESM": true,
|
|
5803
5826
|
"relativePath": [
|
|
5804
5827
|
"lib",
|
|
5805
5828
|
"commands",
|
|
5806
5829
|
"hardis",
|
|
5807
5830
|
"org",
|
|
5808
|
-
"
|
|
5809
|
-
"
|
|
5831
|
+
"fix",
|
|
5832
|
+
"listviewmine.js"
|
|
5810
5833
|
],
|
|
5811
5834
|
"aliasPermutations": [],
|
|
5812
5835
|
"permutations": [
|
|
5813
|
-
"hardis:org:
|
|
5814
|
-
"org:hardis:
|
|
5815
|
-
"org:
|
|
5816
|
-
"org:
|
|
5817
|
-
"hardis:
|
|
5818
|
-
"
|
|
5819
|
-
"
|
|
5820
|
-
"
|
|
5821
|
-
"hardis:
|
|
5822
|
-
"
|
|
5823
|
-
"
|
|
5824
|
-
"
|
|
5825
|
-
"hardis:org:
|
|
5826
|
-
"org:hardis:
|
|
5827
|
-
"org:
|
|
5828
|
-
"org:
|
|
5829
|
-
"hardis:
|
|
5830
|
-
"
|
|
5831
|
-
"
|
|
5832
|
-
"
|
|
5833
|
-
"hardis:
|
|
5834
|
-
"
|
|
5835
|
-
"
|
|
5836
|
-
"
|
|
5836
|
+
"hardis:org:fix:listviewmine",
|
|
5837
|
+
"org:hardis:fix:listviewmine",
|
|
5838
|
+
"org:fix:hardis:listviewmine",
|
|
5839
|
+
"org:fix:listviewmine:hardis",
|
|
5840
|
+
"hardis:fix:org:listviewmine",
|
|
5841
|
+
"fix:hardis:org:listviewmine",
|
|
5842
|
+
"fix:org:hardis:listviewmine",
|
|
5843
|
+
"fix:org:listviewmine:hardis",
|
|
5844
|
+
"hardis:fix:listviewmine:org",
|
|
5845
|
+
"fix:hardis:listviewmine:org",
|
|
5846
|
+
"fix:listviewmine:hardis:org",
|
|
5847
|
+
"fix:listviewmine:org:hardis",
|
|
5848
|
+
"hardis:org:listviewmine:fix",
|
|
5849
|
+
"org:hardis:listviewmine:fix",
|
|
5850
|
+
"org:listviewmine:hardis:fix",
|
|
5851
|
+
"org:listviewmine:fix:hardis",
|
|
5852
|
+
"hardis:listviewmine:org:fix",
|
|
5853
|
+
"listviewmine:hardis:org:fix",
|
|
5854
|
+
"listviewmine:org:hardis:fix",
|
|
5855
|
+
"listviewmine:org:fix:hardis",
|
|
5856
|
+
"hardis:listviewmine:fix:org",
|
|
5857
|
+
"listviewmine:hardis:fix:org",
|
|
5858
|
+
"listviewmine:fix:hardis:org",
|
|
5859
|
+
"listviewmine:fix:org:hardis"
|
|
5837
5860
|
]
|
|
5838
5861
|
},
|
|
5839
|
-
"hardis:org:
|
|
5862
|
+
"hardis:org:generate:packagexmlfull": {
|
|
5840
5863
|
"aliases": [],
|
|
5841
5864
|
"args": {},
|
|
5842
|
-
"description": "
|
|
5865
|
+
"description": "\n## Command Behavior\n\n**Generates a comprehensive `package.xml` file for a Salesforce org, including all metadata components, even managed ones.**\n\nThis command is essential for various Salesforce development and administration tasks, especially when you need a complete snapshot of an org's metadata. It goes beyond typical source tracking by including managed package components, which is crucial for understanding the full metadata footprint of an org.\n\nKey functionalities:\n\n- **Full Org Metadata Retrieval:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a complete list of all metadata types and their members.\n- **Managed Package Inclusion:** Unlike standard source retrieval, this command explicitly includes metadata from managed packages, providing a truly comprehensive `package.xml`.\n- **Customizable Output:** Allows you to specify the output file path for the generated `package.xml`.\n- **Interactive Org Selection:** If no target org is specified, it interactively prompts the user to choose an org.\n\n## Technical explanations\n\nThe command's technical implementation involves:\n\n- **Salesforce Metadata API Interaction:** It leverages the Salesforce Metadata API to list all available metadata types and then retrieve all components for each type.\n- **`buildOrgManifest` Utility:** The core logic for querying the org's metadata and constructing the `package.xml` is encapsulated within the `buildOrgManifest` utility function.\n- **XML Generation:** It dynamically builds the XML structure of the `package.xml` file, including the `types` and `members` elements for all retrieved metadata.\n- **File System Operations:** It writes the generated `package.xml` file to the specified output path.\n- **Interactive Prompts:** Uses `promptOrgUsernameDefault` to guide the user in selecting the target Salesforce org.\n",
|
|
5843
5866
|
"examples": [
|
|
5844
|
-
"$ sf hardis:org:
|
|
5845
|
-
"$ sf hardis:org:
|
|
5846
|
-
"$ sf hardis:org:
|
|
5847
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
5867
|
+
"$ sf hardis:org:generate:packagexmlfull",
|
|
5868
|
+
"$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
|
|
5869
|
+
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
5848
5870
|
],
|
|
5849
5871
|
"flags": {
|
|
5850
5872
|
"json": {
|
|
@@ -5862,27 +5884,8 @@
|
|
|
5862
5884
|
"multiple": false,
|
|
5863
5885
|
"type": "option"
|
|
5864
5886
|
},
|
|
5865
|
-
"eventtype": {
|
|
5866
|
-
"char": "e",
|
|
5867
|
-
"description": "Type of EventLogFile event to analyze",
|
|
5868
|
-
"name": "eventtype",
|
|
5869
|
-
"default": "ApiTotalUsage",
|
|
5870
|
-
"hasDynamicHelp": false,
|
|
5871
|
-
"multiple": false,
|
|
5872
|
-
"type": "option"
|
|
5873
|
-
},
|
|
5874
|
-
"limit": {
|
|
5875
|
-
"char": "l",
|
|
5876
|
-
"description": "Number of latest EventLogFile events to analyze",
|
|
5877
|
-
"name": "limit",
|
|
5878
|
-
"default": 999,
|
|
5879
|
-
"hasDynamicHelp": false,
|
|
5880
|
-
"multiple": false,
|
|
5881
|
-
"type": "option"
|
|
5882
|
-
},
|
|
5883
5887
|
"outputfile": {
|
|
5884
|
-
"
|
|
5885
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5888
|
+
"description": "Output package.xml file",
|
|
5886
5889
|
"name": "outputfile",
|
|
5887
5890
|
"hasDynamicHelp": false,
|
|
5888
5891
|
"multiple": false,
|
|
@@ -5926,13 +5929,13 @@
|
|
|
5926
5929
|
},
|
|
5927
5930
|
"hasDynamicHelp": true,
|
|
5928
5931
|
"hiddenAliases": [],
|
|
5929
|
-
"id": "hardis:org:
|
|
5932
|
+
"id": "hardis:org:generate:packagexmlfull",
|
|
5930
5933
|
"pluginAlias": "sfdx-hardis",
|
|
5931
5934
|
"pluginName": "sfdx-hardis",
|
|
5932
5935
|
"pluginType": "core",
|
|
5933
5936
|
"strict": true,
|
|
5934
5937
|
"enableJsonFlag": true,
|
|
5935
|
-
"title": "
|
|
5938
|
+
"title": "Generate Full Org package.xml",
|
|
5936
5939
|
"requiresProject": false,
|
|
5937
5940
|
"isESM": true,
|
|
5938
5941
|
"relativePath": [
|
|
@@ -5940,43 +5943,46 @@
|
|
|
5940
5943
|
"commands",
|
|
5941
5944
|
"hardis",
|
|
5942
5945
|
"org",
|
|
5943
|
-
"
|
|
5944
|
-
"
|
|
5946
|
+
"generate",
|
|
5947
|
+
"packagexmlfull.js"
|
|
5945
5948
|
],
|
|
5946
5949
|
"aliasPermutations": [],
|
|
5947
5950
|
"permutations": [
|
|
5948
|
-
"hardis:org:
|
|
5949
|
-
"org:hardis:
|
|
5950
|
-
"org:
|
|
5951
|
-
"org:
|
|
5952
|
-
"hardis:
|
|
5953
|
-
"
|
|
5954
|
-
"
|
|
5955
|
-
"
|
|
5956
|
-
"hardis:
|
|
5957
|
-
"
|
|
5958
|
-
"
|
|
5959
|
-
"
|
|
5960
|
-
"hardis:org:
|
|
5961
|
-
"org:hardis:
|
|
5962
|
-
"org:
|
|
5963
|
-
"org:
|
|
5964
|
-
"hardis:
|
|
5965
|
-
"
|
|
5966
|
-
"
|
|
5967
|
-
"
|
|
5968
|
-
"hardis:
|
|
5969
|
-
"
|
|
5970
|
-
"
|
|
5971
|
-
"
|
|
5951
|
+
"hardis:org:generate:packagexmlfull",
|
|
5952
|
+
"org:hardis:generate:packagexmlfull",
|
|
5953
|
+
"org:generate:hardis:packagexmlfull",
|
|
5954
|
+
"org:generate:packagexmlfull:hardis",
|
|
5955
|
+
"hardis:generate:org:packagexmlfull",
|
|
5956
|
+
"generate:hardis:org:packagexmlfull",
|
|
5957
|
+
"generate:org:hardis:packagexmlfull",
|
|
5958
|
+
"generate:org:packagexmlfull:hardis",
|
|
5959
|
+
"hardis:generate:packagexmlfull:org",
|
|
5960
|
+
"generate:hardis:packagexmlfull:org",
|
|
5961
|
+
"generate:packagexmlfull:hardis:org",
|
|
5962
|
+
"generate:packagexmlfull:org:hardis",
|
|
5963
|
+
"hardis:org:packagexmlfull:generate",
|
|
5964
|
+
"org:hardis:packagexmlfull:generate",
|
|
5965
|
+
"org:packagexmlfull:hardis:generate",
|
|
5966
|
+
"org:packagexmlfull:generate:hardis",
|
|
5967
|
+
"hardis:packagexmlfull:org:generate",
|
|
5968
|
+
"packagexmlfull:hardis:org:generate",
|
|
5969
|
+
"packagexmlfull:org:hardis:generate",
|
|
5970
|
+
"packagexmlfull:org:generate:hardis",
|
|
5971
|
+
"hardis:packagexmlfull:generate:org",
|
|
5972
|
+
"packagexmlfull:hardis:generate:org",
|
|
5973
|
+
"packagexmlfull:generate:hardis:org",
|
|
5974
|
+
"packagexmlfull:generate:org:hardis"
|
|
5972
5975
|
]
|
|
5973
5976
|
},
|
|
5974
|
-
"hardis:org:diagnose:
|
|
5977
|
+
"hardis:org:diagnose:audittrail": {
|
|
5975
5978
|
"aliases": [],
|
|
5976
5979
|
"args": {},
|
|
5977
|
-
"description": "
|
|
5980
|
+
"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",
|
|
5978
5981
|
"examples": [
|
|
5979
|
-
"$ sf hardis:org:diagnose:
|
|
5982
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5983
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5984
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5985
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5980
5986
|
],
|
|
5981
5987
|
"flags": {
|
|
5982
5988
|
"json": {
|
|
@@ -5994,6 +6000,22 @@
|
|
|
5994
6000
|
"multiple": false,
|
|
5995
6001
|
"type": "option"
|
|
5996
6002
|
},
|
|
6003
|
+
"excludeusers": {
|
|
6004
|
+
"char": "e",
|
|
6005
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
6006
|
+
"name": "excludeusers",
|
|
6007
|
+
"hasDynamicHelp": false,
|
|
6008
|
+
"multiple": false,
|
|
6009
|
+
"type": "option"
|
|
6010
|
+
},
|
|
6011
|
+
"lastndays": {
|
|
6012
|
+
"char": "t",
|
|
6013
|
+
"description": "Number of days to extract from today (included)",
|
|
6014
|
+
"name": "lastndays",
|
|
6015
|
+
"hasDynamicHelp": false,
|
|
6016
|
+
"multiple": false,
|
|
6017
|
+
"type": "option"
|
|
6018
|
+
},
|
|
5997
6019
|
"outputfile": {
|
|
5998
6020
|
"char": "f",
|
|
5999
6021
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6002,13 +6024,6 @@
|
|
|
6002
6024
|
"multiple": false,
|
|
6003
6025
|
"type": "option"
|
|
6004
6026
|
},
|
|
6005
|
-
"usedonly": {
|
|
6006
|
-
"char": "u",
|
|
6007
|
-
"description": "Filter to have only used licenses",
|
|
6008
|
-
"name": "usedonly",
|
|
6009
|
-
"allowNo": false,
|
|
6010
|
-
"type": "boolean"
|
|
6011
|
-
},
|
|
6012
6027
|
"debug": {
|
|
6013
6028
|
"char": "d",
|
|
6014
6029
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6047,13 +6062,13 @@
|
|
|
6047
6062
|
},
|
|
6048
6063
|
"hasDynamicHelp": true,
|
|
6049
6064
|
"hiddenAliases": [],
|
|
6050
|
-
"id": "hardis:org:diagnose:
|
|
6065
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
6051
6066
|
"pluginAlias": "sfdx-hardis",
|
|
6052
6067
|
"pluginName": "sfdx-hardis",
|
|
6053
6068
|
"pluginType": "core",
|
|
6054
6069
|
"strict": true,
|
|
6055
6070
|
"enableJsonFlag": true,
|
|
6056
|
-
"title": "
|
|
6071
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
6057
6072
|
"requiresProject": false,
|
|
6058
6073
|
"isESM": true,
|
|
6059
6074
|
"relativePath": [
|
|
@@ -6062,42 +6077,42 @@
|
|
|
6062
6077
|
"hardis",
|
|
6063
6078
|
"org",
|
|
6064
6079
|
"diagnose",
|
|
6065
|
-
"
|
|
6080
|
+
"audittrail.js"
|
|
6066
6081
|
],
|
|
6067
6082
|
"aliasPermutations": [],
|
|
6068
6083
|
"permutations": [
|
|
6069
|
-
"hardis:org:diagnose:
|
|
6070
|
-
"org:hardis:diagnose:
|
|
6071
|
-
"org:diagnose:hardis:
|
|
6072
|
-
"org:diagnose:
|
|
6073
|
-
"hardis:diagnose:org:
|
|
6074
|
-
"diagnose:hardis:org:
|
|
6075
|
-
"diagnose:org:hardis:
|
|
6076
|
-
"diagnose:org:
|
|
6077
|
-
"hardis:diagnose:
|
|
6078
|
-
"diagnose:hardis:
|
|
6079
|
-
"diagnose:
|
|
6080
|
-
"diagnose:
|
|
6081
|
-
"hardis:org:
|
|
6082
|
-
"org:hardis:
|
|
6083
|
-
"org:
|
|
6084
|
-
"org:
|
|
6085
|
-
"hardis:
|
|
6086
|
-
"
|
|
6087
|
-
"
|
|
6088
|
-
"
|
|
6089
|
-
"hardis:
|
|
6090
|
-
"
|
|
6091
|
-
"
|
|
6092
|
-
"
|
|
6084
|
+
"hardis:org:diagnose:audittrail",
|
|
6085
|
+
"org:hardis:diagnose:audittrail",
|
|
6086
|
+
"org:diagnose:hardis:audittrail",
|
|
6087
|
+
"org:diagnose:audittrail:hardis",
|
|
6088
|
+
"hardis:diagnose:org:audittrail",
|
|
6089
|
+
"diagnose:hardis:org:audittrail",
|
|
6090
|
+
"diagnose:org:hardis:audittrail",
|
|
6091
|
+
"diagnose:org:audittrail:hardis",
|
|
6092
|
+
"hardis:diagnose:audittrail:org",
|
|
6093
|
+
"diagnose:hardis:audittrail:org",
|
|
6094
|
+
"diagnose:audittrail:hardis:org",
|
|
6095
|
+
"diagnose:audittrail:org:hardis",
|
|
6096
|
+
"hardis:org:audittrail:diagnose",
|
|
6097
|
+
"org:hardis:audittrail:diagnose",
|
|
6098
|
+
"org:audittrail:hardis:diagnose",
|
|
6099
|
+
"org:audittrail:diagnose:hardis",
|
|
6100
|
+
"hardis:audittrail:org:diagnose",
|
|
6101
|
+
"audittrail:hardis:org:diagnose",
|
|
6102
|
+
"audittrail:org:hardis:diagnose",
|
|
6103
|
+
"audittrail:org:diagnose:hardis",
|
|
6104
|
+
"hardis:audittrail:diagnose:org",
|
|
6105
|
+
"audittrail:hardis:diagnose:org",
|
|
6106
|
+
"audittrail:diagnose:hardis:org",
|
|
6107
|
+
"audittrail:diagnose:org:hardis"
|
|
6093
6108
|
]
|
|
6094
6109
|
},
|
|
6095
|
-
"hardis:org:diagnose:
|
|
6110
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
6096
6111
|
"aliases": [],
|
|
6097
6112
|
"args": {},
|
|
6098
|
-
"description": "
|
|
6113
|
+
"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## Technical explanations\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",
|
|
6099
6114
|
"examples": [
|
|
6100
|
-
"$ sf hardis:org:diagnose:
|
|
6115
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
6101
6116
|
],
|
|
6102
6117
|
"flags": {
|
|
6103
6118
|
"json": {
|
|
@@ -6115,14 +6130,6 @@
|
|
|
6115
6130
|
"multiple": false,
|
|
6116
6131
|
"type": "option"
|
|
6117
6132
|
},
|
|
6118
|
-
"outputfile": {
|
|
6119
|
-
"char": "f",
|
|
6120
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6121
|
-
"name": "outputfile",
|
|
6122
|
-
"hasDynamicHelp": false,
|
|
6123
|
-
"multiple": false,
|
|
6124
|
-
"type": "option"
|
|
6125
|
-
},
|
|
6126
6133
|
"debug": {
|
|
6127
6134
|
"char": "d",
|
|
6128
6135
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6161,13 +6168,13 @@
|
|
|
6161
6168
|
},
|
|
6162
6169
|
"hasDynamicHelp": true,
|
|
6163
6170
|
"hiddenAliases": [],
|
|
6164
|
-
"id": "hardis:org:diagnose:
|
|
6171
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
6165
6172
|
"pluginAlias": "sfdx-hardis",
|
|
6166
6173
|
"pluginName": "sfdx-hardis",
|
|
6167
6174
|
"pluginType": "core",
|
|
6168
6175
|
"strict": true,
|
|
6169
6176
|
"enableJsonFlag": true,
|
|
6170
|
-
"title": "
|
|
6177
|
+
"title": "Get Instance Upgrade date",
|
|
6171
6178
|
"requiresProject": false,
|
|
6172
6179
|
"isESM": true,
|
|
6173
6180
|
"relativePath": [
|
|
@@ -6176,43 +6183,45 @@
|
|
|
6176
6183
|
"hardis",
|
|
6177
6184
|
"org",
|
|
6178
6185
|
"diagnose",
|
|
6179
|
-
"
|
|
6186
|
+
"instanceupgrade.js"
|
|
6180
6187
|
],
|
|
6181
6188
|
"aliasPermutations": [],
|
|
6182
6189
|
"permutations": [
|
|
6183
|
-
"hardis:org:diagnose:
|
|
6184
|
-
"org:hardis:diagnose:
|
|
6185
|
-
"org:diagnose:hardis:
|
|
6186
|
-
"org:diagnose:
|
|
6187
|
-
"hardis:diagnose:org:
|
|
6188
|
-
"diagnose:hardis:org:
|
|
6189
|
-
"diagnose:org:hardis:
|
|
6190
|
-
"diagnose:org:
|
|
6191
|
-
"hardis:diagnose:
|
|
6192
|
-
"diagnose:hardis:
|
|
6193
|
-
"diagnose:
|
|
6194
|
-
"diagnose:
|
|
6195
|
-
"hardis:org:
|
|
6196
|
-
"org:hardis:
|
|
6197
|
-
"org:
|
|
6198
|
-
"org:
|
|
6199
|
-
"hardis:
|
|
6200
|
-
"
|
|
6201
|
-
"
|
|
6202
|
-
"
|
|
6203
|
-
"hardis:
|
|
6204
|
-
"
|
|
6205
|
-
"
|
|
6206
|
-
"
|
|
6190
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
6191
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
6192
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
6193
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
6194
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
6195
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
6196
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
6197
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
6198
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
6199
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
6200
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
6201
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
6202
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
6203
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
6204
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
6205
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
6206
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
6207
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
6208
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
6209
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
6210
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
6211
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
6212
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
6213
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
6207
6214
|
]
|
|
6208
6215
|
},
|
|
6209
|
-
"hardis:org:diagnose:
|
|
6216
|
+
"hardis:org:diagnose:legacyapi": {
|
|
6210
6217
|
"aliases": [],
|
|
6211
6218
|
"args": {},
|
|
6212
|
-
"description": "
|
|
6219
|
+
"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",
|
|
6213
6220
|
"examples": [
|
|
6214
|
-
"$ sf hardis:org:diagnose:
|
|
6215
|
-
"$ sf hardis:org:diagnose:
|
|
6221
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
6222
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6223
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6224
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6216
6225
|
],
|
|
6217
6226
|
"flags": {
|
|
6218
6227
|
"json": {
|
|
@@ -6230,18 +6239,28 @@
|
|
|
6230
6239
|
"multiple": false,
|
|
6231
6240
|
"type": "option"
|
|
6232
6241
|
},
|
|
6233
|
-
"
|
|
6234
|
-
"char": "
|
|
6235
|
-
"description": "
|
|
6236
|
-
"name": "
|
|
6242
|
+
"eventtype": {
|
|
6243
|
+
"char": "e",
|
|
6244
|
+
"description": "Type of EventLogFile event to analyze",
|
|
6245
|
+
"name": "eventtype",
|
|
6246
|
+
"default": "ApiTotalUsage",
|
|
6237
6247
|
"hasDynamicHelp": false,
|
|
6238
6248
|
"multiple": false,
|
|
6239
6249
|
"type": "option"
|
|
6240
6250
|
},
|
|
6241
|
-
"
|
|
6242
|
-
"char": "
|
|
6243
|
-
"description": "
|
|
6244
|
-
"name": "
|
|
6251
|
+
"limit": {
|
|
6252
|
+
"char": "l",
|
|
6253
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
6254
|
+
"name": "limit",
|
|
6255
|
+
"default": 999,
|
|
6256
|
+
"hasDynamicHelp": false,
|
|
6257
|
+
"multiple": false,
|
|
6258
|
+
"type": "option"
|
|
6259
|
+
},
|
|
6260
|
+
"outputfile": {
|
|
6261
|
+
"char": "f",
|
|
6262
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6263
|
+
"name": "outputfile",
|
|
6245
6264
|
"hasDynamicHelp": false,
|
|
6246
6265
|
"multiple": false,
|
|
6247
6266
|
"type": "option"
|
|
@@ -6284,13 +6303,13 @@
|
|
|
6284
6303
|
},
|
|
6285
6304
|
"hasDynamicHelp": true,
|
|
6286
6305
|
"hiddenAliases": [],
|
|
6287
|
-
"id": "hardis:org:diagnose:
|
|
6306
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
6288
6307
|
"pluginAlias": "sfdx-hardis",
|
|
6289
6308
|
"pluginName": "sfdx-hardis",
|
|
6290
6309
|
"pluginType": "core",
|
|
6291
6310
|
"strict": true,
|
|
6292
6311
|
"enableJsonFlag": true,
|
|
6293
|
-
"title": "
|
|
6312
|
+
"title": "Check for legacy API use",
|
|
6294
6313
|
"requiresProject": false,
|
|
6295
6314
|
"isESM": true,
|
|
6296
6315
|
"relativePath": [
|
|
@@ -6299,42 +6318,42 @@
|
|
|
6299
6318
|
"hardis",
|
|
6300
6319
|
"org",
|
|
6301
6320
|
"diagnose",
|
|
6302
|
-
"
|
|
6321
|
+
"legacyapi.js"
|
|
6303
6322
|
],
|
|
6304
6323
|
"aliasPermutations": [],
|
|
6305
6324
|
"permutations": [
|
|
6306
|
-
"hardis:org:diagnose:
|
|
6307
|
-
"org:hardis:diagnose:
|
|
6308
|
-
"org:diagnose:hardis:
|
|
6309
|
-
"org:diagnose:
|
|
6310
|
-
"hardis:diagnose:org:
|
|
6311
|
-
"diagnose:hardis:org:
|
|
6312
|
-
"diagnose:org:hardis:
|
|
6313
|
-
"diagnose:org:
|
|
6314
|
-
"hardis:diagnose:
|
|
6315
|
-
"diagnose:hardis:
|
|
6316
|
-
"diagnose:
|
|
6317
|
-
"diagnose:
|
|
6318
|
-
"hardis:org:
|
|
6319
|
-
"org:hardis:
|
|
6320
|
-
"org:
|
|
6321
|
-
"org:
|
|
6322
|
-
"hardis:
|
|
6323
|
-
"
|
|
6324
|
-
"
|
|
6325
|
-
"
|
|
6326
|
-
"hardis:
|
|
6327
|
-
"
|
|
6328
|
-
"
|
|
6329
|
-
"
|
|
6325
|
+
"hardis:org:diagnose:legacyapi",
|
|
6326
|
+
"org:hardis:diagnose:legacyapi",
|
|
6327
|
+
"org:diagnose:hardis:legacyapi",
|
|
6328
|
+
"org:diagnose:legacyapi:hardis",
|
|
6329
|
+
"hardis:diagnose:org:legacyapi",
|
|
6330
|
+
"diagnose:hardis:org:legacyapi",
|
|
6331
|
+
"diagnose:org:hardis:legacyapi",
|
|
6332
|
+
"diagnose:org:legacyapi:hardis",
|
|
6333
|
+
"hardis:diagnose:legacyapi:org",
|
|
6334
|
+
"diagnose:hardis:legacyapi:org",
|
|
6335
|
+
"diagnose:legacyapi:hardis:org",
|
|
6336
|
+
"diagnose:legacyapi:org:hardis",
|
|
6337
|
+
"hardis:org:legacyapi:diagnose",
|
|
6338
|
+
"org:hardis:legacyapi:diagnose",
|
|
6339
|
+
"org:legacyapi:hardis:diagnose",
|
|
6340
|
+
"org:legacyapi:diagnose:hardis",
|
|
6341
|
+
"hardis:legacyapi:org:diagnose",
|
|
6342
|
+
"legacyapi:hardis:org:diagnose",
|
|
6343
|
+
"legacyapi:org:hardis:diagnose",
|
|
6344
|
+
"legacyapi:org:diagnose:hardis",
|
|
6345
|
+
"hardis:legacyapi:diagnose:org",
|
|
6346
|
+
"legacyapi:hardis:diagnose:org",
|
|
6347
|
+
"legacyapi:diagnose:hardis:org",
|
|
6348
|
+
"legacyapi:diagnose:org:hardis"
|
|
6330
6349
|
]
|
|
6331
6350
|
},
|
|
6332
|
-
"hardis:org:diagnose:
|
|
6351
|
+
"hardis:org:diagnose:licenses": {
|
|
6333
6352
|
"aliases": [],
|
|
6334
6353
|
"args": {},
|
|
6335
|
-
"description": "\n
|
|
6354
|
+
"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## Technical explanations\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",
|
|
6336
6355
|
"examples": [
|
|
6337
|
-
"$ sf hardis:org:diagnose:
|
|
6356
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
6338
6357
|
],
|
|
6339
6358
|
"flags": {
|
|
6340
6359
|
"json": {
|
|
@@ -6360,6 +6379,13 @@
|
|
|
6360
6379
|
"multiple": false,
|
|
6361
6380
|
"type": "option"
|
|
6362
6381
|
},
|
|
6382
|
+
"usedonly": {
|
|
6383
|
+
"char": "u",
|
|
6384
|
+
"description": "Filter to have only used licenses",
|
|
6385
|
+
"name": "usedonly",
|
|
6386
|
+
"allowNo": false,
|
|
6387
|
+
"type": "boolean"
|
|
6388
|
+
},
|
|
6363
6389
|
"debug": {
|
|
6364
6390
|
"char": "d",
|
|
6365
6391
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6398,30 +6424,13 @@
|
|
|
6398
6424
|
},
|
|
6399
6425
|
"hasDynamicHelp": true,
|
|
6400
6426
|
"hiddenAliases": [],
|
|
6401
|
-
"id": "hardis:org:diagnose:
|
|
6427
|
+
"id": "hardis:org:diagnose:licenses",
|
|
6402
6428
|
"pluginAlias": "sfdx-hardis",
|
|
6403
6429
|
"pluginName": "sfdx-hardis",
|
|
6404
6430
|
"pluginType": "core",
|
|
6405
6431
|
"strict": true,
|
|
6406
6432
|
"enableJsonFlag": true,
|
|
6407
|
-
"title": "
|
|
6408
|
-
"allowedInactiveConnectedApps": [
|
|
6409
|
-
"Ant Migration Tool",
|
|
6410
|
-
"Chatter Desktop",
|
|
6411
|
-
"Chatter Mobile for BlackBerry",
|
|
6412
|
-
"Force.com IDE",
|
|
6413
|
-
"OIQ_Integration",
|
|
6414
|
-
"Salesforce CLI",
|
|
6415
|
-
"Salesforce Files",
|
|
6416
|
-
"Salesforce Mobile Dashboards",
|
|
6417
|
-
"Salesforce Touch",
|
|
6418
|
-
"Salesforce for Outlook",
|
|
6419
|
-
"SalesforceA",
|
|
6420
|
-
"SalesforceA for Android",
|
|
6421
|
-
"SalesforceA for iOS",
|
|
6422
|
-
"SalesforceDX Namespace Registry",
|
|
6423
|
-
"SalesforceIQ"
|
|
6424
|
-
],
|
|
6433
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6425
6434
|
"requiresProject": false,
|
|
6426
6435
|
"isESM": true,
|
|
6427
6436
|
"relativePath": [
|
|
@@ -6430,43 +6439,42 @@
|
|
|
6430
6439
|
"hardis",
|
|
6431
6440
|
"org",
|
|
6432
6441
|
"diagnose",
|
|
6433
|
-
"
|
|
6442
|
+
"licenses.js"
|
|
6434
6443
|
],
|
|
6435
6444
|
"aliasPermutations": [],
|
|
6436
6445
|
"permutations": [
|
|
6437
|
-
"hardis:org:diagnose:
|
|
6438
|
-
"org:hardis:diagnose:
|
|
6439
|
-
"org:diagnose:hardis:
|
|
6440
|
-
"org:diagnose:
|
|
6441
|
-
"hardis:diagnose:org:
|
|
6442
|
-
"diagnose:hardis:org:
|
|
6443
|
-
"diagnose:org:hardis:
|
|
6444
|
-
"diagnose:org:
|
|
6445
|
-
"hardis:diagnose:
|
|
6446
|
-
"diagnose:hardis:
|
|
6447
|
-
"diagnose:
|
|
6448
|
-
"diagnose:
|
|
6449
|
-
"hardis:org:
|
|
6450
|
-
"org:hardis:
|
|
6451
|
-
"org:
|
|
6452
|
-
"org:
|
|
6453
|
-
"hardis:
|
|
6454
|
-
"
|
|
6455
|
-
"
|
|
6456
|
-
"
|
|
6457
|
-
"hardis:
|
|
6458
|
-
"
|
|
6459
|
-
"
|
|
6460
|
-
"
|
|
6461
|
-
]
|
|
6446
|
+
"hardis:org:diagnose:licenses",
|
|
6447
|
+
"org:hardis:diagnose:licenses",
|
|
6448
|
+
"org:diagnose:hardis:licenses",
|
|
6449
|
+
"org:diagnose:licenses:hardis",
|
|
6450
|
+
"hardis:diagnose:org:licenses",
|
|
6451
|
+
"diagnose:hardis:org:licenses",
|
|
6452
|
+
"diagnose:org:hardis:licenses",
|
|
6453
|
+
"diagnose:org:licenses:hardis",
|
|
6454
|
+
"hardis:diagnose:licenses:org",
|
|
6455
|
+
"diagnose:hardis:licenses:org",
|
|
6456
|
+
"diagnose:licenses:hardis:org",
|
|
6457
|
+
"diagnose:licenses:org:hardis",
|
|
6458
|
+
"hardis:org:licenses:diagnose",
|
|
6459
|
+
"org:hardis:licenses:diagnose",
|
|
6460
|
+
"org:licenses:hardis:diagnose",
|
|
6461
|
+
"org:licenses:diagnose:hardis",
|
|
6462
|
+
"hardis:licenses:org:diagnose",
|
|
6463
|
+
"licenses:hardis:org:diagnose",
|
|
6464
|
+
"licenses:org:hardis:diagnose",
|
|
6465
|
+
"licenses:org:diagnose:hardis",
|
|
6466
|
+
"hardis:licenses:diagnose:org",
|
|
6467
|
+
"licenses:hardis:diagnose:org",
|
|
6468
|
+
"licenses:diagnose:hardis:org",
|
|
6469
|
+
"licenses:diagnose:org:hardis"
|
|
6470
|
+
]
|
|
6462
6471
|
},
|
|
6463
|
-
"hardis:org:diagnose:
|
|
6472
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6464
6473
|
"aliases": [],
|
|
6465
6474
|
"args": {},
|
|
6466
|
-
"description": "
|
|
6475
|
+
"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",
|
|
6467
6476
|
"examples": [
|
|
6468
|
-
"$ sf hardis:org:diagnose:
|
|
6469
|
-
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6477
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6470
6478
|
],
|
|
6471
6479
|
"flags": {
|
|
6472
6480
|
"json": {
|
|
@@ -6530,32 +6538,14 @@
|
|
|
6530
6538
|
},
|
|
6531
6539
|
"hasDynamicHelp": true,
|
|
6532
6540
|
"hiddenAliases": [],
|
|
6533
|
-
"id": "hardis:org:diagnose:
|
|
6541
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6534
6542
|
"pluginAlias": "sfdx-hardis",
|
|
6535
6543
|
"pluginName": "sfdx-hardis",
|
|
6536
6544
|
"pluginType": "core",
|
|
6537
6545
|
"strict": true,
|
|
6538
6546
|
"enableJsonFlag": true,
|
|
6539
|
-
"title": "
|
|
6547
|
+
"title": "Check Release Updates of an org",
|
|
6540
6548
|
"requiresProject": false,
|
|
6541
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
6542
|
-
"Sales_User"
|
|
6543
|
-
],
|
|
6544
|
-
"permSetsPermSetLicenses": [
|
|
6545
|
-
{
|
|
6546
|
-
"permSet": "Sales_User",
|
|
6547
|
-
"permSetLicense": "SalesUserPsl"
|
|
6548
|
-
}
|
|
6549
|
-
],
|
|
6550
|
-
"profilesPermissionSetLicenses": [
|
|
6551
|
-
{
|
|
6552
|
-
"profile": "Salesforce API Only",
|
|
6553
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6554
|
-
}
|
|
6555
|
-
],
|
|
6556
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6557
|
-
"IdentityConnect"
|
|
6558
|
-
],
|
|
6559
6549
|
"isESM": true,
|
|
6560
6550
|
"relativePath": [
|
|
6561
6551
|
"lib",
|
|
@@ -6563,46 +6553,43 @@
|
|
|
6563
6553
|
"hardis",
|
|
6564
6554
|
"org",
|
|
6565
6555
|
"diagnose",
|
|
6566
|
-
"
|
|
6556
|
+
"releaseupdates.js"
|
|
6567
6557
|
],
|
|
6568
6558
|
"aliasPermutations": [],
|
|
6569
6559
|
"permutations": [
|
|
6570
|
-
"hardis:org:diagnose:
|
|
6571
|
-
"org:hardis:diagnose:
|
|
6572
|
-
"org:diagnose:hardis:
|
|
6573
|
-
"org:diagnose:
|
|
6574
|
-
"hardis:diagnose:org:
|
|
6575
|
-
"diagnose:hardis:org:
|
|
6576
|
-
"diagnose:org:hardis:
|
|
6577
|
-
"diagnose:org:
|
|
6578
|
-
"hardis:diagnose:
|
|
6579
|
-
"diagnose:hardis:
|
|
6580
|
-
"diagnose:
|
|
6581
|
-
"diagnose:
|
|
6582
|
-
"hardis:org:
|
|
6583
|
-
"org:hardis:
|
|
6584
|
-
"org:
|
|
6585
|
-
"org:
|
|
6586
|
-
"hardis:
|
|
6587
|
-
"
|
|
6588
|
-
"
|
|
6589
|
-
"
|
|
6590
|
-
"hardis:
|
|
6591
|
-
"
|
|
6592
|
-
"
|
|
6593
|
-
"
|
|
6560
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6561
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6562
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6563
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6564
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6565
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6566
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6567
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6568
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6569
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6570
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6571
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6572
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6573
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6574
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6575
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6576
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6577
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6578
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6579
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6580
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6581
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6582
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6583
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6594
6584
|
]
|
|
6595
6585
|
},
|
|
6596
|
-
"hardis:org:diagnose:
|
|
6586
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6597
6587
|
"aliases": [],
|
|
6598
6588
|
"args": {},
|
|
6599
|
-
"description": "
|
|
6589
|
+
"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",
|
|
6600
6590
|
"examples": [
|
|
6601
|
-
"$ sf hardis:org:diagnose:
|
|
6602
|
-
"$ sf hardis:org:diagnose:
|
|
6603
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6604
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6605
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6591
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6592
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6606
6593
|
],
|
|
6607
6594
|
"flags": {
|
|
6608
6595
|
"json": {
|
|
@@ -6636,33 +6623,6 @@
|
|
|
6636
6623
|
"multiple": false,
|
|
6637
6624
|
"type": "option"
|
|
6638
6625
|
},
|
|
6639
|
-
"licensetypes": {
|
|
6640
|
-
"char": "l",
|
|
6641
|
-
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6642
|
-
"name": "licensetypes",
|
|
6643
|
-
"hasDynamicHelp": false,
|
|
6644
|
-
"multiple": false,
|
|
6645
|
-
"options": [
|
|
6646
|
-
"all",
|
|
6647
|
-
"all-crm",
|
|
6648
|
-
"all-paying"
|
|
6649
|
-
],
|
|
6650
|
-
"type": "option"
|
|
6651
|
-
},
|
|
6652
|
-
"licenseidentifiers": {
|
|
6653
|
-
"char": "i",
|
|
6654
|
-
"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",
|
|
6655
|
-
"name": "licenseidentifiers",
|
|
6656
|
-
"hasDynamicHelp": false,
|
|
6657
|
-
"multiple": false,
|
|
6658
|
-
"type": "option"
|
|
6659
|
-
},
|
|
6660
|
-
"returnactiveusers": {
|
|
6661
|
-
"description": "Inverts the command by returning the active users",
|
|
6662
|
-
"name": "returnactiveusers",
|
|
6663
|
-
"allowNo": false,
|
|
6664
|
-
"type": "boolean"
|
|
6665
|
-
},
|
|
6666
6626
|
"debug": {
|
|
6667
6627
|
"char": "d",
|
|
6668
6628
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6701,13 +6661,13 @@
|
|
|
6701
6661
|
},
|
|
6702
6662
|
"hasDynamicHelp": true,
|
|
6703
6663
|
"hiddenAliases": [],
|
|
6704
|
-
"id": "hardis:org:diagnose:
|
|
6664
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6705
6665
|
"pluginAlias": "sfdx-hardis",
|
|
6706
6666
|
"pluginName": "sfdx-hardis",
|
|
6707
6667
|
"pluginType": "core",
|
|
6708
6668
|
"strict": true,
|
|
6709
6669
|
"enableJsonFlag": true,
|
|
6710
|
-
"title": "Detect unused
|
|
6670
|
+
"title": "Detect unused Apex classes in an org",
|
|
6711
6671
|
"requiresProject": false,
|
|
6712
6672
|
"isESM": true,
|
|
6713
6673
|
"relativePath": [
|
|
@@ -6716,42 +6676,42 @@
|
|
|
6716
6676
|
"hardis",
|
|
6717
6677
|
"org",
|
|
6718
6678
|
"diagnose",
|
|
6719
|
-
"
|
|
6679
|
+
"unused-apex-classes.js"
|
|
6720
6680
|
],
|
|
6721
6681
|
"aliasPermutations": [],
|
|
6722
6682
|
"permutations": [
|
|
6723
|
-
"hardis:org:diagnose:
|
|
6724
|
-
"org:hardis:diagnose:
|
|
6725
|
-
"org:diagnose:hardis:
|
|
6726
|
-
"org:diagnose:
|
|
6727
|
-
"hardis:diagnose:org:
|
|
6728
|
-
"diagnose:hardis:org:
|
|
6729
|
-
"diagnose:org:hardis:
|
|
6730
|
-
"diagnose:org:
|
|
6731
|
-
"hardis:diagnose:
|
|
6732
|
-
"diagnose:hardis:
|
|
6733
|
-
"diagnose:
|
|
6734
|
-
"diagnose:
|
|
6735
|
-
"hardis:org:
|
|
6736
|
-
"org:hardis:
|
|
6737
|
-
"org:
|
|
6738
|
-
"org:
|
|
6739
|
-
"hardis:
|
|
6740
|
-
"
|
|
6741
|
-
"
|
|
6742
|
-
"
|
|
6743
|
-
"hardis:
|
|
6744
|
-
"
|
|
6745
|
-
"
|
|
6746
|
-
"
|
|
6683
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6684
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6685
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6686
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6687
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6688
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6689
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6690
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6691
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6692
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6693
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6694
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6695
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6696
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6697
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6698
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6699
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6700
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6701
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6702
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6703
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6704
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6705
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6706
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6747
6707
|
]
|
|
6748
6708
|
},
|
|
6749
|
-
"hardis:org:
|
|
6709
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6750
6710
|
"aliases": [],
|
|
6751
6711
|
"args": {},
|
|
6752
|
-
"description": "\n## Command Behavior\n\n**
|
|
6712
|
+
"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## Technical explanations\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",
|
|
6753
6713
|
"examples": [
|
|
6754
|
-
"$ sf hardis:org:
|
|
6714
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6755
6715
|
],
|
|
6756
6716
|
"flags": {
|
|
6757
6717
|
"json": {
|
|
@@ -6769,37 +6729,10 @@
|
|
|
6769
6729
|
"multiple": false,
|
|
6770
6730
|
"type": "option"
|
|
6771
6731
|
},
|
|
6772
|
-
"
|
|
6773
|
-
"char": "
|
|
6774
|
-
"description": "
|
|
6775
|
-
"name": "
|
|
6776
|
-
"hasDynamicHelp": false,
|
|
6777
|
-
"multiple": false,
|
|
6778
|
-
"type": "option"
|
|
6779
|
-
},
|
|
6780
|
-
"chunksize": {
|
|
6781
|
-
"char": "c",
|
|
6782
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
6783
|
-
"name": "chunksize",
|
|
6784
|
-
"default": 1000,
|
|
6785
|
-
"hasDynamicHelp": false,
|
|
6786
|
-
"multiple": false,
|
|
6787
|
-
"type": "option"
|
|
6788
|
-
},
|
|
6789
|
-
"polltimeout": {
|
|
6790
|
-
"char": "t",
|
|
6791
|
-
"description": "Timeout in MS for Bulk API calls",
|
|
6792
|
-
"name": "polltimeout",
|
|
6793
|
-
"default": 300000,
|
|
6794
|
-
"hasDynamicHelp": false,
|
|
6795
|
-
"multiple": false,
|
|
6796
|
-
"type": "option"
|
|
6797
|
-
},
|
|
6798
|
-
"startchunknumber": {
|
|
6799
|
-
"char": "s",
|
|
6800
|
-
"description": "Chunk number to start from",
|
|
6801
|
-
"name": "startchunknumber",
|
|
6802
|
-
"default": 0,
|
|
6732
|
+
"outputfile": {
|
|
6733
|
+
"char": "f",
|
|
6734
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6735
|
+
"name": "outputfile",
|
|
6803
6736
|
"hasDynamicHelp": false,
|
|
6804
6737
|
"multiple": false,
|
|
6805
6738
|
"type": "option"
|
|
@@ -6842,13 +6775,30 @@
|
|
|
6842
6775
|
},
|
|
6843
6776
|
"hasDynamicHelp": true,
|
|
6844
6777
|
"hiddenAliases": [],
|
|
6845
|
-
"id": "hardis:org:
|
|
6778
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6846
6779
|
"pluginAlias": "sfdx-hardis",
|
|
6847
6780
|
"pluginName": "sfdx-hardis",
|
|
6848
6781
|
"pluginType": "core",
|
|
6849
6782
|
"strict": true,
|
|
6850
6783
|
"enableJsonFlag": true,
|
|
6851
|
-
"title": "
|
|
6784
|
+
"title": "Unused Connected Apps in an org",
|
|
6785
|
+
"allowedInactiveConnectedApps": [
|
|
6786
|
+
"Ant Migration Tool",
|
|
6787
|
+
"Chatter Desktop",
|
|
6788
|
+
"Chatter Mobile for BlackBerry",
|
|
6789
|
+
"Force.com IDE",
|
|
6790
|
+
"OIQ_Integration",
|
|
6791
|
+
"Salesforce CLI",
|
|
6792
|
+
"Salesforce Files",
|
|
6793
|
+
"Salesforce Mobile Dashboards",
|
|
6794
|
+
"Salesforce Touch",
|
|
6795
|
+
"Salesforce for Outlook",
|
|
6796
|
+
"SalesforceA",
|
|
6797
|
+
"SalesforceA for Android",
|
|
6798
|
+
"SalesforceA for iOS",
|
|
6799
|
+
"SalesforceDX Namespace Registry",
|
|
6800
|
+
"SalesforceIQ"
|
|
6801
|
+
],
|
|
6852
6802
|
"requiresProject": false,
|
|
6853
6803
|
"isESM": true,
|
|
6854
6804
|
"relativePath": [
|
|
@@ -6856,43 +6806,44 @@
|
|
|
6856
6806
|
"commands",
|
|
6857
6807
|
"hardis",
|
|
6858
6808
|
"org",
|
|
6859
|
-
"
|
|
6860
|
-
"
|
|
6809
|
+
"diagnose",
|
|
6810
|
+
"unused-connected-apps.js"
|
|
6861
6811
|
],
|
|
6862
6812
|
"aliasPermutations": [],
|
|
6863
6813
|
"permutations": [
|
|
6864
|
-
"hardis:org:
|
|
6865
|
-
"org:hardis:
|
|
6866
|
-
"org:
|
|
6867
|
-
"org:
|
|
6868
|
-
"hardis:
|
|
6869
|
-
"
|
|
6870
|
-
"
|
|
6871
|
-
"
|
|
6872
|
-
"hardis:
|
|
6873
|
-
"
|
|
6874
|
-
"
|
|
6875
|
-
"
|
|
6876
|
-
"hardis:org:
|
|
6877
|
-
"org:hardis:
|
|
6878
|
-
"org:
|
|
6879
|
-
"org:
|
|
6880
|
-
"hardis:
|
|
6881
|
-
"
|
|
6882
|
-
"
|
|
6883
|
-
"
|
|
6884
|
-
"hardis:
|
|
6885
|
-
"
|
|
6886
|
-
"
|
|
6887
|
-
"
|
|
6814
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6815
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6816
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6817
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6818
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6819
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6820
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6821
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6822
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6823
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6824
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6825
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6826
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6827
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6828
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6829
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6830
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6831
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6832
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6833
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6834
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6835
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6836
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6837
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6888
6838
|
]
|
|
6889
6839
|
},
|
|
6890
|
-
"hardis:org:
|
|
6840
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6891
6841
|
"aliases": [],
|
|
6892
6842
|
"args": {},
|
|
6893
|
-
"description": "\
|
|
6843
|
+
"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## Technical explanations\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",
|
|
6894
6844
|
"examples": [
|
|
6895
|
-
"$ sf hardis:org:
|
|
6845
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6846
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6896
6847
|
],
|
|
6897
6848
|
"flags": {
|
|
6898
6849
|
"json": {
|
|
@@ -6910,21 +6861,14 @@
|
|
|
6910
6861
|
"multiple": false,
|
|
6911
6862
|
"type": "option"
|
|
6912
6863
|
},
|
|
6913
|
-
"
|
|
6914
|
-
"char": "
|
|
6915
|
-
"description": "
|
|
6916
|
-
"name": "
|
|
6864
|
+
"outputfile": {
|
|
6865
|
+
"char": "f",
|
|
6866
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6867
|
+
"name": "outputfile",
|
|
6917
6868
|
"hasDynamicHelp": false,
|
|
6918
6869
|
"multiple": false,
|
|
6919
6870
|
"type": "option"
|
|
6920
6871
|
},
|
|
6921
|
-
"overwrite": {
|
|
6922
|
-
"char": "f",
|
|
6923
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
6924
|
-
"name": "overwrite",
|
|
6925
|
-
"allowNo": false,
|
|
6926
|
-
"type": "boolean"
|
|
6927
|
-
},
|
|
6928
6872
|
"debug": {
|
|
6929
6873
|
"char": "d",
|
|
6930
6874
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6963,59 +6907,79 @@
|
|
|
6963
6907
|
},
|
|
6964
6908
|
"hasDynamicHelp": true,
|
|
6965
6909
|
"hiddenAliases": [],
|
|
6966
|
-
"id": "hardis:org:
|
|
6910
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
6967
6911
|
"pluginAlias": "sfdx-hardis",
|
|
6968
6912
|
"pluginName": "sfdx-hardis",
|
|
6969
6913
|
"pluginType": "core",
|
|
6970
6914
|
"strict": true,
|
|
6971
6915
|
"enableJsonFlag": true,
|
|
6972
|
-
"title": "
|
|
6916
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
6973
6917
|
"requiresProject": false,
|
|
6918
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6919
|
+
"Sales_User"
|
|
6920
|
+
],
|
|
6921
|
+
"permSetsPermSetLicenses": [
|
|
6922
|
+
{
|
|
6923
|
+
"permSet": "Sales_User",
|
|
6924
|
+
"permSetLicense": "SalesUserPsl"
|
|
6925
|
+
}
|
|
6926
|
+
],
|
|
6927
|
+
"profilesPermissionSetLicenses": [
|
|
6928
|
+
{
|
|
6929
|
+
"profile": "Salesforce API Only",
|
|
6930
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6931
|
+
}
|
|
6932
|
+
],
|
|
6933
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6934
|
+
"IdentityConnect"
|
|
6935
|
+
],
|
|
6974
6936
|
"isESM": true,
|
|
6975
6937
|
"relativePath": [
|
|
6976
6938
|
"lib",
|
|
6977
6939
|
"commands",
|
|
6978
6940
|
"hardis",
|
|
6979
6941
|
"org",
|
|
6980
|
-
"
|
|
6981
|
-
"
|
|
6942
|
+
"diagnose",
|
|
6943
|
+
"unusedlicenses.js"
|
|
6982
6944
|
],
|
|
6983
6945
|
"aliasPermutations": [],
|
|
6984
6946
|
"permutations": [
|
|
6985
|
-
"hardis:org:
|
|
6986
|
-
"org:hardis:
|
|
6987
|
-
"org:
|
|
6988
|
-
"org:
|
|
6989
|
-
"hardis:
|
|
6990
|
-
"
|
|
6991
|
-
"
|
|
6992
|
-
"
|
|
6993
|
-
"hardis:
|
|
6994
|
-
"
|
|
6995
|
-
"
|
|
6996
|
-
"
|
|
6997
|
-
"hardis:org:
|
|
6998
|
-
"org:hardis:
|
|
6999
|
-
"org:
|
|
7000
|
-
"org:
|
|
7001
|
-
"hardis:
|
|
7002
|
-
"
|
|
7003
|
-
"
|
|
7004
|
-
"
|
|
7005
|
-
"hardis:
|
|
7006
|
-
"
|
|
7007
|
-
"
|
|
7008
|
-
"
|
|
6947
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
6948
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
6949
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
6950
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
6951
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
6952
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
6953
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
6954
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
6955
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
6956
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
6957
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
6958
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
6959
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
6960
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
6961
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
6962
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
6963
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
6964
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
6965
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
6966
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
6967
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
6968
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
6969
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
6970
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
7009
6971
|
]
|
|
7010
6972
|
},
|
|
7011
|
-
"hardis:org:
|
|
6973
|
+
"hardis:org:diagnose:unusedusers": {
|
|
7012
6974
|
"aliases": [],
|
|
7013
6975
|
"args": {},
|
|
7014
|
-
"description": "\n## Command Behavior\n\n**
|
|
6976
|
+
"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## Technical explanations\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",
|
|
7015
6977
|
"examples": [
|
|
7016
|
-
"$ sf hardis:org:
|
|
7017
|
-
"$ sf hardis:org:
|
|
7018
|
-
"$ sf hardis:org:
|
|
6978
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
6979
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6980
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6981
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6982
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7019
6983
|
],
|
|
7020
6984
|
"flags": {
|
|
7021
6985
|
"json": {
|
|
@@ -7034,12 +6998,48 @@
|
|
|
7034
6998
|
"type": "option"
|
|
7035
6999
|
},
|
|
7036
7000
|
"outputfile": {
|
|
7037
|
-
"
|
|
7001
|
+
"char": "f",
|
|
7002
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7038
7003
|
"name": "outputfile",
|
|
7039
7004
|
"hasDynamicHelp": false,
|
|
7040
7005
|
"multiple": false,
|
|
7041
7006
|
"type": "option"
|
|
7042
7007
|
},
|
|
7008
|
+
"days": {
|
|
7009
|
+
"char": "t",
|
|
7010
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7011
|
+
"name": "days",
|
|
7012
|
+
"hasDynamicHelp": false,
|
|
7013
|
+
"multiple": false,
|
|
7014
|
+
"type": "option"
|
|
7015
|
+
},
|
|
7016
|
+
"licensetypes": {
|
|
7017
|
+
"char": "l",
|
|
7018
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
7019
|
+
"name": "licensetypes",
|
|
7020
|
+
"hasDynamicHelp": false,
|
|
7021
|
+
"multiple": false,
|
|
7022
|
+
"options": [
|
|
7023
|
+
"all",
|
|
7024
|
+
"all-crm",
|
|
7025
|
+
"all-paying"
|
|
7026
|
+
],
|
|
7027
|
+
"type": "option"
|
|
7028
|
+
},
|
|
7029
|
+
"licenseidentifiers": {
|
|
7030
|
+
"char": "i",
|
|
7031
|
+
"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",
|
|
7032
|
+
"name": "licenseidentifiers",
|
|
7033
|
+
"hasDynamicHelp": false,
|
|
7034
|
+
"multiple": false,
|
|
7035
|
+
"type": "option"
|
|
7036
|
+
},
|
|
7037
|
+
"returnactiveusers": {
|
|
7038
|
+
"description": "Inverts the command by returning the active users",
|
|
7039
|
+
"name": "returnactiveusers",
|
|
7040
|
+
"allowNo": false,
|
|
7041
|
+
"type": "boolean"
|
|
7042
|
+
},
|
|
7043
7043
|
"debug": {
|
|
7044
7044
|
"char": "d",
|
|
7045
7045
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7078,13 +7078,13 @@
|
|
|
7078
7078
|
},
|
|
7079
7079
|
"hasDynamicHelp": true,
|
|
7080
7080
|
"hiddenAliases": [],
|
|
7081
|
-
"id": "hardis:org:
|
|
7081
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
7082
7082
|
"pluginAlias": "sfdx-hardis",
|
|
7083
7083
|
"pluginName": "sfdx-hardis",
|
|
7084
7084
|
"pluginType": "core",
|
|
7085
7085
|
"strict": true,
|
|
7086
7086
|
"enableJsonFlag": true,
|
|
7087
|
-
"title": "
|
|
7087
|
+
"title": "Detect unused Users in Salesforce",
|
|
7088
7088
|
"requiresProject": false,
|
|
7089
7089
|
"isESM": true,
|
|
7090
7090
|
"relativePath": [
|
|
@@ -7092,35 +7092,35 @@
|
|
|
7092
7092
|
"commands",
|
|
7093
7093
|
"hardis",
|
|
7094
7094
|
"org",
|
|
7095
|
-
"
|
|
7096
|
-
"
|
|
7095
|
+
"diagnose",
|
|
7096
|
+
"unusedusers.js"
|
|
7097
7097
|
],
|
|
7098
7098
|
"aliasPermutations": [],
|
|
7099
7099
|
"permutations": [
|
|
7100
|
-
"hardis:org:
|
|
7101
|
-
"org:hardis:
|
|
7102
|
-
"org:
|
|
7103
|
-
"org:
|
|
7104
|
-
"hardis:
|
|
7105
|
-
"
|
|
7106
|
-
"
|
|
7107
|
-
"
|
|
7108
|
-
"hardis:
|
|
7109
|
-
"
|
|
7110
|
-
"
|
|
7111
|
-
"
|
|
7112
|
-
"hardis:org:
|
|
7113
|
-
"org:hardis:
|
|
7114
|
-
"org:
|
|
7115
|
-
"org:
|
|
7116
|
-
"hardis:
|
|
7117
|
-
"
|
|
7118
|
-
"
|
|
7119
|
-
"
|
|
7120
|
-
"hardis:
|
|
7121
|
-
"
|
|
7122
|
-
"
|
|
7123
|
-
"
|
|
7100
|
+
"hardis:org:diagnose:unusedusers",
|
|
7101
|
+
"org:hardis:diagnose:unusedusers",
|
|
7102
|
+
"org:diagnose:hardis:unusedusers",
|
|
7103
|
+
"org:diagnose:unusedusers:hardis",
|
|
7104
|
+
"hardis:diagnose:org:unusedusers",
|
|
7105
|
+
"diagnose:hardis:org:unusedusers",
|
|
7106
|
+
"diagnose:org:hardis:unusedusers",
|
|
7107
|
+
"diagnose:org:unusedusers:hardis",
|
|
7108
|
+
"hardis:diagnose:unusedusers:org",
|
|
7109
|
+
"diagnose:hardis:unusedusers:org",
|
|
7110
|
+
"diagnose:unusedusers:hardis:org",
|
|
7111
|
+
"diagnose:unusedusers:org:hardis",
|
|
7112
|
+
"hardis:org:unusedusers:diagnose",
|
|
7113
|
+
"org:hardis:unusedusers:diagnose",
|
|
7114
|
+
"org:unusedusers:hardis:diagnose",
|
|
7115
|
+
"org:unusedusers:diagnose:hardis",
|
|
7116
|
+
"hardis:unusedusers:org:diagnose",
|
|
7117
|
+
"unusedusers:hardis:org:diagnose",
|
|
7118
|
+
"unusedusers:org:hardis:diagnose",
|
|
7119
|
+
"unusedusers:org:diagnose:hardis",
|
|
7120
|
+
"hardis:unusedusers:diagnose:org",
|
|
7121
|
+
"unusedusers:hardis:diagnose:org",
|
|
7122
|
+
"unusedusers:diagnose:hardis:org",
|
|
7123
|
+
"unusedusers:diagnose:org:hardis"
|
|
7124
7124
|
]
|
|
7125
7125
|
},
|
|
7126
7126
|
"hardis:org:monitor:all": {
|
|
@@ -9260,6 +9260,109 @@
|
|
|
9260
9260
|
"remotesites:audit:project:hardis"
|
|
9261
9261
|
]
|
|
9262
9262
|
},
|
|
9263
|
+
"hardis:project:convert:profilestopermsets": {
|
|
9264
|
+
"aliases": [],
|
|
9265
|
+
"args": {},
|
|
9266
|
+
"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## Technical explanations\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",
|
|
9267
|
+
"examples": [
|
|
9268
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
9269
|
+
],
|
|
9270
|
+
"flags": {
|
|
9271
|
+
"json": {
|
|
9272
|
+
"description": "Format output as json.",
|
|
9273
|
+
"helpGroup": "GLOBAL",
|
|
9274
|
+
"name": "json",
|
|
9275
|
+
"allowNo": false,
|
|
9276
|
+
"type": "boolean"
|
|
9277
|
+
},
|
|
9278
|
+
"flags-dir": {
|
|
9279
|
+
"helpGroup": "GLOBAL",
|
|
9280
|
+
"name": "flags-dir",
|
|
9281
|
+
"summary": "Import flag values from a directory.",
|
|
9282
|
+
"hasDynamicHelp": false,
|
|
9283
|
+
"multiple": false,
|
|
9284
|
+
"type": "option"
|
|
9285
|
+
},
|
|
9286
|
+
"except": {
|
|
9287
|
+
"char": "e",
|
|
9288
|
+
"description": "List of filters",
|
|
9289
|
+
"name": "except",
|
|
9290
|
+
"default": [],
|
|
9291
|
+
"hasDynamicHelp": false,
|
|
9292
|
+
"multiple": true,
|
|
9293
|
+
"type": "option"
|
|
9294
|
+
},
|
|
9295
|
+
"debug": {
|
|
9296
|
+
"char": "d",
|
|
9297
|
+
"description": "Activate debug mode (more logs)",
|
|
9298
|
+
"name": "debug",
|
|
9299
|
+
"allowNo": false,
|
|
9300
|
+
"type": "boolean"
|
|
9301
|
+
},
|
|
9302
|
+
"websocket": {
|
|
9303
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9304
|
+
"name": "websocket",
|
|
9305
|
+
"hasDynamicHelp": false,
|
|
9306
|
+
"multiple": false,
|
|
9307
|
+
"type": "option"
|
|
9308
|
+
},
|
|
9309
|
+
"skipauth": {
|
|
9310
|
+
"description": "Skip authentication check when a default username is required",
|
|
9311
|
+
"name": "skipauth",
|
|
9312
|
+
"allowNo": false,
|
|
9313
|
+
"type": "boolean"
|
|
9314
|
+
}
|
|
9315
|
+
},
|
|
9316
|
+
"hasDynamicHelp": false,
|
|
9317
|
+
"hiddenAliases": [],
|
|
9318
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
9319
|
+
"pluginAlias": "sfdx-hardis",
|
|
9320
|
+
"pluginName": "sfdx-hardis",
|
|
9321
|
+
"pluginType": "core",
|
|
9322
|
+
"strict": true,
|
|
9323
|
+
"enableJsonFlag": true,
|
|
9324
|
+
"title": "Convert Profiles into Permission Sets",
|
|
9325
|
+
"requiresProject": true,
|
|
9326
|
+
"requiresSfdxPlugins": [
|
|
9327
|
+
"shane-sfdx-plugins"
|
|
9328
|
+
],
|
|
9329
|
+
"isESM": true,
|
|
9330
|
+
"relativePath": [
|
|
9331
|
+
"lib",
|
|
9332
|
+
"commands",
|
|
9333
|
+
"hardis",
|
|
9334
|
+
"project",
|
|
9335
|
+
"convert",
|
|
9336
|
+
"profilestopermsets.js"
|
|
9337
|
+
],
|
|
9338
|
+
"aliasPermutations": [],
|
|
9339
|
+
"permutations": [
|
|
9340
|
+
"hardis:project:convert:profilestopermsets",
|
|
9341
|
+
"project:hardis:convert:profilestopermsets",
|
|
9342
|
+
"project:convert:hardis:profilestopermsets",
|
|
9343
|
+
"project:convert:profilestopermsets:hardis",
|
|
9344
|
+
"hardis:convert:project:profilestopermsets",
|
|
9345
|
+
"convert:hardis:project:profilestopermsets",
|
|
9346
|
+
"convert:project:hardis:profilestopermsets",
|
|
9347
|
+
"convert:project:profilestopermsets:hardis",
|
|
9348
|
+
"hardis:convert:profilestopermsets:project",
|
|
9349
|
+
"convert:hardis:profilestopermsets:project",
|
|
9350
|
+
"convert:profilestopermsets:hardis:project",
|
|
9351
|
+
"convert:profilestopermsets:project:hardis",
|
|
9352
|
+
"hardis:project:profilestopermsets:convert",
|
|
9353
|
+
"project:hardis:profilestopermsets:convert",
|
|
9354
|
+
"project:profilestopermsets:hardis:convert",
|
|
9355
|
+
"project:profilestopermsets:convert:hardis",
|
|
9356
|
+
"hardis:profilestopermsets:project:convert",
|
|
9357
|
+
"profilestopermsets:hardis:project:convert",
|
|
9358
|
+
"profilestopermsets:project:hardis:convert",
|
|
9359
|
+
"profilestopermsets:project:convert:hardis",
|
|
9360
|
+
"hardis:profilestopermsets:convert:project",
|
|
9361
|
+
"profilestopermsets:hardis:convert:project",
|
|
9362
|
+
"profilestopermsets:convert:hardis:project",
|
|
9363
|
+
"profilestopermsets:convert:project:hardis"
|
|
9364
|
+
]
|
|
9365
|
+
},
|
|
9263
9366
|
"hardis:project:configure:auth": {
|
|
9264
9367
|
"aliases": [],
|
|
9265
9368
|
"args": {},
|
|
@@ -9389,109 +9492,6 @@
|
|
|
9389
9492
|
"auth:configure:project:hardis"
|
|
9390
9493
|
]
|
|
9391
9494
|
},
|
|
9392
|
-
"hardis:project:convert:profilestopermsets": {
|
|
9393
|
-
"aliases": [],
|
|
9394
|
-
"args": {},
|
|
9395
|
-
"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## Technical explanations\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",
|
|
9396
|
-
"examples": [
|
|
9397
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
9398
|
-
],
|
|
9399
|
-
"flags": {
|
|
9400
|
-
"json": {
|
|
9401
|
-
"description": "Format output as json.",
|
|
9402
|
-
"helpGroup": "GLOBAL",
|
|
9403
|
-
"name": "json",
|
|
9404
|
-
"allowNo": false,
|
|
9405
|
-
"type": "boolean"
|
|
9406
|
-
},
|
|
9407
|
-
"flags-dir": {
|
|
9408
|
-
"helpGroup": "GLOBAL",
|
|
9409
|
-
"name": "flags-dir",
|
|
9410
|
-
"summary": "Import flag values from a directory.",
|
|
9411
|
-
"hasDynamicHelp": false,
|
|
9412
|
-
"multiple": false,
|
|
9413
|
-
"type": "option"
|
|
9414
|
-
},
|
|
9415
|
-
"except": {
|
|
9416
|
-
"char": "e",
|
|
9417
|
-
"description": "List of filters",
|
|
9418
|
-
"name": "except",
|
|
9419
|
-
"default": [],
|
|
9420
|
-
"hasDynamicHelp": false,
|
|
9421
|
-
"multiple": true,
|
|
9422
|
-
"type": "option"
|
|
9423
|
-
},
|
|
9424
|
-
"debug": {
|
|
9425
|
-
"char": "d",
|
|
9426
|
-
"description": "Activate debug mode (more logs)",
|
|
9427
|
-
"name": "debug",
|
|
9428
|
-
"allowNo": false,
|
|
9429
|
-
"type": "boolean"
|
|
9430
|
-
},
|
|
9431
|
-
"websocket": {
|
|
9432
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9433
|
-
"name": "websocket",
|
|
9434
|
-
"hasDynamicHelp": false,
|
|
9435
|
-
"multiple": false,
|
|
9436
|
-
"type": "option"
|
|
9437
|
-
},
|
|
9438
|
-
"skipauth": {
|
|
9439
|
-
"description": "Skip authentication check when a default username is required",
|
|
9440
|
-
"name": "skipauth",
|
|
9441
|
-
"allowNo": false,
|
|
9442
|
-
"type": "boolean"
|
|
9443
|
-
}
|
|
9444
|
-
},
|
|
9445
|
-
"hasDynamicHelp": false,
|
|
9446
|
-
"hiddenAliases": [],
|
|
9447
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
9448
|
-
"pluginAlias": "sfdx-hardis",
|
|
9449
|
-
"pluginName": "sfdx-hardis",
|
|
9450
|
-
"pluginType": "core",
|
|
9451
|
-
"strict": true,
|
|
9452
|
-
"enableJsonFlag": true,
|
|
9453
|
-
"title": "Convert Profiles into Permission Sets",
|
|
9454
|
-
"requiresProject": true,
|
|
9455
|
-
"requiresSfdxPlugins": [
|
|
9456
|
-
"shane-sfdx-plugins"
|
|
9457
|
-
],
|
|
9458
|
-
"isESM": true,
|
|
9459
|
-
"relativePath": [
|
|
9460
|
-
"lib",
|
|
9461
|
-
"commands",
|
|
9462
|
-
"hardis",
|
|
9463
|
-
"project",
|
|
9464
|
-
"convert",
|
|
9465
|
-
"profilestopermsets.js"
|
|
9466
|
-
],
|
|
9467
|
-
"aliasPermutations": [],
|
|
9468
|
-
"permutations": [
|
|
9469
|
-
"hardis:project:convert:profilestopermsets",
|
|
9470
|
-
"project:hardis:convert:profilestopermsets",
|
|
9471
|
-
"project:convert:hardis:profilestopermsets",
|
|
9472
|
-
"project:convert:profilestopermsets:hardis",
|
|
9473
|
-
"hardis:convert:project:profilestopermsets",
|
|
9474
|
-
"convert:hardis:project:profilestopermsets",
|
|
9475
|
-
"convert:project:hardis:profilestopermsets",
|
|
9476
|
-
"convert:project:profilestopermsets:hardis",
|
|
9477
|
-
"hardis:convert:profilestopermsets:project",
|
|
9478
|
-
"convert:hardis:profilestopermsets:project",
|
|
9479
|
-
"convert:profilestopermsets:hardis:project",
|
|
9480
|
-
"convert:profilestopermsets:project:hardis",
|
|
9481
|
-
"hardis:project:profilestopermsets:convert",
|
|
9482
|
-
"project:hardis:profilestopermsets:convert",
|
|
9483
|
-
"project:profilestopermsets:hardis:convert",
|
|
9484
|
-
"project:profilestopermsets:convert:hardis",
|
|
9485
|
-
"hardis:profilestopermsets:project:convert",
|
|
9486
|
-
"profilestopermsets:hardis:project:convert",
|
|
9487
|
-
"profilestopermsets:project:hardis:convert",
|
|
9488
|
-
"profilestopermsets:project:convert:hardis",
|
|
9489
|
-
"hardis:profilestopermsets:convert:project",
|
|
9490
|
-
"profilestopermsets:hardis:convert:project",
|
|
9491
|
-
"profilestopermsets:convert:hardis:project",
|
|
9492
|
-
"profilestopermsets:convert:project:hardis"
|
|
9493
|
-
]
|
|
9494
|
-
},
|
|
9495
9495
|
"hardis:project:clean:emptyitems": {
|
|
9496
9496
|
"aliases": [],
|
|
9497
9497
|
"args": {},
|
|
@@ -14849,5 +14849,5 @@
|
|
|
14849
14849
|
]
|
|
14850
14850
|
}
|
|
14851
14851
|
},
|
|
14852
|
-
"version": "
|
|
14852
|
+
"version": "6.0.1-beta202508101506.0"
|
|
14853
14853
|
}
|