sfdx-hardis 6.7.4 → 6.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +9 -0
- package/lib/common/ticketProvider/azureBoardsProvider.d.ts +2 -2
- package/lib/common/ticketProvider/azureBoardsProvider.js +8 -5
- package/lib/common/ticketProvider/azureBoardsProvider.js.map +1 -1
- package/lib/common/ticketProvider/genericProvider.d.ts +2 -2
- package/lib/common/ticketProvider/genericProvider.js +8 -7
- package/lib/common/ticketProvider/genericProvider.js.map +1 -1
- package/lib/common/ticketProvider/index.d.ts +1 -1
- package/lib/common/ticketProvider/index.js +8 -5
- package/lib/common/ticketProvider/index.js.map +1 -1
- package/lib/common/ticketProvider/jiraProvider.d.ts +2 -2
- package/lib/common/ticketProvider/jiraProvider.js +9 -8
- package/lib/common/ticketProvider/jiraProvider.js.map +1 -1
- package/oclif.lock +17 -17
- package/oclif.manifest.json +756 -756
- package/package.json +4 -4
package/oclif.manifest.json
CHANGED
|
@@ -132,13 +132,12 @@
|
|
|
132
132
|
"clear:cache:hardis"
|
|
133
133
|
]
|
|
134
134
|
},
|
|
135
|
-
"hardis:
|
|
135
|
+
"hardis:config:get": {
|
|
136
136
|
"aliases": [],
|
|
137
137
|
"args": {},
|
|
138
|
-
"description": "\n## Command Behavior\n\n**
|
|
138
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the sfdx-hardis configuration for a specified level.**\n\nThis command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.\n\n- **Configuration levels:** It can retrieve configuration from three different levels:\n - **Project:** The configuration defined in the project's `.sfdx-hardis.yml` file.\n - **Branch:** The configuration defined in a branch-specific configuration file (e.g., `.sfdx-hardis.production.yml`).\n - **User:** The global user-level configuration.\n\n## Technical explanations\n\nThe command's logic is straightforward:\n\n- **`getConfig` function:** It calls the `getConfig` utility function, passing the desired configuration level as an argument.\n- **Configuration loading:** The `getConfig` function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON.\n- **Output:** The retrieved configuration is then displayed to the user as a JSON string.\n",
|
|
139
139
|
"examples": [
|
|
140
|
-
"$ sf hardis:
|
|
141
|
-
"CI=true sf hardis:auth:login"
|
|
140
|
+
"$ sf hardis:project:deploy:sources:metadata"
|
|
142
141
|
],
|
|
143
142
|
"flags": {
|
|
144
143
|
"json": {
|
|
@@ -156,28 +155,20 @@
|
|
|
156
155
|
"multiple": false,
|
|
157
156
|
"type": "option"
|
|
158
157
|
},
|
|
159
|
-
"
|
|
160
|
-
"char": "
|
|
161
|
-
"description": "
|
|
162
|
-
"name": "
|
|
158
|
+
"level": {
|
|
159
|
+
"char": "l",
|
|
160
|
+
"description": "project,branch or user",
|
|
161
|
+
"name": "level",
|
|
162
|
+
"default": "project",
|
|
163
163
|
"hasDynamicHelp": false,
|
|
164
164
|
"multiple": false,
|
|
165
|
+
"options": [
|
|
166
|
+
"project",
|
|
167
|
+
"branch",
|
|
168
|
+
"user"
|
|
169
|
+
],
|
|
165
170
|
"type": "option"
|
|
166
171
|
},
|
|
167
|
-
"devhub": {
|
|
168
|
-
"char": "h",
|
|
169
|
-
"description": "Also connect associated DevHub",
|
|
170
|
-
"name": "devhub",
|
|
171
|
-
"allowNo": false,
|
|
172
|
-
"type": "boolean"
|
|
173
|
-
},
|
|
174
|
-
"scratchorg": {
|
|
175
|
-
"char": "s",
|
|
176
|
-
"description": "Scratch org",
|
|
177
|
-
"name": "scratchorg",
|
|
178
|
-
"allowNo": false,
|
|
179
|
-
"type": "boolean"
|
|
180
|
-
},
|
|
181
172
|
"debug": {
|
|
182
173
|
"char": "d",
|
|
183
174
|
"description": "Activate debug mode (more logs)",
|
|
@@ -201,38 +192,39 @@
|
|
|
201
192
|
},
|
|
202
193
|
"hasDynamicHelp": false,
|
|
203
194
|
"hiddenAliases": [],
|
|
204
|
-
"id": "hardis:
|
|
195
|
+
"id": "hardis:config:get",
|
|
205
196
|
"pluginAlias": "sfdx-hardis",
|
|
206
197
|
"pluginName": "sfdx-hardis",
|
|
207
198
|
"pluginType": "core",
|
|
208
199
|
"strict": true,
|
|
209
200
|
"enableJsonFlag": true,
|
|
210
|
-
"title": "
|
|
201
|
+
"title": "Deploy metadata sources to org",
|
|
211
202
|
"requiresProject": false,
|
|
212
203
|
"isESM": true,
|
|
213
204
|
"relativePath": [
|
|
214
205
|
"lib",
|
|
215
206
|
"commands",
|
|
216
207
|
"hardis",
|
|
217
|
-
"
|
|
218
|
-
"
|
|
208
|
+
"config",
|
|
209
|
+
"get.js"
|
|
219
210
|
],
|
|
220
211
|
"aliasPermutations": [],
|
|
221
212
|
"permutations": [
|
|
222
|
-
"hardis:
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"hardis:
|
|
226
|
-
"
|
|
227
|
-
"
|
|
213
|
+
"hardis:config:get",
|
|
214
|
+
"config:hardis:get",
|
|
215
|
+
"config:get:hardis",
|
|
216
|
+
"hardis:get:config",
|
|
217
|
+
"get:hardis:config",
|
|
218
|
+
"get:config:hardis"
|
|
228
219
|
]
|
|
229
220
|
},
|
|
230
|
-
"hardis:
|
|
221
|
+
"hardis:auth:login": {
|
|
231
222
|
"aliases": [],
|
|
232
223
|
"args": {},
|
|
233
|
-
"description": "\n## Command Behavior\n\n**
|
|
224
|
+
"description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n</details>\n",
|
|
234
225
|
"examples": [
|
|
235
|
-
"$ sf hardis:
|
|
226
|
+
"$ sf hardis:auth:login",
|
|
227
|
+
"CI=true sf hardis:auth:login"
|
|
236
228
|
],
|
|
237
229
|
"flags": {
|
|
238
230
|
"json": {
|
|
@@ -250,20 +242,28 @@
|
|
|
250
242
|
"multiple": false,
|
|
251
243
|
"type": "option"
|
|
252
244
|
},
|
|
253
|
-
"
|
|
254
|
-
"char": "
|
|
255
|
-
"description": "
|
|
256
|
-
"name": "
|
|
257
|
-
"default": "project",
|
|
245
|
+
"instanceurl": {
|
|
246
|
+
"char": "r",
|
|
247
|
+
"description": "URL of org instance",
|
|
248
|
+
"name": "instanceurl",
|
|
258
249
|
"hasDynamicHelp": false,
|
|
259
250
|
"multiple": false,
|
|
260
|
-
"options": [
|
|
261
|
-
"project",
|
|
262
|
-
"branch",
|
|
263
|
-
"user"
|
|
264
|
-
],
|
|
265
251
|
"type": "option"
|
|
266
252
|
},
|
|
253
|
+
"devhub": {
|
|
254
|
+
"char": "h",
|
|
255
|
+
"description": "Also connect associated DevHub",
|
|
256
|
+
"name": "devhub",
|
|
257
|
+
"allowNo": false,
|
|
258
|
+
"type": "boolean"
|
|
259
|
+
},
|
|
260
|
+
"scratchorg": {
|
|
261
|
+
"char": "s",
|
|
262
|
+
"description": "Scratch org",
|
|
263
|
+
"name": "scratchorg",
|
|
264
|
+
"allowNo": false,
|
|
265
|
+
"type": "boolean"
|
|
266
|
+
},
|
|
267
267
|
"debug": {
|
|
268
268
|
"char": "d",
|
|
269
269
|
"description": "Activate debug mode (more logs)",
|
|
@@ -287,30 +287,30 @@
|
|
|
287
287
|
},
|
|
288
288
|
"hasDynamicHelp": false,
|
|
289
289
|
"hiddenAliases": [],
|
|
290
|
-
"id": "hardis:
|
|
290
|
+
"id": "hardis:auth:login",
|
|
291
291
|
"pluginAlias": "sfdx-hardis",
|
|
292
292
|
"pluginName": "sfdx-hardis",
|
|
293
293
|
"pluginType": "core",
|
|
294
294
|
"strict": true,
|
|
295
295
|
"enableJsonFlag": true,
|
|
296
|
-
"title": "
|
|
296
|
+
"title": "Login",
|
|
297
297
|
"requiresProject": false,
|
|
298
298
|
"isESM": true,
|
|
299
299
|
"relativePath": [
|
|
300
300
|
"lib",
|
|
301
301
|
"commands",
|
|
302
302
|
"hardis",
|
|
303
|
-
"
|
|
304
|
-
"
|
|
303
|
+
"auth",
|
|
304
|
+
"login.js"
|
|
305
305
|
],
|
|
306
306
|
"aliasPermutations": [],
|
|
307
307
|
"permutations": [
|
|
308
|
-
"hardis:
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"hardis:
|
|
312
|
-
"
|
|
313
|
-
"
|
|
308
|
+
"hardis:auth:login",
|
|
309
|
+
"auth:hardis:login",
|
|
310
|
+
"auth:login:hardis",
|
|
311
|
+
"hardis:login:auth",
|
|
312
|
+
"login:hardis:auth",
|
|
313
|
+
"login:auth:hardis"
|
|
314
314
|
]
|
|
315
315
|
},
|
|
316
316
|
"hardis:doc:fieldusage": {
|
|
@@ -5538,15 +5538,12 @@
|
|
|
5538
5538
|
"import:data:org:hardis"
|
|
5539
5539
|
]
|
|
5540
5540
|
},
|
|
5541
|
-
"hardis:org:
|
|
5541
|
+
"hardis:org:files:export": {
|
|
5542
5542
|
"aliases": [],
|
|
5543
5543
|
"args": {},
|
|
5544
|
-
"description": "
|
|
5544
|
+
"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, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\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, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
|
|
5545
5545
|
"examples": [
|
|
5546
|
-
"$ sf hardis:org:
|
|
5547
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5548
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5549
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5546
|
+
"$ sf hardis:org:files:export"
|
|
5550
5547
|
],
|
|
5551
5548
|
"flags": {
|
|
5552
5549
|
"json": {
|
|
@@ -5564,30 +5561,48 @@
|
|
|
5564
5561
|
"multiple": false,
|
|
5565
5562
|
"type": "option"
|
|
5566
5563
|
},
|
|
5567
|
-
"
|
|
5568
|
-
"char": "
|
|
5569
|
-
"description": "
|
|
5570
|
-
"name": "
|
|
5564
|
+
"path": {
|
|
5565
|
+
"char": "p",
|
|
5566
|
+
"description": "Path to the file export project",
|
|
5567
|
+
"name": "path",
|
|
5571
5568
|
"hasDynamicHelp": false,
|
|
5572
5569
|
"multiple": false,
|
|
5573
5570
|
"type": "option"
|
|
5574
5571
|
},
|
|
5575
|
-
"
|
|
5572
|
+
"chunksize": {
|
|
5573
|
+
"char": "c",
|
|
5574
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
5575
|
+
"name": "chunksize",
|
|
5576
|
+
"default": 1000,
|
|
5577
|
+
"hasDynamicHelp": false,
|
|
5578
|
+
"multiple": false,
|
|
5579
|
+
"type": "option"
|
|
5580
|
+
},
|
|
5581
|
+
"polltimeout": {
|
|
5576
5582
|
"char": "t",
|
|
5577
|
-
"description": "
|
|
5578
|
-
"name": "
|
|
5583
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
5584
|
+
"name": "polltimeout",
|
|
5585
|
+
"default": 300000,
|
|
5579
5586
|
"hasDynamicHelp": false,
|
|
5580
5587
|
"multiple": false,
|
|
5581
5588
|
"type": "option"
|
|
5582
5589
|
},
|
|
5583
|
-
"
|
|
5584
|
-
"char": "
|
|
5585
|
-
"description": "
|
|
5586
|
-
"name": "
|
|
5590
|
+
"startchunknumber": {
|
|
5591
|
+
"char": "s",
|
|
5592
|
+
"description": "Chunk number to start from",
|
|
5593
|
+
"name": "startchunknumber",
|
|
5594
|
+
"default": 0,
|
|
5587
5595
|
"hasDynamicHelp": false,
|
|
5588
5596
|
"multiple": false,
|
|
5589
5597
|
"type": "option"
|
|
5590
5598
|
},
|
|
5599
|
+
"resume": {
|
|
5600
|
+
"char": "r",
|
|
5601
|
+
"description": "Resume previous export by checking existing files (default in CI)",
|
|
5602
|
+
"name": "resume",
|
|
5603
|
+
"allowNo": false,
|
|
5604
|
+
"type": "boolean"
|
|
5605
|
+
},
|
|
5591
5606
|
"debug": {
|
|
5592
5607
|
"char": "d",
|
|
5593
5608
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5626,13 +5641,13 @@
|
|
|
5626
5641
|
},
|
|
5627
5642
|
"hasDynamicHelp": true,
|
|
5628
5643
|
"hiddenAliases": [],
|
|
5629
|
-
"id": "hardis:org:
|
|
5644
|
+
"id": "hardis:org:files:export",
|
|
5630
5645
|
"pluginAlias": "sfdx-hardis",
|
|
5631
5646
|
"pluginName": "sfdx-hardis",
|
|
5632
5647
|
"pluginType": "core",
|
|
5633
5648
|
"strict": true,
|
|
5634
5649
|
"enableJsonFlag": true,
|
|
5635
|
-
"title": "
|
|
5650
|
+
"title": "Export files",
|
|
5636
5651
|
"requiresProject": false,
|
|
5637
5652
|
"isESM": true,
|
|
5638
5653
|
"relativePath": [
|
|
@@ -5640,43 +5655,43 @@
|
|
|
5640
5655
|
"commands",
|
|
5641
5656
|
"hardis",
|
|
5642
5657
|
"org",
|
|
5643
|
-
"
|
|
5644
|
-
"
|
|
5658
|
+
"files",
|
|
5659
|
+
"export.js"
|
|
5645
5660
|
],
|
|
5646
5661
|
"aliasPermutations": [],
|
|
5647
5662
|
"permutations": [
|
|
5648
|
-
"hardis:org:
|
|
5649
|
-
"org:hardis:
|
|
5650
|
-
"org:
|
|
5651
|
-
"org:
|
|
5652
|
-
"hardis:
|
|
5653
|
-
"
|
|
5654
|
-
"
|
|
5655
|
-
"
|
|
5656
|
-
"hardis:
|
|
5657
|
-
"
|
|
5658
|
-
"
|
|
5659
|
-
"
|
|
5660
|
-
"hardis:org:
|
|
5661
|
-
"org:hardis:
|
|
5662
|
-
"org:
|
|
5663
|
-
"org:
|
|
5664
|
-
"hardis:
|
|
5665
|
-
"
|
|
5666
|
-
"
|
|
5667
|
-
"
|
|
5668
|
-
"hardis:
|
|
5669
|
-
"
|
|
5670
|
-
"
|
|
5671
|
-
"
|
|
5663
|
+
"hardis:org:files:export",
|
|
5664
|
+
"org:hardis:files:export",
|
|
5665
|
+
"org:files:hardis:export",
|
|
5666
|
+
"org:files:export:hardis",
|
|
5667
|
+
"hardis:files:org:export",
|
|
5668
|
+
"files:hardis:org:export",
|
|
5669
|
+
"files:org:hardis:export",
|
|
5670
|
+
"files:org:export:hardis",
|
|
5671
|
+
"hardis:files:export:org",
|
|
5672
|
+
"files:hardis:export:org",
|
|
5673
|
+
"files:export:hardis:org",
|
|
5674
|
+
"files:export:org:hardis",
|
|
5675
|
+
"hardis:org:export:files",
|
|
5676
|
+
"org:hardis:export:files",
|
|
5677
|
+
"org:export:hardis:files",
|
|
5678
|
+
"org:export:files:hardis",
|
|
5679
|
+
"hardis:export:org:files",
|
|
5680
|
+
"export:hardis:org:files",
|
|
5681
|
+
"export:org:hardis:files",
|
|
5682
|
+
"export:org:files:hardis",
|
|
5683
|
+
"hardis:export:files:org",
|
|
5684
|
+
"export:hardis:files:org",
|
|
5685
|
+
"export:files:hardis:org",
|
|
5686
|
+
"export:files:org:hardis"
|
|
5672
5687
|
]
|
|
5673
5688
|
},
|
|
5674
|
-
"hardis:org:
|
|
5689
|
+
"hardis:org:files:import": {
|
|
5675
5690
|
"aliases": [],
|
|
5676
5691
|
"args": {},
|
|
5677
|
-
"description": "\
|
|
5692
|
+
"description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
|
|
5678
5693
|
"examples": [
|
|
5679
|
-
"$ sf hardis:org:
|
|
5694
|
+
"$ sf hardis:org:files:import"
|
|
5680
5695
|
],
|
|
5681
5696
|
"flags": {
|
|
5682
5697
|
"json": {
|
|
@@ -5694,6 +5709,21 @@
|
|
|
5694
5709
|
"multiple": false,
|
|
5695
5710
|
"type": "option"
|
|
5696
5711
|
},
|
|
5712
|
+
"path": {
|
|
5713
|
+
"char": "p",
|
|
5714
|
+
"description": "Path to the file export project",
|
|
5715
|
+
"name": "path",
|
|
5716
|
+
"hasDynamicHelp": false,
|
|
5717
|
+
"multiple": false,
|
|
5718
|
+
"type": "option"
|
|
5719
|
+
},
|
|
5720
|
+
"overwrite": {
|
|
5721
|
+
"char": "f",
|
|
5722
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
5723
|
+
"name": "overwrite",
|
|
5724
|
+
"allowNo": false,
|
|
5725
|
+
"type": "boolean"
|
|
5726
|
+
},
|
|
5697
5727
|
"debug": {
|
|
5698
5728
|
"char": "d",
|
|
5699
5729
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5732,13 +5762,13 @@
|
|
|
5732
5762
|
},
|
|
5733
5763
|
"hasDynamicHelp": true,
|
|
5734
5764
|
"hiddenAliases": [],
|
|
5735
|
-
"id": "hardis:org:
|
|
5765
|
+
"id": "hardis:org:files:import",
|
|
5736
5766
|
"pluginAlias": "sfdx-hardis",
|
|
5737
5767
|
"pluginName": "sfdx-hardis",
|
|
5738
5768
|
"pluginType": "core",
|
|
5739
5769
|
"strict": true,
|
|
5740
5770
|
"enableJsonFlag": true,
|
|
5741
|
-
"title": "
|
|
5771
|
+
"title": "Import files",
|
|
5742
5772
|
"requiresProject": false,
|
|
5743
5773
|
"isESM": true,
|
|
5744
5774
|
"relativePath": [
|
|
@@ -5746,46 +5776,44 @@
|
|
|
5746
5776
|
"commands",
|
|
5747
5777
|
"hardis",
|
|
5748
5778
|
"org",
|
|
5749
|
-
"
|
|
5750
|
-
"
|
|
5779
|
+
"files",
|
|
5780
|
+
"import.js"
|
|
5751
5781
|
],
|
|
5752
5782
|
"aliasPermutations": [],
|
|
5753
5783
|
"permutations": [
|
|
5754
|
-
"hardis:org:
|
|
5755
|
-
"org:hardis:
|
|
5756
|
-
"org:
|
|
5757
|
-
"org:
|
|
5758
|
-
"hardis:
|
|
5759
|
-
"
|
|
5760
|
-
"
|
|
5761
|
-
"
|
|
5762
|
-
"hardis:
|
|
5763
|
-
"
|
|
5764
|
-
"
|
|
5765
|
-
"
|
|
5766
|
-
"hardis:org:
|
|
5767
|
-
"org:hardis:
|
|
5768
|
-
"org:
|
|
5769
|
-
"org:
|
|
5770
|
-
"hardis:
|
|
5771
|
-
"
|
|
5772
|
-
"
|
|
5773
|
-
"
|
|
5774
|
-
"hardis:
|
|
5775
|
-
"
|
|
5776
|
-
"
|
|
5777
|
-
"
|
|
5784
|
+
"hardis:org:files:import",
|
|
5785
|
+
"org:hardis:files:import",
|
|
5786
|
+
"org:files:hardis:import",
|
|
5787
|
+
"org:files:import:hardis",
|
|
5788
|
+
"hardis:files:org:import",
|
|
5789
|
+
"files:hardis:org:import",
|
|
5790
|
+
"files:org:hardis:import",
|
|
5791
|
+
"files:org:import:hardis",
|
|
5792
|
+
"hardis:files:import:org",
|
|
5793
|
+
"files:hardis:import:org",
|
|
5794
|
+
"files:import:hardis:org",
|
|
5795
|
+
"files:import:org:hardis",
|
|
5796
|
+
"hardis:org:import:files",
|
|
5797
|
+
"org:hardis:import:files",
|
|
5798
|
+
"org:import:hardis:files",
|
|
5799
|
+
"org:import:files:hardis",
|
|
5800
|
+
"hardis:import:org:files",
|
|
5801
|
+
"import:hardis:org:files",
|
|
5802
|
+
"import:org:hardis:files",
|
|
5803
|
+
"import:org:files:hardis",
|
|
5804
|
+
"hardis:import:files:org",
|
|
5805
|
+
"import:hardis:files:org",
|
|
5806
|
+
"import:files:hardis:org",
|
|
5807
|
+
"import:files:org:hardis"
|
|
5778
5808
|
]
|
|
5779
5809
|
},
|
|
5780
|
-
"hardis:org:
|
|
5810
|
+
"hardis:org:fix:listviewmine": {
|
|
5781
5811
|
"aliases": [],
|
|
5782
5812
|
"args": {},
|
|
5783
|
-
"description": "
|
|
5813
|
+
"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",
|
|
5784
5814
|
"examples": [
|
|
5785
|
-
"$ sf hardis:org:
|
|
5786
|
-
"$ sf hardis:org:
|
|
5787
|
-
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
5788
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
5815
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
5816
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
5789
5817
|
],
|
|
5790
5818
|
"flags": {
|
|
5791
5819
|
"json": {
|
|
@@ -5803,28 +5831,10 @@
|
|
|
5803
5831
|
"multiple": false,
|
|
5804
5832
|
"type": "option"
|
|
5805
5833
|
},
|
|
5806
|
-
"
|
|
5807
|
-
"char": "e",
|
|
5808
|
-
"description": "Type of EventLogFile event to analyze",
|
|
5809
|
-
"name": "eventtype",
|
|
5810
|
-
"default": "ApiTotalUsage",
|
|
5811
|
-
"hasDynamicHelp": false,
|
|
5812
|
-
"multiple": false,
|
|
5813
|
-
"type": "option"
|
|
5814
|
-
},
|
|
5815
|
-
"limit": {
|
|
5834
|
+
"listviews": {
|
|
5816
5835
|
"char": "l",
|
|
5817
|
-
"description": "
|
|
5818
|
-
"name": "
|
|
5819
|
-
"default": 999,
|
|
5820
|
-
"hasDynamicHelp": false,
|
|
5821
|
-
"multiple": false,
|
|
5822
|
-
"type": "option"
|
|
5823
|
-
},
|
|
5824
|
-
"outputfile": {
|
|
5825
|
-
"char": "f",
|
|
5826
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5827
|
-
"name": "outputfile",
|
|
5836
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
5837
|
+
"name": "listviews",
|
|
5828
5838
|
"hasDynamicHelp": false,
|
|
5829
5839
|
"multiple": false,
|
|
5830
5840
|
"type": "option"
|
|
@@ -5867,57 +5877,60 @@
|
|
|
5867
5877
|
},
|
|
5868
5878
|
"hasDynamicHelp": true,
|
|
5869
5879
|
"hiddenAliases": [],
|
|
5870
|
-
"id": "hardis:org:
|
|
5880
|
+
"id": "hardis:org:fix:listviewmine",
|
|
5871
5881
|
"pluginAlias": "sfdx-hardis",
|
|
5872
5882
|
"pluginName": "sfdx-hardis",
|
|
5873
5883
|
"pluginType": "core",
|
|
5874
5884
|
"strict": true,
|
|
5875
5885
|
"enableJsonFlag": true,
|
|
5876
|
-
"title": "
|
|
5877
|
-
"requiresProject":
|
|
5886
|
+
"title": "Fix listviews with ",
|
|
5887
|
+
"requiresProject": true,
|
|
5878
5888
|
"isESM": true,
|
|
5879
5889
|
"relativePath": [
|
|
5880
5890
|
"lib",
|
|
5881
5891
|
"commands",
|
|
5882
5892
|
"hardis",
|
|
5883
5893
|
"org",
|
|
5884
|
-
"
|
|
5885
|
-
"
|
|
5894
|
+
"fix",
|
|
5895
|
+
"listviewmine.js"
|
|
5886
5896
|
],
|
|
5887
5897
|
"aliasPermutations": [],
|
|
5888
5898
|
"permutations": [
|
|
5889
|
-
"hardis:org:
|
|
5890
|
-
"org:hardis:
|
|
5891
|
-
"org:
|
|
5892
|
-
"org:
|
|
5893
|
-
"hardis:
|
|
5894
|
-
"
|
|
5895
|
-
"
|
|
5896
|
-
"
|
|
5897
|
-
"hardis:
|
|
5898
|
-
"
|
|
5899
|
-
"
|
|
5900
|
-
"
|
|
5901
|
-
"hardis:org:
|
|
5902
|
-
"org:hardis:
|
|
5903
|
-
"org:
|
|
5904
|
-
"org:
|
|
5905
|
-
"hardis:
|
|
5906
|
-
"
|
|
5907
|
-
"
|
|
5908
|
-
"
|
|
5909
|
-
"hardis:
|
|
5910
|
-
"
|
|
5911
|
-
"
|
|
5912
|
-
"
|
|
5899
|
+
"hardis:org:fix:listviewmine",
|
|
5900
|
+
"org:hardis:fix:listviewmine",
|
|
5901
|
+
"org:fix:hardis:listviewmine",
|
|
5902
|
+
"org:fix:listviewmine:hardis",
|
|
5903
|
+
"hardis:fix:org:listviewmine",
|
|
5904
|
+
"fix:hardis:org:listviewmine",
|
|
5905
|
+
"fix:org:hardis:listviewmine",
|
|
5906
|
+
"fix:org:listviewmine:hardis",
|
|
5907
|
+
"hardis:fix:listviewmine:org",
|
|
5908
|
+
"fix:hardis:listviewmine:org",
|
|
5909
|
+
"fix:listviewmine:hardis:org",
|
|
5910
|
+
"fix:listviewmine:org:hardis",
|
|
5911
|
+
"hardis:org:listviewmine:fix",
|
|
5912
|
+
"org:hardis:listviewmine:fix",
|
|
5913
|
+
"org:listviewmine:hardis:fix",
|
|
5914
|
+
"org:listviewmine:fix:hardis",
|
|
5915
|
+
"hardis:listviewmine:org:fix",
|
|
5916
|
+
"listviewmine:hardis:org:fix",
|
|
5917
|
+
"listviewmine:org:hardis:fix",
|
|
5918
|
+
"listviewmine:org:fix:hardis",
|
|
5919
|
+
"hardis:listviewmine:fix:org",
|
|
5920
|
+
"listviewmine:hardis:fix:org",
|
|
5921
|
+
"listviewmine:fix:hardis:org",
|
|
5922
|
+
"listviewmine:fix:org:hardis"
|
|
5913
5923
|
]
|
|
5914
5924
|
},
|
|
5915
|
-
"hardis:org:diagnose:
|
|
5925
|
+
"hardis:org:diagnose:audittrail": {
|
|
5916
5926
|
"aliases": [],
|
|
5917
5927
|
"args": {},
|
|
5918
|
-
"description": "
|
|
5928
|
+
"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",
|
|
5919
5929
|
"examples": [
|
|
5920
|
-
"$ sf hardis:org:diagnose:
|
|
5930
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5931
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5932
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5933
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5921
5934
|
],
|
|
5922
5935
|
"flags": {
|
|
5923
5936
|
"json": {
|
|
@@ -5935,6 +5948,22 @@
|
|
|
5935
5948
|
"multiple": false,
|
|
5936
5949
|
"type": "option"
|
|
5937
5950
|
},
|
|
5951
|
+
"excludeusers": {
|
|
5952
|
+
"char": "e",
|
|
5953
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5954
|
+
"name": "excludeusers",
|
|
5955
|
+
"hasDynamicHelp": false,
|
|
5956
|
+
"multiple": false,
|
|
5957
|
+
"type": "option"
|
|
5958
|
+
},
|
|
5959
|
+
"lastndays": {
|
|
5960
|
+
"char": "t",
|
|
5961
|
+
"description": "Number of days to extract from today (included)",
|
|
5962
|
+
"name": "lastndays",
|
|
5963
|
+
"hasDynamicHelp": false,
|
|
5964
|
+
"multiple": false,
|
|
5965
|
+
"type": "option"
|
|
5966
|
+
},
|
|
5938
5967
|
"outputfile": {
|
|
5939
5968
|
"char": "f",
|
|
5940
5969
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -5943,13 +5972,6 @@
|
|
|
5943
5972
|
"multiple": false,
|
|
5944
5973
|
"type": "option"
|
|
5945
5974
|
},
|
|
5946
|
-
"usedonly": {
|
|
5947
|
-
"char": "u",
|
|
5948
|
-
"description": "Filter to have only used licenses",
|
|
5949
|
-
"name": "usedonly",
|
|
5950
|
-
"allowNo": false,
|
|
5951
|
-
"type": "boolean"
|
|
5952
|
-
},
|
|
5953
5975
|
"debug": {
|
|
5954
5976
|
"char": "d",
|
|
5955
5977
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5988,13 +6010,13 @@
|
|
|
5988
6010
|
},
|
|
5989
6011
|
"hasDynamicHelp": true,
|
|
5990
6012
|
"hiddenAliases": [],
|
|
5991
|
-
"id": "hardis:org:diagnose:
|
|
6013
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5992
6014
|
"pluginAlias": "sfdx-hardis",
|
|
5993
6015
|
"pluginName": "sfdx-hardis",
|
|
5994
6016
|
"pluginType": "core",
|
|
5995
6017
|
"strict": true,
|
|
5996
6018
|
"enableJsonFlag": true,
|
|
5997
|
-
"title": "
|
|
6019
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5998
6020
|
"requiresProject": false,
|
|
5999
6021
|
"isESM": true,
|
|
6000
6022
|
"relativePath": [
|
|
@@ -6003,42 +6025,42 @@
|
|
|
6003
6025
|
"hardis",
|
|
6004
6026
|
"org",
|
|
6005
6027
|
"diagnose",
|
|
6006
|
-
"
|
|
6028
|
+
"audittrail.js"
|
|
6007
6029
|
],
|
|
6008
6030
|
"aliasPermutations": [],
|
|
6009
6031
|
"permutations": [
|
|
6010
|
-
"hardis:org:diagnose:
|
|
6011
|
-
"org:hardis:diagnose:
|
|
6012
|
-
"org:diagnose:hardis:
|
|
6013
|
-
"org:diagnose:
|
|
6014
|
-
"hardis:diagnose:org:
|
|
6015
|
-
"diagnose:hardis:org:
|
|
6016
|
-
"diagnose:org:hardis:
|
|
6017
|
-
"diagnose:org:
|
|
6018
|
-
"hardis:diagnose:
|
|
6019
|
-
"diagnose:hardis:
|
|
6020
|
-
"diagnose:
|
|
6021
|
-
"diagnose:
|
|
6022
|
-
"hardis:org:
|
|
6023
|
-
"org:hardis:
|
|
6024
|
-
"org:
|
|
6025
|
-
"org:
|
|
6026
|
-
"hardis:
|
|
6027
|
-
"
|
|
6028
|
-
"
|
|
6029
|
-
"
|
|
6030
|
-
"hardis:
|
|
6031
|
-
"
|
|
6032
|
-
"
|
|
6033
|
-
"
|
|
6032
|
+
"hardis:org:diagnose:audittrail",
|
|
6033
|
+
"org:hardis:diagnose:audittrail",
|
|
6034
|
+
"org:diagnose:hardis:audittrail",
|
|
6035
|
+
"org:diagnose:audittrail:hardis",
|
|
6036
|
+
"hardis:diagnose:org:audittrail",
|
|
6037
|
+
"diagnose:hardis:org:audittrail",
|
|
6038
|
+
"diagnose:org:hardis:audittrail",
|
|
6039
|
+
"diagnose:org:audittrail:hardis",
|
|
6040
|
+
"hardis:diagnose:audittrail:org",
|
|
6041
|
+
"diagnose:hardis:audittrail:org",
|
|
6042
|
+
"diagnose:audittrail:hardis:org",
|
|
6043
|
+
"diagnose:audittrail:org:hardis",
|
|
6044
|
+
"hardis:org:audittrail:diagnose",
|
|
6045
|
+
"org:hardis:audittrail:diagnose",
|
|
6046
|
+
"org:audittrail:hardis:diagnose",
|
|
6047
|
+
"org:audittrail:diagnose:hardis",
|
|
6048
|
+
"hardis:audittrail:org:diagnose",
|
|
6049
|
+
"audittrail:hardis:org:diagnose",
|
|
6050
|
+
"audittrail:org:hardis:diagnose",
|
|
6051
|
+
"audittrail:org:diagnose:hardis",
|
|
6052
|
+
"hardis:audittrail:diagnose:org",
|
|
6053
|
+
"audittrail:hardis:diagnose:org",
|
|
6054
|
+
"audittrail:diagnose:hardis:org",
|
|
6055
|
+
"audittrail:diagnose:org:hardis"
|
|
6034
6056
|
]
|
|
6035
6057
|
},
|
|
6036
|
-
"hardis:org:diagnose:
|
|
6058
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
6037
6059
|
"aliases": [],
|
|
6038
6060
|
"args": {},
|
|
6039
|
-
"description": "
|
|
6061
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the scheduled upgrade date for a Salesforce org's instance.**\n\nThis command provides crucial information about when your Salesforce instance will be upgraded to the next major release (Spring, Summer, or Winter). This is vital for release planning, testing, and ensuring compatibility with upcoming Salesforce features.\n\nKey functionalities:\n\n- **Instance Identification:** Determines the Salesforce instance name of your target org.\n- **Upgrade Date Retrieval:** Fetches the planned start time of the next major core service upgrade for that instance from the Salesforce Status API.\n- **Days Until Upgrade:** Calculates and displays the number of days remaining until the next major upgrade.\n- **Severity-Based Logging:** Adjusts the log severity (info, warning) based on the proximity of the upgrade date, providing a visual cue for urgency.\n- **Notifications:** Sends notifications to configured channels (e.g., Slack, MS Teams, Grafana) with the upgrade information, making it suitable for automated monitoring.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the `Organization` object in Salesforce to get the `InstanceName` of the target org.\n- **Salesforce Status API Integration:** It makes an HTTP GET request to the Salesforce Status API (`https://api.status.salesforce.com/v1/instances/{instanceName}/status`) to retrieve detailed information about the instance, including scheduled maintenances.\n- **Data Parsing:** It parses the JSON response from the Status API to extract the relevant major release upgrade information.\n- **Date Calculation:** Uses the `moment` library to calculate the difference in days between the current date and the planned upgrade date.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including the instance name, upgrade date, and days remaining, along with relevant metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the upgrade status and proximity.\n</details>\n",
|
|
6040
6062
|
"examples": [
|
|
6041
|
-
"$ sf hardis:org:diagnose:
|
|
6063
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
6042
6064
|
],
|
|
6043
6065
|
"flags": {
|
|
6044
6066
|
"json": {
|
|
@@ -6056,14 +6078,6 @@
|
|
|
6056
6078
|
"multiple": false,
|
|
6057
6079
|
"type": "option"
|
|
6058
6080
|
},
|
|
6059
|
-
"outputfile": {
|
|
6060
|
-
"char": "f",
|
|
6061
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6062
|
-
"name": "outputfile",
|
|
6063
|
-
"hasDynamicHelp": false,
|
|
6064
|
-
"multiple": false,
|
|
6065
|
-
"type": "option"
|
|
6066
|
-
},
|
|
6067
6081
|
"debug": {
|
|
6068
6082
|
"char": "d",
|
|
6069
6083
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6102,13 +6116,13 @@
|
|
|
6102
6116
|
},
|
|
6103
6117
|
"hasDynamicHelp": true,
|
|
6104
6118
|
"hiddenAliases": [],
|
|
6105
|
-
"id": "hardis:org:diagnose:
|
|
6119
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
6106
6120
|
"pluginAlias": "sfdx-hardis",
|
|
6107
6121
|
"pluginName": "sfdx-hardis",
|
|
6108
6122
|
"pluginType": "core",
|
|
6109
6123
|
"strict": true,
|
|
6110
6124
|
"enableJsonFlag": true,
|
|
6111
|
-
"title": "
|
|
6125
|
+
"title": "Get Instance Upgrade date",
|
|
6112
6126
|
"requiresProject": false,
|
|
6113
6127
|
"isESM": true,
|
|
6114
6128
|
"relativePath": [
|
|
@@ -6117,42 +6131,45 @@
|
|
|
6117
6131
|
"hardis",
|
|
6118
6132
|
"org",
|
|
6119
6133
|
"diagnose",
|
|
6120
|
-
"
|
|
6134
|
+
"instanceupgrade.js"
|
|
6121
6135
|
],
|
|
6122
6136
|
"aliasPermutations": [],
|
|
6123
6137
|
"permutations": [
|
|
6124
|
-
"hardis:org:diagnose:
|
|
6125
|
-
"org:hardis:diagnose:
|
|
6126
|
-
"org:diagnose:hardis:
|
|
6127
|
-
"org:diagnose:
|
|
6128
|
-
"hardis:diagnose:org:
|
|
6129
|
-
"diagnose:hardis:org:
|
|
6130
|
-
"diagnose:org:hardis:
|
|
6131
|
-
"diagnose:org:
|
|
6132
|
-
"hardis:diagnose:
|
|
6133
|
-
"diagnose:hardis:
|
|
6134
|
-
"diagnose:
|
|
6135
|
-
"diagnose:
|
|
6136
|
-
"hardis:org:
|
|
6137
|
-
"org:hardis:
|
|
6138
|
-
"org:
|
|
6139
|
-
"org:
|
|
6140
|
-
"hardis:
|
|
6141
|
-
"
|
|
6142
|
-
"
|
|
6143
|
-
"
|
|
6144
|
-
"hardis:
|
|
6145
|
-
"
|
|
6146
|
-
"
|
|
6147
|
-
"
|
|
6138
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
6139
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
6140
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
6141
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
6142
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
6143
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
6144
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
6145
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
6146
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
6147
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
6148
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
6149
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
6150
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
6151
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
6152
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
6153
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
6154
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
6155
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
6156
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
6157
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
6158
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
6159
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
6160
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
6161
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
6148
6162
|
]
|
|
6149
6163
|
},
|
|
6150
|
-
"hardis:org:diagnose:
|
|
6164
|
+
"hardis:org:diagnose:legacyapi": {
|
|
6151
6165
|
"aliases": [],
|
|
6152
6166
|
"args": {},
|
|
6153
|
-
"description": "
|
|
6167
|
+
"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",
|
|
6154
6168
|
"examples": [
|
|
6155
|
-
"$ sf hardis:org:diagnose:
|
|
6169
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
6170
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6171
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6172
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6156
6173
|
],
|
|
6157
6174
|
"flags": {
|
|
6158
6175
|
"json": {
|
|
@@ -6170,6 +6187,24 @@
|
|
|
6170
6187
|
"multiple": false,
|
|
6171
6188
|
"type": "option"
|
|
6172
6189
|
},
|
|
6190
|
+
"eventtype": {
|
|
6191
|
+
"char": "e",
|
|
6192
|
+
"description": "Type of EventLogFile event to analyze",
|
|
6193
|
+
"name": "eventtype",
|
|
6194
|
+
"default": "ApiTotalUsage",
|
|
6195
|
+
"hasDynamicHelp": false,
|
|
6196
|
+
"multiple": false,
|
|
6197
|
+
"type": "option"
|
|
6198
|
+
},
|
|
6199
|
+
"limit": {
|
|
6200
|
+
"char": "l",
|
|
6201
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
6202
|
+
"name": "limit",
|
|
6203
|
+
"default": 999,
|
|
6204
|
+
"hasDynamicHelp": false,
|
|
6205
|
+
"multiple": false,
|
|
6206
|
+
"type": "option"
|
|
6207
|
+
},
|
|
6173
6208
|
"outputfile": {
|
|
6174
6209
|
"char": "f",
|
|
6175
6210
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6216,13 +6251,13 @@
|
|
|
6216
6251
|
},
|
|
6217
6252
|
"hasDynamicHelp": true,
|
|
6218
6253
|
"hiddenAliases": [],
|
|
6219
|
-
"id": "hardis:org:diagnose:
|
|
6254
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
6220
6255
|
"pluginAlias": "sfdx-hardis",
|
|
6221
6256
|
"pluginName": "sfdx-hardis",
|
|
6222
6257
|
"pluginType": "core",
|
|
6223
6258
|
"strict": true,
|
|
6224
6259
|
"enableJsonFlag": true,
|
|
6225
|
-
"title": "
|
|
6260
|
+
"title": "Check for legacy API use",
|
|
6226
6261
|
"requiresProject": false,
|
|
6227
6262
|
"isESM": true,
|
|
6228
6263
|
"relativePath": [
|
|
@@ -6231,43 +6266,42 @@
|
|
|
6231
6266
|
"hardis",
|
|
6232
6267
|
"org",
|
|
6233
6268
|
"diagnose",
|
|
6234
|
-
"
|
|
6269
|
+
"legacyapi.js"
|
|
6235
6270
|
],
|
|
6236
6271
|
"aliasPermutations": [],
|
|
6237
6272
|
"permutations": [
|
|
6238
|
-
"hardis:org:diagnose:
|
|
6239
|
-
"org:hardis:diagnose:
|
|
6240
|
-
"org:diagnose:hardis:
|
|
6241
|
-
"org:diagnose:
|
|
6242
|
-
"hardis:diagnose:org:
|
|
6243
|
-
"diagnose:hardis:org:
|
|
6244
|
-
"diagnose:org:hardis:
|
|
6245
|
-
"diagnose:org:
|
|
6246
|
-
"hardis:diagnose:
|
|
6247
|
-
"diagnose:hardis:
|
|
6248
|
-
"diagnose:
|
|
6249
|
-
"diagnose:
|
|
6250
|
-
"hardis:org:
|
|
6251
|
-
"org:hardis:
|
|
6252
|
-
"org:
|
|
6253
|
-
"org:
|
|
6254
|
-
"hardis:
|
|
6255
|
-
"
|
|
6256
|
-
"
|
|
6257
|
-
"
|
|
6258
|
-
"hardis:
|
|
6259
|
-
"
|
|
6260
|
-
"
|
|
6261
|
-
"
|
|
6273
|
+
"hardis:org:diagnose:legacyapi",
|
|
6274
|
+
"org:hardis:diagnose:legacyapi",
|
|
6275
|
+
"org:diagnose:hardis:legacyapi",
|
|
6276
|
+
"org:diagnose:legacyapi:hardis",
|
|
6277
|
+
"hardis:diagnose:org:legacyapi",
|
|
6278
|
+
"diagnose:hardis:org:legacyapi",
|
|
6279
|
+
"diagnose:org:hardis:legacyapi",
|
|
6280
|
+
"diagnose:org:legacyapi:hardis",
|
|
6281
|
+
"hardis:diagnose:legacyapi:org",
|
|
6282
|
+
"diagnose:hardis:legacyapi:org",
|
|
6283
|
+
"diagnose:legacyapi:hardis:org",
|
|
6284
|
+
"diagnose:legacyapi:org:hardis",
|
|
6285
|
+
"hardis:org:legacyapi:diagnose",
|
|
6286
|
+
"org:hardis:legacyapi:diagnose",
|
|
6287
|
+
"org:legacyapi:hardis:diagnose",
|
|
6288
|
+
"org:legacyapi:diagnose:hardis",
|
|
6289
|
+
"hardis:legacyapi:org:diagnose",
|
|
6290
|
+
"legacyapi:hardis:org:diagnose",
|
|
6291
|
+
"legacyapi:org:hardis:diagnose",
|
|
6292
|
+
"legacyapi:org:diagnose:hardis",
|
|
6293
|
+
"hardis:legacyapi:diagnose:org",
|
|
6294
|
+
"legacyapi:hardis:diagnose:org",
|
|
6295
|
+
"legacyapi:diagnose:hardis:org",
|
|
6296
|
+
"legacyapi:diagnose:org:hardis"
|
|
6262
6297
|
]
|
|
6263
6298
|
},
|
|
6264
|
-
"hardis:org:diagnose:
|
|
6299
|
+
"hardis:org:diagnose:licenses": {
|
|
6265
6300
|
"aliases": [],
|
|
6266
6301
|
"args": {},
|
|
6267
|
-
"description": "
|
|
6302
|
+
"description": "\n**Lists and analyzes User Licenses and Permission Set Licenses subscribed and used in a Salesforce org.**\n\nThis command provides a comprehensive overview of your Salesforce license consumption. It's particularly useful for:\n\n- **License Management:** Understanding which licenses are active, how many are available, and how many are being used.\n- **Cost Optimization:** Identifying unused or underutilized licenses that could be reallocated or decommissioned.\n- **Compliance:** Ensuring that your organization is compliant with Salesforce licensing agreements.\n- **Monitoring:** Tracking license usage trends over time.\n\nKey functionalities:\n\n- **User License Details:** Retrieves information about standard and custom User Licenses, including `MasterLabel`, `Name`, `TotalLicenses`, and `UsedLicenses`.\n- **Permission Set License Details:** Retrieves information about Permission Set Licenses, including `MasterLabel`, `PermissionSetLicenseKey`, `TotalLicenses`, and `UsedLicenses`.\n- **Used Licenses Filter:** The `--usedonly` flag allows you to filter the report to show only licenses that have at least one `UsedLicenses` count greater than zero.\n- **CSV Report Generation:** Generates a CSV file containing all the retrieved license information, suitable for detailed analysis.\n- **Notifications:** Sends notifications to configured channels (e.g., Grafana, Slack, MS Teams) with a summary of license usage, including lists of active and used licenses.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It executes SOQL queries against the `UserLicense` and `PermissionSetLicense` objects in Salesforce to retrieve license data.\n- **Data Transformation:** It processes the query results, reformatting the data to be more readable and consistent for reporting purposes (e.g., removing `Id` and `attributes`, renaming `PermissionSetLicenseKey` to `Name`).\n- **Data Aggregation:** It aggregates license information, creating a `licensesByKey` object for quick lookups and a `usedLicenses` array for a concise list of actively used licenses.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of license data.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the license extraction process and the used licenses.\n</details>\n",
|
|
6268
6303
|
"examples": [
|
|
6269
|
-
"$ sf hardis:org:diagnose:
|
|
6270
|
-
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6304
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
6271
6305
|
],
|
|
6272
6306
|
"flags": {
|
|
6273
6307
|
"json": {
|
|
@@ -6293,13 +6327,12 @@
|
|
|
6293
6327
|
"multiple": false,
|
|
6294
6328
|
"type": "option"
|
|
6295
6329
|
},
|
|
6296
|
-
"
|
|
6297
|
-
"char": "
|
|
6298
|
-
"description": "
|
|
6299
|
-
"name": "
|
|
6300
|
-
"
|
|
6301
|
-
"
|
|
6302
|
-
"type": "option"
|
|
6330
|
+
"usedonly": {
|
|
6331
|
+
"char": "u",
|
|
6332
|
+
"description": "Filter to have only used licenses",
|
|
6333
|
+
"name": "usedonly",
|
|
6334
|
+
"allowNo": false,
|
|
6335
|
+
"type": "boolean"
|
|
6303
6336
|
},
|
|
6304
6337
|
"debug": {
|
|
6305
6338
|
"char": "d",
|
|
@@ -6339,13 +6372,13 @@
|
|
|
6339
6372
|
},
|
|
6340
6373
|
"hasDynamicHelp": true,
|
|
6341
6374
|
"hiddenAliases": [],
|
|
6342
|
-
"id": "hardis:org:diagnose:
|
|
6375
|
+
"id": "hardis:org:diagnose:licenses",
|
|
6343
6376
|
"pluginAlias": "sfdx-hardis",
|
|
6344
6377
|
"pluginName": "sfdx-hardis",
|
|
6345
6378
|
"pluginType": "core",
|
|
6346
6379
|
"strict": true,
|
|
6347
6380
|
"enableJsonFlag": true,
|
|
6348
|
-
"title": "
|
|
6381
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6349
6382
|
"requiresProject": false,
|
|
6350
6383
|
"isESM": true,
|
|
6351
6384
|
"relativePath": [
|
|
@@ -6354,42 +6387,42 @@
|
|
|
6354
6387
|
"hardis",
|
|
6355
6388
|
"org",
|
|
6356
6389
|
"diagnose",
|
|
6357
|
-
"
|
|
6390
|
+
"licenses.js"
|
|
6358
6391
|
],
|
|
6359
6392
|
"aliasPermutations": [],
|
|
6360
6393
|
"permutations": [
|
|
6361
|
-
"hardis:org:diagnose:
|
|
6362
|
-
"org:hardis:diagnose:
|
|
6363
|
-
"org:diagnose:hardis:
|
|
6364
|
-
"org:diagnose:
|
|
6365
|
-
"hardis:diagnose:org:
|
|
6366
|
-
"diagnose:hardis:org:
|
|
6367
|
-
"diagnose:org:hardis:
|
|
6368
|
-
"diagnose:org:
|
|
6369
|
-
"hardis:diagnose:
|
|
6370
|
-
"diagnose:hardis:
|
|
6371
|
-
"diagnose:
|
|
6372
|
-
"diagnose:
|
|
6373
|
-
"hardis:org:
|
|
6374
|
-
"org:hardis:
|
|
6375
|
-
"org:
|
|
6376
|
-
"org:
|
|
6377
|
-
"hardis:
|
|
6378
|
-
"
|
|
6379
|
-
"
|
|
6380
|
-
"
|
|
6381
|
-
"hardis:
|
|
6382
|
-
"
|
|
6383
|
-
"
|
|
6384
|
-
"
|
|
6394
|
+
"hardis:org:diagnose:licenses",
|
|
6395
|
+
"org:hardis:diagnose:licenses",
|
|
6396
|
+
"org:diagnose:hardis:licenses",
|
|
6397
|
+
"org:diagnose:licenses:hardis",
|
|
6398
|
+
"hardis:diagnose:org:licenses",
|
|
6399
|
+
"diagnose:hardis:org:licenses",
|
|
6400
|
+
"diagnose:org:hardis:licenses",
|
|
6401
|
+
"diagnose:org:licenses:hardis",
|
|
6402
|
+
"hardis:diagnose:licenses:org",
|
|
6403
|
+
"diagnose:hardis:licenses:org",
|
|
6404
|
+
"diagnose:licenses:hardis:org",
|
|
6405
|
+
"diagnose:licenses:org:hardis",
|
|
6406
|
+
"hardis:org:licenses:diagnose",
|
|
6407
|
+
"org:hardis:licenses:diagnose",
|
|
6408
|
+
"org:licenses:hardis:diagnose",
|
|
6409
|
+
"org:licenses:diagnose:hardis",
|
|
6410
|
+
"hardis:licenses:org:diagnose",
|
|
6411
|
+
"licenses:hardis:org:diagnose",
|
|
6412
|
+
"licenses:org:hardis:diagnose",
|
|
6413
|
+
"licenses:org:diagnose:hardis",
|
|
6414
|
+
"hardis:licenses:diagnose:org",
|
|
6415
|
+
"licenses:hardis:diagnose:org",
|
|
6416
|
+
"licenses:diagnose:hardis:org",
|
|
6417
|
+
"licenses:diagnose:org:hardis"
|
|
6385
6418
|
]
|
|
6386
6419
|
},
|
|
6387
|
-
"hardis:org:diagnose:
|
|
6420
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6388
6421
|
"aliases": [],
|
|
6389
6422
|
"args": {},
|
|
6390
|
-
"description": "
|
|
6423
|
+
"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",
|
|
6391
6424
|
"examples": [
|
|
6392
|
-
"$ sf hardis:org:diagnose:
|
|
6425
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6393
6426
|
],
|
|
6394
6427
|
"flags": {
|
|
6395
6428
|
"json": {
|
|
@@ -6453,30 +6486,13 @@
|
|
|
6453
6486
|
},
|
|
6454
6487
|
"hasDynamicHelp": true,
|
|
6455
6488
|
"hiddenAliases": [],
|
|
6456
|
-
"id": "hardis:org:diagnose:
|
|
6489
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6457
6490
|
"pluginAlias": "sfdx-hardis",
|
|
6458
6491
|
"pluginName": "sfdx-hardis",
|
|
6459
6492
|
"pluginType": "core",
|
|
6460
6493
|
"strict": true,
|
|
6461
6494
|
"enableJsonFlag": true,
|
|
6462
|
-
"title": "
|
|
6463
|
-
"allowedInactiveConnectedApps": [
|
|
6464
|
-
"Ant Migration Tool",
|
|
6465
|
-
"Chatter Desktop",
|
|
6466
|
-
"Chatter Mobile for BlackBerry",
|
|
6467
|
-
"Force.com IDE",
|
|
6468
|
-
"OIQ_Integration",
|
|
6469
|
-
"Salesforce CLI",
|
|
6470
|
-
"Salesforce Files",
|
|
6471
|
-
"Salesforce Mobile Dashboards",
|
|
6472
|
-
"Salesforce Touch",
|
|
6473
|
-
"Salesforce for Outlook",
|
|
6474
|
-
"SalesforceA",
|
|
6475
|
-
"SalesforceA for Android",
|
|
6476
|
-
"SalesforceA for iOS",
|
|
6477
|
-
"SalesforceDX Namespace Registry",
|
|
6478
|
-
"SalesforceIQ"
|
|
6479
|
-
],
|
|
6495
|
+
"title": "Check Release Updates of an org",
|
|
6480
6496
|
"requiresProject": false,
|
|
6481
6497
|
"isESM": true,
|
|
6482
6498
|
"relativePath": [
|
|
@@ -6485,56 +6501,55 @@
|
|
|
6485
6501
|
"hardis",
|
|
6486
6502
|
"org",
|
|
6487
6503
|
"diagnose",
|
|
6488
|
-
"
|
|
6504
|
+
"releaseupdates.js"
|
|
6489
6505
|
],
|
|
6490
6506
|
"aliasPermutations": [],
|
|
6491
6507
|
"permutations": [
|
|
6492
|
-
"hardis:org:diagnose:
|
|
6493
|
-
"org:hardis:diagnose:
|
|
6494
|
-
"org:diagnose:hardis:
|
|
6495
|
-
"org:diagnose:
|
|
6496
|
-
"hardis:diagnose:org:
|
|
6497
|
-
"diagnose:hardis:org:
|
|
6498
|
-
"diagnose:org:hardis:
|
|
6499
|
-
"diagnose:org:
|
|
6500
|
-
"hardis:diagnose:
|
|
6501
|
-
"diagnose:hardis:
|
|
6502
|
-
"diagnose:
|
|
6503
|
-
"diagnose:
|
|
6504
|
-
"hardis:org:
|
|
6505
|
-
"org:hardis:
|
|
6506
|
-
"org:
|
|
6507
|
-
"org:
|
|
6508
|
-
"hardis:
|
|
6509
|
-
"
|
|
6510
|
-
"
|
|
6511
|
-
"
|
|
6512
|
-
"hardis:
|
|
6513
|
-
"
|
|
6514
|
-
"
|
|
6515
|
-
"
|
|
6516
|
-
]
|
|
6517
|
-
},
|
|
6518
|
-
"hardis:org:diagnose:
|
|
6519
|
-
"aliases": [],
|
|
6520
|
-
"args": {},
|
|
6521
|
-
"description": "\n## Command Behavior\n\n**Detects
|
|
6522
|
-
"examples": [
|
|
6523
|
-
"$ sf hardis:org:diagnose:
|
|
6524
|
-
|
|
6525
|
-
|
|
6526
|
-
|
|
6527
|
-
|
|
6528
|
-
"
|
|
6529
|
-
"
|
|
6530
|
-
"
|
|
6531
|
-
"
|
|
6532
|
-
|
|
6533
|
-
|
|
6534
|
-
|
|
6535
|
-
"
|
|
6536
|
-
"
|
|
6537
|
-
"summary": "Import flag values from a directory.",
|
|
6508
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6509
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6510
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6511
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6512
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6513
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6514
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6515
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6516
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6517
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6518
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6519
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6520
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6521
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6522
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6523
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6524
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6525
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6526
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6527
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6528
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6529
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6530
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6531
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6532
|
+
]
|
|
6533
|
+
},
|
|
6534
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
6535
|
+
"aliases": [],
|
|
6536
|
+
"args": {},
|
|
6537
|
+
"description": "\n## Command Behavior\n\n**Detects unsecured Connected Apps in a Salesforce org and generates detailed reports for security analysis.**\n\nThis command is a critical security diagnostic tool that helps administrators identify Connected Apps that may pose security risks due to improper configuration. It provides comprehensive analysis of OAuth tokens and Connected App security settings to ensure proper access control.\n\nKey functionalities:\n\n- **OAuth Token Analysis:** Queries all OAuth tokens in the org using SOQL to retrieve comprehensive token information including app names, users, authorization status, and usage statistics.\n- **Security Status Assessment:** Evaluates each Connected App's security configuration by checking the `IsUsingAdminAuthorization` flag to determine if admin pre-approval is required.\n- **Unsecured App Detection:** Identifies Connected Apps that allow users to authorize themselves without admin approval, which can pose security risks.\n- **Detailed Reporting:** Generates two comprehensive CSV reports:\n - **OAuth Tokens Report:** Lists all OAuth tokens with security status, user information, and usage data\n - **Connected Apps Summary:** Aggregates unsecured Connected Apps with counts of associated OAuth tokens\n- **Visual Indicators:** Uses status icons (❌ for unsecured, ✅ for secured) to provide immediate visual feedback on security status.\n- **Security Recommendations:** Provides actionable guidance on how to secure Connected Apps through proper configuration.\n- **Notifications:** Sends alerts to configured channels (Grafana, Slack, MS Teams) with security findings and attached reports.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-security/) and can output Grafana, Slack and MsTeams Notifications.\n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/jHv8yrSK8Dg\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query Execution:** Executes a comprehensive SOQL query on the `OauthToken` object, joining with `AppMenuItem` and `User` objects to gather complete security context.\n- **Security Analysis Logic:** Analyzes the `AppMenuItem.IsUsingAdminAuthorization` field to determine if a Connected App requires admin pre-approval for user authorization.\n- **Data Transformation:** Processes raw SOQL results to add security status indicators and reorganize data for optimal reporting and analysis.\n- **Aggregation Processing:** Groups OAuth tokens by Connected App name to provide summary statistics and identify the most problematic applications.\n- **Report Generation:** Uses `generateCsvFile` to create structured CSV reports with proper formatting and metadata for easy analysis and sharing.\n- **Notification Integration:** Integrates with the `NotifProvider` to send security alerts with detailed metrics, including the number of unsecured Connected Apps and associated OAuth tokens.\n- **File Management:** Generates multiple output formats (CSV, XLSX) and manages file paths using `generateReportPath` for consistent report organization.\n- **Connection Management:** Uses `setConnectionVariables` to ensure proper authentication context for notification providers that require org connection details.\n</details>\n",
|
|
6538
|
+
"examples": [
|
|
6539
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
6540
|
+
],
|
|
6541
|
+
"flags": {
|
|
6542
|
+
"json": {
|
|
6543
|
+
"description": "Format output as json.",
|
|
6544
|
+
"helpGroup": "GLOBAL",
|
|
6545
|
+
"name": "json",
|
|
6546
|
+
"allowNo": false,
|
|
6547
|
+
"type": "boolean"
|
|
6548
|
+
},
|
|
6549
|
+
"flags-dir": {
|
|
6550
|
+
"helpGroup": "GLOBAL",
|
|
6551
|
+
"name": "flags-dir",
|
|
6552
|
+
"summary": "Import flag values from a directory.",
|
|
6538
6553
|
"hasDynamicHelp": false,
|
|
6539
6554
|
"multiple": false,
|
|
6540
6555
|
"type": "option"
|
|
@@ -6585,32 +6600,14 @@
|
|
|
6585
6600
|
},
|
|
6586
6601
|
"hasDynamicHelp": true,
|
|
6587
6602
|
"hiddenAliases": [],
|
|
6588
|
-
"id": "hardis:org:diagnose:
|
|
6603
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
6589
6604
|
"pluginAlias": "sfdx-hardis",
|
|
6590
6605
|
"pluginName": "sfdx-hardis",
|
|
6591
6606
|
"pluginType": "core",
|
|
6592
6607
|
"strict": true,
|
|
6593
6608
|
"enableJsonFlag": true,
|
|
6594
|
-
"title": "Detect
|
|
6609
|
+
"title": "Detect Unsecured Connected Apps",
|
|
6595
6610
|
"requiresProject": false,
|
|
6596
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
6597
|
-
"Sales_User"
|
|
6598
|
-
],
|
|
6599
|
-
"permSetsPermSetLicenses": [
|
|
6600
|
-
{
|
|
6601
|
-
"permSet": "Sales_User",
|
|
6602
|
-
"permSetLicense": "SalesUserPsl"
|
|
6603
|
-
}
|
|
6604
|
-
],
|
|
6605
|
-
"profilesPermissionSetLicenses": [
|
|
6606
|
-
{
|
|
6607
|
-
"profile": "Salesforce API Only",
|
|
6608
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6609
|
-
}
|
|
6610
|
-
],
|
|
6611
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6612
|
-
"IdentityConnect"
|
|
6613
|
-
],
|
|
6614
6611
|
"isESM": true,
|
|
6615
6612
|
"relativePath": [
|
|
6616
6613
|
"lib",
|
|
@@ -6618,46 +6615,43 @@
|
|
|
6618
6615
|
"hardis",
|
|
6619
6616
|
"org",
|
|
6620
6617
|
"diagnose",
|
|
6621
|
-
"
|
|
6618
|
+
"unsecure-connected-apps.js"
|
|
6622
6619
|
],
|
|
6623
6620
|
"aliasPermutations": [],
|
|
6624
6621
|
"permutations": [
|
|
6625
|
-
"hardis:org:diagnose:
|
|
6626
|
-
"org:hardis:diagnose:
|
|
6627
|
-
"org:diagnose:hardis:
|
|
6628
|
-
"org:diagnose:
|
|
6629
|
-
"hardis:diagnose:org:
|
|
6630
|
-
"diagnose:hardis:org:
|
|
6631
|
-
"diagnose:org:hardis:
|
|
6632
|
-
"diagnose:org:
|
|
6633
|
-
"hardis:diagnose:
|
|
6634
|
-
"diagnose:hardis:
|
|
6635
|
-
"diagnose:
|
|
6636
|
-
"diagnose:
|
|
6637
|
-
"hardis:org:
|
|
6638
|
-
"org:hardis:
|
|
6639
|
-
"org:
|
|
6640
|
-
"org:
|
|
6641
|
-
"hardis:
|
|
6642
|
-
"
|
|
6643
|
-
"
|
|
6644
|
-
"
|
|
6645
|
-
"hardis:
|
|
6646
|
-
"
|
|
6647
|
-
"
|
|
6648
|
-
"
|
|
6622
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
6623
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
6624
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
6625
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
6626
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
6627
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
6628
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
6629
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
6630
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
6631
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
6632
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
6633
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
6634
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
6635
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
6636
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
6637
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
6638
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
6639
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
6640
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
6641
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
6642
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
6643
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
6644
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
6645
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
6649
6646
|
]
|
|
6650
6647
|
},
|
|
6651
|
-
"hardis:org:diagnose:
|
|
6648
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6652
6649
|
"aliases": [],
|
|
6653
6650
|
"args": {},
|
|
6654
|
-
"description": "
|
|
6651
|
+
"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",
|
|
6655
6652
|
"examples": [
|
|
6656
|
-
"$ sf hardis:org:diagnose:
|
|
6657
|
-
"$ sf hardis:org:diagnose:
|
|
6658
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6659
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6660
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6653
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6654
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6661
6655
|
],
|
|
6662
6656
|
"flags": {
|
|
6663
6657
|
"json": {
|
|
@@ -6691,33 +6685,6 @@
|
|
|
6691
6685
|
"multiple": false,
|
|
6692
6686
|
"type": "option"
|
|
6693
6687
|
},
|
|
6694
|
-
"licensetypes": {
|
|
6695
|
-
"char": "l",
|
|
6696
|
-
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6697
|
-
"name": "licensetypes",
|
|
6698
|
-
"hasDynamicHelp": false,
|
|
6699
|
-
"multiple": false,
|
|
6700
|
-
"options": [
|
|
6701
|
-
"all",
|
|
6702
|
-
"all-crm",
|
|
6703
|
-
"all-paying"
|
|
6704
|
-
],
|
|
6705
|
-
"type": "option"
|
|
6706
|
-
},
|
|
6707
|
-
"licenseidentifiers": {
|
|
6708
|
-
"char": "i",
|
|
6709
|
-
"description": "Comma-separated list of license identifiers, in case licensetypes is not used.. Identifiers available at https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm",
|
|
6710
|
-
"name": "licenseidentifiers",
|
|
6711
|
-
"hasDynamicHelp": false,
|
|
6712
|
-
"multiple": false,
|
|
6713
|
-
"type": "option"
|
|
6714
|
-
},
|
|
6715
|
-
"returnactiveusers": {
|
|
6716
|
-
"description": "Inverts the command by returning the active users",
|
|
6717
|
-
"name": "returnactiveusers",
|
|
6718
|
-
"allowNo": false,
|
|
6719
|
-
"type": "boolean"
|
|
6720
|
-
},
|
|
6721
6688
|
"debug": {
|
|
6722
6689
|
"char": "d",
|
|
6723
6690
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6756,13 +6723,13 @@
|
|
|
6756
6723
|
},
|
|
6757
6724
|
"hasDynamicHelp": true,
|
|
6758
6725
|
"hiddenAliases": [],
|
|
6759
|
-
"id": "hardis:org:diagnose:
|
|
6726
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6760
6727
|
"pluginAlias": "sfdx-hardis",
|
|
6761
6728
|
"pluginName": "sfdx-hardis",
|
|
6762
6729
|
"pluginType": "core",
|
|
6763
6730
|
"strict": true,
|
|
6764
6731
|
"enableJsonFlag": true,
|
|
6765
|
-
"title": "Detect unused
|
|
6732
|
+
"title": "Detect unused Apex classes in an org",
|
|
6766
6733
|
"requiresProject": false,
|
|
6767
6734
|
"isESM": true,
|
|
6768
6735
|
"relativePath": [
|
|
@@ -6771,42 +6738,42 @@
|
|
|
6771
6738
|
"hardis",
|
|
6772
6739
|
"org",
|
|
6773
6740
|
"diagnose",
|
|
6774
|
-
"
|
|
6741
|
+
"unused-apex-classes.js"
|
|
6775
6742
|
],
|
|
6776
6743
|
"aliasPermutations": [],
|
|
6777
6744
|
"permutations": [
|
|
6778
|
-
"hardis:org:diagnose:
|
|
6779
|
-
"org:hardis:diagnose:
|
|
6780
|
-
"org:diagnose:hardis:
|
|
6781
|
-
"org:diagnose:
|
|
6782
|
-
"hardis:diagnose:org:
|
|
6783
|
-
"diagnose:hardis:org:
|
|
6784
|
-
"diagnose:org:hardis:
|
|
6785
|
-
"diagnose:org:
|
|
6786
|
-
"hardis:diagnose:
|
|
6787
|
-
"diagnose:hardis:
|
|
6788
|
-
"diagnose:
|
|
6789
|
-
"diagnose:
|
|
6790
|
-
"hardis:org:
|
|
6791
|
-
"org:hardis:
|
|
6792
|
-
"org:
|
|
6793
|
-
"org:
|
|
6794
|
-
"hardis:
|
|
6795
|
-
"
|
|
6796
|
-
"
|
|
6797
|
-
"
|
|
6798
|
-
"hardis:
|
|
6799
|
-
"
|
|
6800
|
-
"
|
|
6801
|
-
"
|
|
6745
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6746
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6747
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6748
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6749
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6750
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6751
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6752
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6753
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6754
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6755
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6756
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6757
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6758
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6759
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6760
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6761
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6762
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6763
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6764
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6765
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6766
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6767
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6768
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6802
6769
|
]
|
|
6803
6770
|
},
|
|
6804
|
-
"hardis:org:
|
|
6771
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6805
6772
|
"aliases": [],
|
|
6806
6773
|
"args": {},
|
|
6807
|
-
"description": "\n## Command Behavior\n\n**
|
|
6774
|
+
"description": "\n## Command Behavior\n\n**Identifies and reports on potentially unused Connected Apps in a Salesforce org, suggesting candidates for deletion or deactivation.**\n\nThis command helps improve org security and reduce technical debt by pinpointing Connected Apps that are no longer actively used. Connected Apps can pose security risks if left unmonitored, and cleaning them up contributes to a healthier Salesforce environment.\n\nKey functionalities:\n\n- **Connected App Data Collection:** Gathers information about all Connected Apps in the org, including creation and last modified dates, and associated users.\n- **Usage Analysis:** Analyzes `LoginHistory` and `OAuthToken` records to determine the last usage date of each Connected App.\n- **Inactivity Detection:** Flags Connected Apps as potentially unused if they have no recent login history or OAuth token usage.\n- **Accessibility Check:** Examines Connected App metadata to identify if they are accessible (e.g., if they require admin approval and have no profiles or permission sets assigned).\n- **Ignored Apps:** Automatically ignores a predefined list of common Salesforce Connected Apps (e.g., `Salesforce CLI`, `Salesforce Mobile Dashboards`). You can extend this list by defining the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n- **CSV Report Generation:** Generates a CSV file containing details of all analyzed Connected Apps, including their usage status, last usage date, and reasons for being flagged as potentially unused.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of potentially unused Connected Apps.\n\n**Default Ignored Connected Apps:**\n\n- Ant Migration Tool\n- Chatter Desktop\n- Chatter Mobile for BlackBerry\n- Force.com IDE\n- OIQ_Integration\n- Salesforce CLI\n- Salesforce Files\n- Salesforce Mobile Dashboards\n- Salesforce Touch\n- Salesforce for Outlook\n- SalesforceA\n- SalesforceA for Android\n- SalesforceA for iOS\n- SalesforceDX Namespace Registry\n- SalesforceIQ\n\nYou can add more ignored apps by defining a comma-separated list of names in the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n\n_Example: \nALLOWED_INACTIVE_CONNECTED_APPS=My App 1,My App 2, My App 3_\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-connected-apps/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It performs SOQL queries against `ConnectedApplication`, `LoginHistory`, and `OAuthToken` objects to gather comprehensive data about Connected Apps and their usage.\n- **Temporary SFDX Project:** It creates a temporary SFDX project to retrieve Connected App metadata, allowing for local parsing and analysis of their XML files.\n- **Metadata Parsing:** It parses the `connectedApp-meta.xml` files to check for `isAdminApproved` and the presence of `profileName` or `permissionsetName` to determine accessibility.\n- **Data Correlation:** It correlates data from various Salesforce objects to build a complete picture of each Connected App's usage and status.\n- **Date Calculation:** Uses `moment` to calculate the time since the last OAuth token usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused Connected Apps.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **File System Operations:** Uses `fs-extra` for creating and removing temporary directories and files.\n- **Environment Variable Reading:** Reads the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable to customize the list of ignored Connected Apps.\n</details>\n",
|
|
6808
6775
|
"examples": [
|
|
6809
|
-
"$ sf hardis:org:
|
|
6776
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6810
6777
|
],
|
|
6811
6778
|
"flags": {
|
|
6812
6779
|
"json": {
|
|
@@ -6824,48 +6791,14 @@
|
|
|
6824
6791
|
"multiple": false,
|
|
6825
6792
|
"type": "option"
|
|
6826
6793
|
},
|
|
6827
|
-
"
|
|
6828
|
-
"char": "
|
|
6829
|
-
"description": "
|
|
6830
|
-
"name": "
|
|
6831
|
-
"hasDynamicHelp": false,
|
|
6832
|
-
"multiple": false,
|
|
6833
|
-
"type": "option"
|
|
6834
|
-
},
|
|
6835
|
-
"chunksize": {
|
|
6836
|
-
"char": "c",
|
|
6837
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
6838
|
-
"name": "chunksize",
|
|
6839
|
-
"default": 1000,
|
|
6840
|
-
"hasDynamicHelp": false,
|
|
6841
|
-
"multiple": false,
|
|
6842
|
-
"type": "option"
|
|
6843
|
-
},
|
|
6844
|
-
"polltimeout": {
|
|
6845
|
-
"char": "t",
|
|
6846
|
-
"description": "Timeout in MS for Bulk API calls",
|
|
6847
|
-
"name": "polltimeout",
|
|
6848
|
-
"default": 300000,
|
|
6849
|
-
"hasDynamicHelp": false,
|
|
6850
|
-
"multiple": false,
|
|
6851
|
-
"type": "option"
|
|
6852
|
-
},
|
|
6853
|
-
"startchunknumber": {
|
|
6854
|
-
"char": "s",
|
|
6855
|
-
"description": "Chunk number to start from",
|
|
6856
|
-
"name": "startchunknumber",
|
|
6857
|
-
"default": 0,
|
|
6794
|
+
"outputfile": {
|
|
6795
|
+
"char": "f",
|
|
6796
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6797
|
+
"name": "outputfile",
|
|
6858
6798
|
"hasDynamicHelp": false,
|
|
6859
6799
|
"multiple": false,
|
|
6860
6800
|
"type": "option"
|
|
6861
6801
|
},
|
|
6862
|
-
"resume": {
|
|
6863
|
-
"char": "r",
|
|
6864
|
-
"description": "Resume previous export by checking existing files (default in CI)",
|
|
6865
|
-
"name": "resume",
|
|
6866
|
-
"allowNo": false,
|
|
6867
|
-
"type": "boolean"
|
|
6868
|
-
},
|
|
6869
6802
|
"debug": {
|
|
6870
6803
|
"char": "d",
|
|
6871
6804
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6904,13 +6837,30 @@
|
|
|
6904
6837
|
},
|
|
6905
6838
|
"hasDynamicHelp": true,
|
|
6906
6839
|
"hiddenAliases": [],
|
|
6907
|
-
"id": "hardis:org:
|
|
6840
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6908
6841
|
"pluginAlias": "sfdx-hardis",
|
|
6909
6842
|
"pluginName": "sfdx-hardis",
|
|
6910
6843
|
"pluginType": "core",
|
|
6911
6844
|
"strict": true,
|
|
6912
6845
|
"enableJsonFlag": true,
|
|
6913
|
-
"title": "
|
|
6846
|
+
"title": "Unused Connected Apps in an org",
|
|
6847
|
+
"allowedInactiveConnectedApps": [
|
|
6848
|
+
"Ant Migration Tool",
|
|
6849
|
+
"Chatter Desktop",
|
|
6850
|
+
"Chatter Mobile for BlackBerry",
|
|
6851
|
+
"Force.com IDE",
|
|
6852
|
+
"OIQ_Integration",
|
|
6853
|
+
"Salesforce CLI",
|
|
6854
|
+
"Salesforce Files",
|
|
6855
|
+
"Salesforce Mobile Dashboards",
|
|
6856
|
+
"Salesforce Touch",
|
|
6857
|
+
"Salesforce for Outlook",
|
|
6858
|
+
"SalesforceA",
|
|
6859
|
+
"SalesforceA for Android",
|
|
6860
|
+
"SalesforceA for iOS",
|
|
6861
|
+
"SalesforceDX Namespace Registry",
|
|
6862
|
+
"SalesforceIQ"
|
|
6863
|
+
],
|
|
6914
6864
|
"requiresProject": false,
|
|
6915
6865
|
"isESM": true,
|
|
6916
6866
|
"relativePath": [
|
|
@@ -6918,43 +6868,44 @@
|
|
|
6918
6868
|
"commands",
|
|
6919
6869
|
"hardis",
|
|
6920
6870
|
"org",
|
|
6921
|
-
"
|
|
6922
|
-
"
|
|
6871
|
+
"diagnose",
|
|
6872
|
+
"unused-connected-apps.js"
|
|
6923
6873
|
],
|
|
6924
6874
|
"aliasPermutations": [],
|
|
6925
6875
|
"permutations": [
|
|
6926
|
-
"hardis:org:
|
|
6927
|
-
"org:hardis:
|
|
6928
|
-
"org:
|
|
6929
|
-
"org:
|
|
6930
|
-
"hardis:
|
|
6931
|
-
"
|
|
6932
|
-
"
|
|
6933
|
-
"
|
|
6934
|
-
"hardis:
|
|
6935
|
-
"
|
|
6936
|
-
"
|
|
6937
|
-
"
|
|
6938
|
-
"hardis:org:
|
|
6939
|
-
"org:hardis:
|
|
6940
|
-
"org:
|
|
6941
|
-
"org:
|
|
6942
|
-
"hardis:
|
|
6943
|
-
"
|
|
6944
|
-
"
|
|
6945
|
-
"
|
|
6946
|
-
"hardis:
|
|
6947
|
-
"
|
|
6948
|
-
"
|
|
6949
|
-
"
|
|
6876
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6877
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6878
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6879
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6880
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6881
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6882
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6883
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6884
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6885
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6886
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6887
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6888
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6889
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6890
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6891
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6892
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6893
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6894
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6895
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6896
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6897
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6898
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6899
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6950
6900
|
]
|
|
6951
6901
|
},
|
|
6952
|
-
"hardis:org:
|
|
6902
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6953
6903
|
"aliases": [],
|
|
6954
6904
|
"args": {},
|
|
6955
|
-
"description": "\
|
|
6905
|
+
"description": "\n## Command Behavior\n\n**Detects and suggests the deletion of unused Permission Set License Assignments in a Salesforce org.**\n\nWhen a Permission Set (PS) linked to a Permission Set License (PSL) is assigned to a user, a Permission Set License Assignment (PSLA) is automatically created. However, when that PS is unassigned from the user, the PSLA is *not* automatically deleted. This can lead to organizations being charged for unused PSLAs, representing a hidden cost and technical debt.\n\nThis command identifies such useless PSLAs and provides options to delete them, helping to optimize license usage and reduce unnecessary expenses.\n\nKey functionalities:\n\n- **PSLA Detection:** Queries the Salesforce org to find all active PSLAs.\n- **Usage Verification:** Correlates PSLAs with actual Permission Set Assignments and Permission Set Group Assignments to determine if the underlying Permission Sets are still assigned to the user.\n- **Special Case Handling:** Accounts for specific scenarios where profiles might implicitly assign PSLAs (e.g., `Salesforce API Only` profile assigning `SalesforceAPIIntegrationPsl`) and allows for always excluding certain PSLAs from the unused check.\n- **Reporting:** Generates a CSV report of all identified unused PSLAs, including the user and the associated Permission Set License.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of unused PSLAs.\n- **Interactive Deletion:** In non-CI environments, it offers an interactive prompt to bulk delete the identified unused PSLAs.\n\nMany thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command 😊\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-licenses/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves extensive querying of Salesforce objects and data correlation:\n\n- **SOQL Queries (Bulk API):** It uses `bulkQuery` and `bulkQueryChunksIn` to efficiently retrieve large volumes of data from `PermissionSetLicenseAssign`, `PermissionSetLicense`, `PermissionSet`, `PermissionSetGroupComponent`, and `PermissionSetAssignment` objects.\n- **Data Correlation:** It meticulously correlates data across these objects to determine if a `PermissionSetLicenseAssign` record has a corresponding active assignment to a Permission Set or Permission Set Group for the same user.\n- **Filtering Logic:** It applies complex filtering logic to exclude PSLAs that are genuinely in use or are part of predefined exceptions (e.g., `alwaysExcludeForActiveUsersPermissionSetLicenses`).\n- **Bulk Deletion:** If the user opts to delete unused PSLAs, it uses `bulkUpdate` with the `delete` operation to efficiently remove multiple records.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused PSLAs.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Interaction:** Uses `prompts` for interactive confirmation before performing deletion operations.\n</details>\n",
|
|
6956
6906
|
"examples": [
|
|
6957
|
-
"$ sf hardis:org:
|
|
6907
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6908
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6958
6909
|
],
|
|
6959
6910
|
"flags": {
|
|
6960
6911
|
"json": {
|
|
@@ -6972,21 +6923,14 @@
|
|
|
6972
6923
|
"multiple": false,
|
|
6973
6924
|
"type": "option"
|
|
6974
6925
|
},
|
|
6975
|
-
"
|
|
6976
|
-
"char": "
|
|
6977
|
-
"description": "
|
|
6978
|
-
"name": "
|
|
6926
|
+
"outputfile": {
|
|
6927
|
+
"char": "f",
|
|
6928
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6929
|
+
"name": "outputfile",
|
|
6979
6930
|
"hasDynamicHelp": false,
|
|
6980
6931
|
"multiple": false,
|
|
6981
6932
|
"type": "option"
|
|
6982
6933
|
},
|
|
6983
|
-
"overwrite": {
|
|
6984
|
-
"char": "f",
|
|
6985
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
6986
|
-
"name": "overwrite",
|
|
6987
|
-
"allowNo": false,
|
|
6988
|
-
"type": "boolean"
|
|
6989
|
-
},
|
|
6990
6934
|
"debug": {
|
|
6991
6935
|
"char": "d",
|
|
6992
6936
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7025,58 +6969,79 @@
|
|
|
7025
6969
|
},
|
|
7026
6970
|
"hasDynamicHelp": true,
|
|
7027
6971
|
"hiddenAliases": [],
|
|
7028
|
-
"id": "hardis:org:
|
|
6972
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
7029
6973
|
"pluginAlias": "sfdx-hardis",
|
|
7030
6974
|
"pluginName": "sfdx-hardis",
|
|
7031
6975
|
"pluginType": "core",
|
|
7032
6976
|
"strict": true,
|
|
7033
6977
|
"enableJsonFlag": true,
|
|
7034
|
-
"title": "
|
|
6978
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
7035
6979
|
"requiresProject": false,
|
|
6980
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6981
|
+
"Sales_User"
|
|
6982
|
+
],
|
|
6983
|
+
"permSetsPermSetLicenses": [
|
|
6984
|
+
{
|
|
6985
|
+
"permSet": "Sales_User",
|
|
6986
|
+
"permSetLicense": "SalesUserPsl"
|
|
6987
|
+
}
|
|
6988
|
+
],
|
|
6989
|
+
"profilesPermissionSetLicenses": [
|
|
6990
|
+
{
|
|
6991
|
+
"profile": "Salesforce API Only",
|
|
6992
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6993
|
+
}
|
|
6994
|
+
],
|
|
6995
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6996
|
+
"IdentityConnect"
|
|
6997
|
+
],
|
|
7036
6998
|
"isESM": true,
|
|
7037
6999
|
"relativePath": [
|
|
7038
7000
|
"lib",
|
|
7039
7001
|
"commands",
|
|
7040
7002
|
"hardis",
|
|
7041
7003
|
"org",
|
|
7042
|
-
"
|
|
7043
|
-
"
|
|
7004
|
+
"diagnose",
|
|
7005
|
+
"unusedlicenses.js"
|
|
7044
7006
|
],
|
|
7045
7007
|
"aliasPermutations": [],
|
|
7046
7008
|
"permutations": [
|
|
7047
|
-
"hardis:org:
|
|
7048
|
-
"org:hardis:
|
|
7049
|
-
"org:
|
|
7050
|
-
"org:
|
|
7051
|
-
"hardis:
|
|
7052
|
-
"
|
|
7053
|
-
"
|
|
7054
|
-
"
|
|
7055
|
-
"hardis:
|
|
7056
|
-
"
|
|
7057
|
-
"
|
|
7058
|
-
"
|
|
7059
|
-
"hardis:org:
|
|
7060
|
-
"org:hardis:
|
|
7061
|
-
"org:
|
|
7062
|
-
"org:
|
|
7063
|
-
"hardis:
|
|
7064
|
-
"
|
|
7065
|
-
"
|
|
7066
|
-
"
|
|
7067
|
-
"hardis:
|
|
7068
|
-
"
|
|
7069
|
-
"
|
|
7070
|
-
"
|
|
7009
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
7010
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
7011
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
7012
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
7013
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
7014
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
7015
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
7016
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
7017
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
7018
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
7019
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
7020
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
7021
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
7022
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
7023
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
7024
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
7025
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
7026
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
7027
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
7028
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
7029
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
7030
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
7031
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
7032
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
7071
7033
|
]
|
|
7072
7034
|
},
|
|
7073
|
-
"hardis:org:
|
|
7035
|
+
"hardis:org:diagnose:unusedusers": {
|
|
7074
7036
|
"aliases": [],
|
|
7075
7037
|
"args": {},
|
|
7076
|
-
"description": "
|
|
7038
|
+
"description": "\n## Command Behavior\n\n**Detects and reports on inactive or unused Salesforce user accounts, helping to optimize license usage and enhance security.**\n\nEfficient user management is vital in Salesforce to ensure resources are optimized and costs are controlled. However, inactive or unused user accounts can often go unnoticed, leading to wasted licenses and potential security risks. This tool addresses this challenge by enabling administrators to identify users who haven't logged in within a specified period.\n\nBy analyzing user login activity and last login timestamps, this feature highlights inactive user accounts, allowing administrators to take appropriate action. Whether it's deactivating dormant accounts, freeing up licenses, or ensuring compliance with security policies, this functionality empowers administrators to maintain a lean and secure Salesforce environment.\n\nKey functionalities:\n\n- **Inactivity Detection:** Identifies users who have not logged in for a specified number of days (`--days` flag, default 180 days in CI, 365 days otherwise).\n- **License Type Filtering:** Allows filtering users by license type using `--licensetypes` (e.g., `all-crm`, `all-paying`) or specific license identifiers using `--licenseidentifiers`.\n - `all-crm`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT` licenses.\n - `all-paying`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT`, `PID_Customer_Community`, `PID_Customer_Community_Login`, `PID_Partner_Community`, `PID_Partner_Community_Login` licenses.\n - Note: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/sfdx_cli_reference/sforce_api_objects_userlicense.htm).\n- **Active User Retrieval:** The `--returnactiveusers` flag inverts the command, allowing you to retrieve active users who *have* logged in during the specified period.\n- **CSV Report Generation:** Generates a CSV file containing details of all identified users (inactive or active), including their last login date, profile, and license information.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of inactive or active users.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-users/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query (Bulk API):** It uses `bulkQuery` to efficiently retrieve user records from the Salesforce `User` object. The SOQL query dynamically constructs its WHERE clause based on the `--days`, `--licensetypes`, `--licenseidentifiers`, and `--returnactiveusers` flags.\n- **Interactive Prompts:** Uses `prompts` to interactively ask the user for the number of inactive days and license types if not provided via flags.\n- **License Mapping:** Internally maps common license type aliases (e.g., `all-crm`) to their corresponding Salesforce `LicenseDefinitionKey` values.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of users.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides a summary of the findings in the console, indicating the number of inactive or active users found.\n</details>",
|
|
7077
7039
|
"examples": [
|
|
7078
|
-
"$ sf hardis:org:
|
|
7079
|
-
"$ sf hardis:org:
|
|
7040
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
7041
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
7042
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
7043
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
7044
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7080
7045
|
],
|
|
7081
7046
|
"flags": {
|
|
7082
7047
|
"json": {
|
|
@@ -7094,14 +7059,49 @@
|
|
|
7094
7059
|
"multiple": false,
|
|
7095
7060
|
"type": "option"
|
|
7096
7061
|
},
|
|
7097
|
-
"
|
|
7062
|
+
"outputfile": {
|
|
7063
|
+
"char": "f",
|
|
7064
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7065
|
+
"name": "outputfile",
|
|
7066
|
+
"hasDynamicHelp": false,
|
|
7067
|
+
"multiple": false,
|
|
7068
|
+
"type": "option"
|
|
7069
|
+
},
|
|
7070
|
+
"days": {
|
|
7071
|
+
"char": "t",
|
|
7072
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7073
|
+
"name": "days",
|
|
7074
|
+
"hasDynamicHelp": false,
|
|
7075
|
+
"multiple": false,
|
|
7076
|
+
"type": "option"
|
|
7077
|
+
},
|
|
7078
|
+
"licensetypes": {
|
|
7098
7079
|
"char": "l",
|
|
7099
|
-
"description": "
|
|
7100
|
-
"name": "
|
|
7080
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
7081
|
+
"name": "licensetypes",
|
|
7082
|
+
"hasDynamicHelp": false,
|
|
7083
|
+
"multiple": false,
|
|
7084
|
+
"options": [
|
|
7085
|
+
"all",
|
|
7086
|
+
"all-crm",
|
|
7087
|
+
"all-paying"
|
|
7088
|
+
],
|
|
7089
|
+
"type": "option"
|
|
7090
|
+
},
|
|
7091
|
+
"licenseidentifiers": {
|
|
7092
|
+
"char": "i",
|
|
7093
|
+
"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",
|
|
7094
|
+
"name": "licenseidentifiers",
|
|
7101
7095
|
"hasDynamicHelp": false,
|
|
7102
7096
|
"multiple": false,
|
|
7103
7097
|
"type": "option"
|
|
7104
7098
|
},
|
|
7099
|
+
"returnactiveusers": {
|
|
7100
|
+
"description": "Inverts the command by returning the active users",
|
|
7101
|
+
"name": "returnactiveusers",
|
|
7102
|
+
"allowNo": false,
|
|
7103
|
+
"type": "boolean"
|
|
7104
|
+
},
|
|
7105
7105
|
"debug": {
|
|
7106
7106
|
"char": "d",
|
|
7107
7107
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7140,49 +7140,49 @@
|
|
|
7140
7140
|
},
|
|
7141
7141
|
"hasDynamicHelp": true,
|
|
7142
7142
|
"hiddenAliases": [],
|
|
7143
|
-
"id": "hardis:org:
|
|
7143
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
7144
7144
|
"pluginAlias": "sfdx-hardis",
|
|
7145
7145
|
"pluginName": "sfdx-hardis",
|
|
7146
7146
|
"pluginType": "core",
|
|
7147
7147
|
"strict": true,
|
|
7148
7148
|
"enableJsonFlag": true,
|
|
7149
|
-
"title": "
|
|
7150
|
-
"requiresProject":
|
|
7149
|
+
"title": "Detect unused Users in Salesforce",
|
|
7150
|
+
"requiresProject": false,
|
|
7151
7151
|
"isESM": true,
|
|
7152
7152
|
"relativePath": [
|
|
7153
7153
|
"lib",
|
|
7154
7154
|
"commands",
|
|
7155
7155
|
"hardis",
|
|
7156
7156
|
"org",
|
|
7157
|
-
"
|
|
7158
|
-
"
|
|
7157
|
+
"diagnose",
|
|
7158
|
+
"unusedusers.js"
|
|
7159
7159
|
],
|
|
7160
7160
|
"aliasPermutations": [],
|
|
7161
7161
|
"permutations": [
|
|
7162
|
-
"hardis:org:
|
|
7163
|
-
"org:hardis:
|
|
7164
|
-
"org:
|
|
7165
|
-
"org:
|
|
7166
|
-
"hardis:
|
|
7167
|
-
"
|
|
7168
|
-
"
|
|
7169
|
-
"
|
|
7170
|
-
"hardis:
|
|
7171
|
-
"
|
|
7172
|
-
"
|
|
7173
|
-
"
|
|
7174
|
-
"hardis:org:
|
|
7175
|
-
"org:hardis:
|
|
7176
|
-
"org:
|
|
7177
|
-
"org:
|
|
7178
|
-
"hardis:
|
|
7179
|
-
"
|
|
7180
|
-
"
|
|
7181
|
-
"
|
|
7182
|
-
"hardis:
|
|
7183
|
-
"
|
|
7184
|
-
"
|
|
7185
|
-
"
|
|
7162
|
+
"hardis:org:diagnose:unusedusers",
|
|
7163
|
+
"org:hardis:diagnose:unusedusers",
|
|
7164
|
+
"org:diagnose:hardis:unusedusers",
|
|
7165
|
+
"org:diagnose:unusedusers:hardis",
|
|
7166
|
+
"hardis:diagnose:org:unusedusers",
|
|
7167
|
+
"diagnose:hardis:org:unusedusers",
|
|
7168
|
+
"diagnose:org:hardis:unusedusers",
|
|
7169
|
+
"diagnose:org:unusedusers:hardis",
|
|
7170
|
+
"hardis:diagnose:unusedusers:org",
|
|
7171
|
+
"diagnose:hardis:unusedusers:org",
|
|
7172
|
+
"diagnose:unusedusers:hardis:org",
|
|
7173
|
+
"diagnose:unusedusers:org:hardis",
|
|
7174
|
+
"hardis:org:unusedusers:diagnose",
|
|
7175
|
+
"org:hardis:unusedusers:diagnose",
|
|
7176
|
+
"org:unusedusers:hardis:diagnose",
|
|
7177
|
+
"org:unusedusers:diagnose:hardis",
|
|
7178
|
+
"hardis:unusedusers:org:diagnose",
|
|
7179
|
+
"unusedusers:hardis:org:diagnose",
|
|
7180
|
+
"unusedusers:org:hardis:diagnose",
|
|
7181
|
+
"unusedusers:org:diagnose:hardis",
|
|
7182
|
+
"hardis:unusedusers:diagnose:org",
|
|
7183
|
+
"unusedusers:hardis:diagnose:org",
|
|
7184
|
+
"unusedusers:diagnose:hardis:org",
|
|
7185
|
+
"unusedusers:diagnose:org:hardis"
|
|
7186
7186
|
]
|
|
7187
7187
|
},
|
|
7188
7188
|
"hardis:org:generate:packagexmlfull": {
|
|
@@ -9689,6 +9689,109 @@
|
|
|
9689
9689
|
"remotesites:audit:project:hardis"
|
|
9690
9690
|
]
|
|
9691
9691
|
},
|
|
9692
|
+
"hardis:project:convert:profilestopermsets": {
|
|
9693
|
+
"aliases": [],
|
|
9694
|
+
"args": {},
|
|
9695
|
+
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
9696
|
+
"examples": [
|
|
9697
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
9698
|
+
],
|
|
9699
|
+
"flags": {
|
|
9700
|
+
"json": {
|
|
9701
|
+
"description": "Format output as json.",
|
|
9702
|
+
"helpGroup": "GLOBAL",
|
|
9703
|
+
"name": "json",
|
|
9704
|
+
"allowNo": false,
|
|
9705
|
+
"type": "boolean"
|
|
9706
|
+
},
|
|
9707
|
+
"flags-dir": {
|
|
9708
|
+
"helpGroup": "GLOBAL",
|
|
9709
|
+
"name": "flags-dir",
|
|
9710
|
+
"summary": "Import flag values from a directory.",
|
|
9711
|
+
"hasDynamicHelp": false,
|
|
9712
|
+
"multiple": false,
|
|
9713
|
+
"type": "option"
|
|
9714
|
+
},
|
|
9715
|
+
"except": {
|
|
9716
|
+
"char": "e",
|
|
9717
|
+
"description": "List of filters",
|
|
9718
|
+
"name": "except",
|
|
9719
|
+
"default": [],
|
|
9720
|
+
"hasDynamicHelp": false,
|
|
9721
|
+
"multiple": true,
|
|
9722
|
+
"type": "option"
|
|
9723
|
+
},
|
|
9724
|
+
"debug": {
|
|
9725
|
+
"char": "d",
|
|
9726
|
+
"description": "Activate debug mode (more logs)",
|
|
9727
|
+
"name": "debug",
|
|
9728
|
+
"allowNo": false,
|
|
9729
|
+
"type": "boolean"
|
|
9730
|
+
},
|
|
9731
|
+
"websocket": {
|
|
9732
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9733
|
+
"name": "websocket",
|
|
9734
|
+
"hasDynamicHelp": false,
|
|
9735
|
+
"multiple": false,
|
|
9736
|
+
"type": "option"
|
|
9737
|
+
},
|
|
9738
|
+
"skipauth": {
|
|
9739
|
+
"description": "Skip authentication check when a default username is required",
|
|
9740
|
+
"name": "skipauth",
|
|
9741
|
+
"allowNo": false,
|
|
9742
|
+
"type": "boolean"
|
|
9743
|
+
}
|
|
9744
|
+
},
|
|
9745
|
+
"hasDynamicHelp": false,
|
|
9746
|
+
"hiddenAliases": [],
|
|
9747
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
9748
|
+
"pluginAlias": "sfdx-hardis",
|
|
9749
|
+
"pluginName": "sfdx-hardis",
|
|
9750
|
+
"pluginType": "core",
|
|
9751
|
+
"strict": true,
|
|
9752
|
+
"enableJsonFlag": true,
|
|
9753
|
+
"title": "Convert Profiles into Permission Sets",
|
|
9754
|
+
"requiresProject": true,
|
|
9755
|
+
"requiresSfdxPlugins": [
|
|
9756
|
+
"shane-sfdx-plugins"
|
|
9757
|
+
],
|
|
9758
|
+
"isESM": true,
|
|
9759
|
+
"relativePath": [
|
|
9760
|
+
"lib",
|
|
9761
|
+
"commands",
|
|
9762
|
+
"hardis",
|
|
9763
|
+
"project",
|
|
9764
|
+
"convert",
|
|
9765
|
+
"profilestopermsets.js"
|
|
9766
|
+
],
|
|
9767
|
+
"aliasPermutations": [],
|
|
9768
|
+
"permutations": [
|
|
9769
|
+
"hardis:project:convert:profilestopermsets",
|
|
9770
|
+
"project:hardis:convert:profilestopermsets",
|
|
9771
|
+
"project:convert:hardis:profilestopermsets",
|
|
9772
|
+
"project:convert:profilestopermsets:hardis",
|
|
9773
|
+
"hardis:convert:project:profilestopermsets",
|
|
9774
|
+
"convert:hardis:project:profilestopermsets",
|
|
9775
|
+
"convert:project:hardis:profilestopermsets",
|
|
9776
|
+
"convert:project:profilestopermsets:hardis",
|
|
9777
|
+
"hardis:convert:profilestopermsets:project",
|
|
9778
|
+
"convert:hardis:profilestopermsets:project",
|
|
9779
|
+
"convert:profilestopermsets:hardis:project",
|
|
9780
|
+
"convert:profilestopermsets:project:hardis",
|
|
9781
|
+
"hardis:project:profilestopermsets:convert",
|
|
9782
|
+
"project:hardis:profilestopermsets:convert",
|
|
9783
|
+
"project:profilestopermsets:hardis:convert",
|
|
9784
|
+
"project:profilestopermsets:convert:hardis",
|
|
9785
|
+
"hardis:profilestopermsets:project:convert",
|
|
9786
|
+
"profilestopermsets:hardis:project:convert",
|
|
9787
|
+
"profilestopermsets:project:hardis:convert",
|
|
9788
|
+
"profilestopermsets:project:convert:hardis",
|
|
9789
|
+
"hardis:profilestopermsets:convert:project",
|
|
9790
|
+
"profilestopermsets:hardis:convert:project",
|
|
9791
|
+
"profilestopermsets:convert:hardis:project",
|
|
9792
|
+
"profilestopermsets:convert:project:hardis"
|
|
9793
|
+
]
|
|
9794
|
+
},
|
|
9692
9795
|
"hardis:project:clean:emptyitems": {
|
|
9693
9796
|
"aliases": [],
|
|
9694
9797
|
"args": {},
|
|
@@ -11303,109 +11406,6 @@
|
|
|
11303
11406
|
"auth:configure:project:hardis"
|
|
11304
11407
|
]
|
|
11305
11408
|
},
|
|
11306
|
-
"hardis:project:convert:profilestopermsets": {
|
|
11307
|
-
"aliases": [],
|
|
11308
|
-
"args": {},
|
|
11309
|
-
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
11310
|
-
"examples": [
|
|
11311
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
11312
|
-
],
|
|
11313
|
-
"flags": {
|
|
11314
|
-
"json": {
|
|
11315
|
-
"description": "Format output as json.",
|
|
11316
|
-
"helpGroup": "GLOBAL",
|
|
11317
|
-
"name": "json",
|
|
11318
|
-
"allowNo": false,
|
|
11319
|
-
"type": "boolean"
|
|
11320
|
-
},
|
|
11321
|
-
"flags-dir": {
|
|
11322
|
-
"helpGroup": "GLOBAL",
|
|
11323
|
-
"name": "flags-dir",
|
|
11324
|
-
"summary": "Import flag values from a directory.",
|
|
11325
|
-
"hasDynamicHelp": false,
|
|
11326
|
-
"multiple": false,
|
|
11327
|
-
"type": "option"
|
|
11328
|
-
},
|
|
11329
|
-
"except": {
|
|
11330
|
-
"char": "e",
|
|
11331
|
-
"description": "List of filters",
|
|
11332
|
-
"name": "except",
|
|
11333
|
-
"default": [],
|
|
11334
|
-
"hasDynamicHelp": false,
|
|
11335
|
-
"multiple": true,
|
|
11336
|
-
"type": "option"
|
|
11337
|
-
},
|
|
11338
|
-
"debug": {
|
|
11339
|
-
"char": "d",
|
|
11340
|
-
"description": "Activate debug mode (more logs)",
|
|
11341
|
-
"name": "debug",
|
|
11342
|
-
"allowNo": false,
|
|
11343
|
-
"type": "boolean"
|
|
11344
|
-
},
|
|
11345
|
-
"websocket": {
|
|
11346
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11347
|
-
"name": "websocket",
|
|
11348
|
-
"hasDynamicHelp": false,
|
|
11349
|
-
"multiple": false,
|
|
11350
|
-
"type": "option"
|
|
11351
|
-
},
|
|
11352
|
-
"skipauth": {
|
|
11353
|
-
"description": "Skip authentication check when a default username is required",
|
|
11354
|
-
"name": "skipauth",
|
|
11355
|
-
"allowNo": false,
|
|
11356
|
-
"type": "boolean"
|
|
11357
|
-
}
|
|
11358
|
-
},
|
|
11359
|
-
"hasDynamicHelp": false,
|
|
11360
|
-
"hiddenAliases": [],
|
|
11361
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
11362
|
-
"pluginAlias": "sfdx-hardis",
|
|
11363
|
-
"pluginName": "sfdx-hardis",
|
|
11364
|
-
"pluginType": "core",
|
|
11365
|
-
"strict": true,
|
|
11366
|
-
"enableJsonFlag": true,
|
|
11367
|
-
"title": "Convert Profiles into Permission Sets",
|
|
11368
|
-
"requiresProject": true,
|
|
11369
|
-
"requiresSfdxPlugins": [
|
|
11370
|
-
"shane-sfdx-plugins"
|
|
11371
|
-
],
|
|
11372
|
-
"isESM": true,
|
|
11373
|
-
"relativePath": [
|
|
11374
|
-
"lib",
|
|
11375
|
-
"commands",
|
|
11376
|
-
"hardis",
|
|
11377
|
-
"project",
|
|
11378
|
-
"convert",
|
|
11379
|
-
"profilestopermsets.js"
|
|
11380
|
-
],
|
|
11381
|
-
"aliasPermutations": [],
|
|
11382
|
-
"permutations": [
|
|
11383
|
-
"hardis:project:convert:profilestopermsets",
|
|
11384
|
-
"project:hardis:convert:profilestopermsets",
|
|
11385
|
-
"project:convert:hardis:profilestopermsets",
|
|
11386
|
-
"project:convert:profilestopermsets:hardis",
|
|
11387
|
-
"hardis:convert:project:profilestopermsets",
|
|
11388
|
-
"convert:hardis:project:profilestopermsets",
|
|
11389
|
-
"convert:project:hardis:profilestopermsets",
|
|
11390
|
-
"convert:project:profilestopermsets:hardis",
|
|
11391
|
-
"hardis:convert:profilestopermsets:project",
|
|
11392
|
-
"convert:hardis:profilestopermsets:project",
|
|
11393
|
-
"convert:profilestopermsets:hardis:project",
|
|
11394
|
-
"convert:profilestopermsets:project:hardis",
|
|
11395
|
-
"hardis:project:profilestopermsets:convert",
|
|
11396
|
-
"project:hardis:profilestopermsets:convert",
|
|
11397
|
-
"project:profilestopermsets:hardis:convert",
|
|
11398
|
-
"project:profilestopermsets:convert:hardis",
|
|
11399
|
-
"hardis:profilestopermsets:project:convert",
|
|
11400
|
-
"profilestopermsets:hardis:project:convert",
|
|
11401
|
-
"profilestopermsets:project:hardis:convert",
|
|
11402
|
-
"profilestopermsets:project:convert:hardis",
|
|
11403
|
-
"hardis:profilestopermsets:convert:project",
|
|
11404
|
-
"profilestopermsets:hardis:convert:project",
|
|
11405
|
-
"profilestopermsets:convert:hardis:project",
|
|
11406
|
-
"profilestopermsets:convert:project:hardis"
|
|
11407
|
-
]
|
|
11408
|
-
},
|
|
11409
11409
|
"hardis:project:deploy:notify": {
|
|
11410
11410
|
"aliases": [],
|
|
11411
11411
|
"args": {},
|
|
@@ -15369,5 +15369,5 @@
|
|
|
15369
15369
|
]
|
|
15370
15370
|
}
|
|
15371
15371
|
},
|
|
15372
|
-
"version": "6.
|
|
15372
|
+
"version": "6.8.0"
|
|
15373
15373
|
}
|