sfdx-hardis 6.0.2-beta202508111351.0 → 6.0.4-beta202508121754.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 +8 -0
- package/lib/commands/hardis/org/generate/packagexmlfull.js +11 -2
- package/lib/commands/hardis/org/generate/packagexmlfull.js.map +1 -1
- package/lib/commands/hardis/work/new.js +3 -2
- package/lib/commands/hardis/work/new.js.map +1 -1
- package/lib/commands/hardis/work/save.js +18 -9
- package/lib/commands/hardis/work/save.js.map +1 -1
- package/oclif.manifest.json +951 -944
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -132,12 +132,13 @@
|
|
|
132
132
|
"clear:cache:hardis"
|
|
133
133
|
]
|
|
134
134
|
},
|
|
135
|
-
"hardis:
|
|
135
|
+
"hardis:auth:login": {
|
|
136
136
|
"aliases": [],
|
|
137
137
|
"args": {},
|
|
138
|
-
"description": "\n## Command Behavior\n\n**
|
|
138
|
+
"description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n## Technical explanations\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n",
|
|
139
139
|
"examples": [
|
|
140
|
-
"$ sf hardis:
|
|
140
|
+
"$ sf hardis:auth:login",
|
|
141
|
+
"CI=true sf hardis:auth:login"
|
|
141
142
|
],
|
|
142
143
|
"flags": {
|
|
143
144
|
"json": {
|
|
@@ -155,20 +156,28 @@
|
|
|
155
156
|
"multiple": false,
|
|
156
157
|
"type": "option"
|
|
157
158
|
},
|
|
158
|
-
"
|
|
159
|
-
"char": "
|
|
160
|
-
"description": "
|
|
161
|
-
"name": "
|
|
162
|
-
"default": "project",
|
|
159
|
+
"instanceurl": {
|
|
160
|
+
"char": "r",
|
|
161
|
+
"description": "URL of org instance",
|
|
162
|
+
"name": "instanceurl",
|
|
163
163
|
"hasDynamicHelp": false,
|
|
164
164
|
"multiple": false,
|
|
165
|
-
"options": [
|
|
166
|
-
"project",
|
|
167
|
-
"branch",
|
|
168
|
-
"user"
|
|
169
|
-
],
|
|
170
165
|
"type": "option"
|
|
171
166
|
},
|
|
167
|
+
"devhub": {
|
|
168
|
+
"char": "h",
|
|
169
|
+
"description": "Also connect associated DevHub",
|
|
170
|
+
"name": "devhub",
|
|
171
|
+
"allowNo": false,
|
|
172
|
+
"type": "boolean"
|
|
173
|
+
},
|
|
174
|
+
"scratchorg": {
|
|
175
|
+
"char": "s",
|
|
176
|
+
"description": "Scratch org",
|
|
177
|
+
"name": "scratchorg",
|
|
178
|
+
"allowNo": false,
|
|
179
|
+
"type": "boolean"
|
|
180
|
+
},
|
|
172
181
|
"debug": {
|
|
173
182
|
"char": "d",
|
|
174
183
|
"description": "Activate debug mode (more logs)",
|
|
@@ -192,39 +201,38 @@
|
|
|
192
201
|
},
|
|
193
202
|
"hasDynamicHelp": false,
|
|
194
203
|
"hiddenAliases": [],
|
|
195
|
-
"id": "hardis:
|
|
204
|
+
"id": "hardis:auth:login",
|
|
196
205
|
"pluginAlias": "sfdx-hardis",
|
|
197
206
|
"pluginName": "sfdx-hardis",
|
|
198
207
|
"pluginType": "core",
|
|
199
208
|
"strict": true,
|
|
200
209
|
"enableJsonFlag": true,
|
|
201
|
-
"title": "
|
|
210
|
+
"title": "Login",
|
|
202
211
|
"requiresProject": false,
|
|
203
212
|
"isESM": true,
|
|
204
213
|
"relativePath": [
|
|
205
214
|
"lib",
|
|
206
215
|
"commands",
|
|
207
216
|
"hardis",
|
|
208
|
-
"
|
|
209
|
-
"
|
|
217
|
+
"auth",
|
|
218
|
+
"login.js"
|
|
210
219
|
],
|
|
211
220
|
"aliasPermutations": [],
|
|
212
221
|
"permutations": [
|
|
213
|
-
"hardis:
|
|
214
|
-
"
|
|
215
|
-
"
|
|
216
|
-
"hardis:
|
|
217
|
-
"
|
|
218
|
-
"
|
|
222
|
+
"hardis:auth:login",
|
|
223
|
+
"auth:hardis:login",
|
|
224
|
+
"auth:login:hardis",
|
|
225
|
+
"hardis:login:auth",
|
|
226
|
+
"login:hardis:auth",
|
|
227
|
+
"login:auth:hardis"
|
|
219
228
|
]
|
|
220
229
|
},
|
|
221
|
-
"hardis:
|
|
230
|
+
"hardis:config:get": {
|
|
222
231
|
"aliases": [],
|
|
223
232
|
"args": {},
|
|
224
|
-
"description": "\n## Command Behavior\n\n**
|
|
233
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the sfdx-hardis configuration for a specified level.**\n\nThis command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.\n\n- **Configuration levels:** It can retrieve configuration from three different levels:\n - **Project:** The configuration defined in the project's `.sfdx-hardis.yml` file.\n - **Branch:** The configuration defined in a branch-specific configuration file (e.g., `.sfdx-hardis.production.yml`).\n - **User:** The global user-level configuration.\n\n## Technical explanations\n\nThe command's logic is straightforward:\n\n- **`getConfig` function:** It calls the `getConfig` utility function, passing the desired configuration level as an argument.\n- **Configuration loading:** The `getConfig` function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON.\n- **Output:** The retrieved configuration is then displayed to the user as a JSON string.\n",
|
|
225
234
|
"examples": [
|
|
226
|
-
"$ sf hardis:
|
|
227
|
-
"CI=true sf hardis:auth:login"
|
|
235
|
+
"$ sf hardis:project:deploy:sources:metadata"
|
|
228
236
|
],
|
|
229
237
|
"flags": {
|
|
230
238
|
"json": {
|
|
@@ -242,28 +250,20 @@
|
|
|
242
250
|
"multiple": false,
|
|
243
251
|
"type": "option"
|
|
244
252
|
},
|
|
245
|
-
"
|
|
246
|
-
"char": "
|
|
247
|
-
"description": "
|
|
248
|
-
"name": "
|
|
253
|
+
"level": {
|
|
254
|
+
"char": "l",
|
|
255
|
+
"description": "project,branch or user",
|
|
256
|
+
"name": "level",
|
|
257
|
+
"default": "project",
|
|
249
258
|
"hasDynamicHelp": false,
|
|
250
259
|
"multiple": false,
|
|
260
|
+
"options": [
|
|
261
|
+
"project",
|
|
262
|
+
"branch",
|
|
263
|
+
"user"
|
|
264
|
+
],
|
|
251
265
|
"type": "option"
|
|
252
266
|
},
|
|
253
|
-
"devhub": {
|
|
254
|
-
"char": "h",
|
|
255
|
-
"description": "Also connect associated DevHub",
|
|
256
|
-
"name": "devhub",
|
|
257
|
-
"allowNo": false,
|
|
258
|
-
"type": "boolean"
|
|
259
|
-
},
|
|
260
|
-
"scratchorg": {
|
|
261
|
-
"char": "s",
|
|
262
|
-
"description": "Scratch org",
|
|
263
|
-
"name": "scratchorg",
|
|
264
|
-
"allowNo": false,
|
|
265
|
-
"type": "boolean"
|
|
266
|
-
},
|
|
267
267
|
"debug": {
|
|
268
268
|
"char": "d",
|
|
269
269
|
"description": "Activate debug mode (more logs)",
|
|
@@ -287,30 +287,30 @@
|
|
|
287
287
|
},
|
|
288
288
|
"hasDynamicHelp": false,
|
|
289
289
|
"hiddenAliases": [],
|
|
290
|
-
"id": "hardis:
|
|
290
|
+
"id": "hardis:config:get",
|
|
291
291
|
"pluginAlias": "sfdx-hardis",
|
|
292
292
|
"pluginName": "sfdx-hardis",
|
|
293
293
|
"pluginType": "core",
|
|
294
294
|
"strict": true,
|
|
295
295
|
"enableJsonFlag": true,
|
|
296
|
-
"title": "
|
|
296
|
+
"title": "Deploy metadata sources to org",
|
|
297
297
|
"requiresProject": false,
|
|
298
298
|
"isESM": true,
|
|
299
299
|
"relativePath": [
|
|
300
300
|
"lib",
|
|
301
301
|
"commands",
|
|
302
302
|
"hardis",
|
|
303
|
-
"
|
|
304
|
-
"
|
|
303
|
+
"config",
|
|
304
|
+
"get.js"
|
|
305
305
|
],
|
|
306
306
|
"aliasPermutations": [],
|
|
307
307
|
"permutations": [
|
|
308
|
-
"hardis:
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"hardis:
|
|
312
|
-
"
|
|
313
|
-
"
|
|
308
|
+
"hardis:config:get",
|
|
309
|
+
"config:hardis:get",
|
|
310
|
+
"config:get:hardis",
|
|
311
|
+
"hardis:get:config",
|
|
312
|
+
"get:hardis:config",
|
|
313
|
+
"get:config:hardis"
|
|
314
314
|
]
|
|
315
315
|
},
|
|
316
316
|
"hardis:doc:fieldusage": {
|
|
@@ -5482,15 +5482,12 @@
|
|
|
5482
5482
|
"import:data:org:hardis"
|
|
5483
5483
|
]
|
|
5484
5484
|
},
|
|
5485
|
-
"hardis:org:
|
|
5485
|
+
"hardis:org:files:export": {
|
|
5486
5486
|
"aliases": [],
|
|
5487
5487
|
"args": {},
|
|
5488
|
-
"description": "
|
|
5488
|
+
"description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, and output naming conventions.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n## Technical explanations\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project and `promptFilesExportConfiguration` for customizing export options.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues or API limits.\n",
|
|
5489
5489
|
"examples": [
|
|
5490
|
-
"$ sf hardis:org:
|
|
5491
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5492
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5493
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5490
|
+
"$ sf hardis:org:files:export"
|
|
5494
5491
|
],
|
|
5495
5492
|
"flags": {
|
|
5496
5493
|
"json": {
|
|
@@ -5508,26 +5505,37 @@
|
|
|
5508
5505
|
"multiple": false,
|
|
5509
5506
|
"type": "option"
|
|
5510
5507
|
},
|
|
5511
|
-
"
|
|
5512
|
-
"char": "
|
|
5513
|
-
"description": "
|
|
5514
|
-
"name": "
|
|
5508
|
+
"path": {
|
|
5509
|
+
"char": "p",
|
|
5510
|
+
"description": "Path to the file export project",
|
|
5511
|
+
"name": "path",
|
|
5515
5512
|
"hasDynamicHelp": false,
|
|
5516
5513
|
"multiple": false,
|
|
5517
5514
|
"type": "option"
|
|
5518
5515
|
},
|
|
5519
|
-
"
|
|
5516
|
+
"chunksize": {
|
|
5517
|
+
"char": "c",
|
|
5518
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
5519
|
+
"name": "chunksize",
|
|
5520
|
+
"default": 1000,
|
|
5521
|
+
"hasDynamicHelp": false,
|
|
5522
|
+
"multiple": false,
|
|
5523
|
+
"type": "option"
|
|
5524
|
+
},
|
|
5525
|
+
"polltimeout": {
|
|
5520
5526
|
"char": "t",
|
|
5521
|
-
"description": "
|
|
5522
|
-
"name": "
|
|
5527
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
5528
|
+
"name": "polltimeout",
|
|
5529
|
+
"default": 300000,
|
|
5523
5530
|
"hasDynamicHelp": false,
|
|
5524
5531
|
"multiple": false,
|
|
5525
5532
|
"type": "option"
|
|
5526
5533
|
},
|
|
5527
|
-
"
|
|
5528
|
-
"char": "
|
|
5529
|
-
"description": "
|
|
5530
|
-
"name": "
|
|
5534
|
+
"startchunknumber": {
|
|
5535
|
+
"char": "s",
|
|
5536
|
+
"description": "Chunk number to start from",
|
|
5537
|
+
"name": "startchunknumber",
|
|
5538
|
+
"default": 0,
|
|
5531
5539
|
"hasDynamicHelp": false,
|
|
5532
5540
|
"multiple": false,
|
|
5533
5541
|
"type": "option"
|
|
@@ -5570,13 +5578,13 @@
|
|
|
5570
5578
|
},
|
|
5571
5579
|
"hasDynamicHelp": true,
|
|
5572
5580
|
"hiddenAliases": [],
|
|
5573
|
-
"id": "hardis:org:
|
|
5581
|
+
"id": "hardis:org:files:export",
|
|
5574
5582
|
"pluginAlias": "sfdx-hardis",
|
|
5575
5583
|
"pluginName": "sfdx-hardis",
|
|
5576
5584
|
"pluginType": "core",
|
|
5577
5585
|
"strict": true,
|
|
5578
5586
|
"enableJsonFlag": true,
|
|
5579
|
-
"title": "
|
|
5587
|
+
"title": "Export files",
|
|
5580
5588
|
"requiresProject": false,
|
|
5581
5589
|
"isESM": true,
|
|
5582
5590
|
"relativePath": [
|
|
@@ -5584,43 +5592,43 @@
|
|
|
5584
5592
|
"commands",
|
|
5585
5593
|
"hardis",
|
|
5586
5594
|
"org",
|
|
5587
|
-
"
|
|
5588
|
-
"
|
|
5595
|
+
"files",
|
|
5596
|
+
"export.js"
|
|
5589
5597
|
],
|
|
5590
5598
|
"aliasPermutations": [],
|
|
5591
5599
|
"permutations": [
|
|
5592
|
-
"hardis:org:
|
|
5593
|
-
"org:hardis:
|
|
5594
|
-
"org:
|
|
5595
|
-
"org:
|
|
5596
|
-
"hardis:
|
|
5597
|
-
"
|
|
5598
|
-
"
|
|
5599
|
-
"
|
|
5600
|
-
"hardis:
|
|
5601
|
-
"
|
|
5602
|
-
"
|
|
5603
|
-
"
|
|
5604
|
-
"hardis:org:
|
|
5605
|
-
"org:hardis:
|
|
5606
|
-
"org:
|
|
5607
|
-
"org:
|
|
5608
|
-
"hardis:
|
|
5609
|
-
"
|
|
5610
|
-
"
|
|
5611
|
-
"
|
|
5612
|
-
"hardis:
|
|
5613
|
-
"
|
|
5614
|
-
"
|
|
5615
|
-
"
|
|
5600
|
+
"hardis:org:files:export",
|
|
5601
|
+
"org:hardis:files:export",
|
|
5602
|
+
"org:files:hardis:export",
|
|
5603
|
+
"org:files:export:hardis",
|
|
5604
|
+
"hardis:files:org:export",
|
|
5605
|
+
"files:hardis:org:export",
|
|
5606
|
+
"files:org:hardis:export",
|
|
5607
|
+
"files:org:export:hardis",
|
|
5608
|
+
"hardis:files:export:org",
|
|
5609
|
+
"files:hardis:export:org",
|
|
5610
|
+
"files:export:hardis:org",
|
|
5611
|
+
"files:export:org:hardis",
|
|
5612
|
+
"hardis:org:export:files",
|
|
5613
|
+
"org:hardis:export:files",
|
|
5614
|
+
"org:export:hardis:files",
|
|
5615
|
+
"org:export:files:hardis",
|
|
5616
|
+
"hardis:export:org:files",
|
|
5617
|
+
"export:hardis:org:files",
|
|
5618
|
+
"export:org:hardis:files",
|
|
5619
|
+
"export:org:files:hardis",
|
|
5620
|
+
"hardis:export:files:org",
|
|
5621
|
+
"export:hardis:files:org",
|
|
5622
|
+
"export:files:hardis:org",
|
|
5623
|
+
"export:files:org:hardis"
|
|
5616
5624
|
]
|
|
5617
5625
|
},
|
|
5618
|
-
"hardis:org:
|
|
5626
|
+
"hardis:org:files:import": {
|
|
5619
5627
|
"aliases": [],
|
|
5620
5628
|
"args": {},
|
|
5621
|
-
"description": "\
|
|
5629
|
+
"description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n## Technical explanations\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n",
|
|
5622
5630
|
"examples": [
|
|
5623
|
-
"$ sf hardis:org:
|
|
5631
|
+
"$ sf hardis:org:files:import"
|
|
5624
5632
|
],
|
|
5625
5633
|
"flags": {
|
|
5626
5634
|
"json": {
|
|
@@ -5638,6 +5646,21 @@
|
|
|
5638
5646
|
"multiple": false,
|
|
5639
5647
|
"type": "option"
|
|
5640
5648
|
},
|
|
5649
|
+
"path": {
|
|
5650
|
+
"char": "p",
|
|
5651
|
+
"description": "Path to the file export project",
|
|
5652
|
+
"name": "path",
|
|
5653
|
+
"hasDynamicHelp": false,
|
|
5654
|
+
"multiple": false,
|
|
5655
|
+
"type": "option"
|
|
5656
|
+
},
|
|
5657
|
+
"overwrite": {
|
|
5658
|
+
"char": "f",
|
|
5659
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
5660
|
+
"name": "overwrite",
|
|
5661
|
+
"allowNo": false,
|
|
5662
|
+
"type": "boolean"
|
|
5663
|
+
},
|
|
5641
5664
|
"debug": {
|
|
5642
5665
|
"char": "d",
|
|
5643
5666
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5676,13 +5699,13 @@
|
|
|
5676
5699
|
},
|
|
5677
5700
|
"hasDynamicHelp": true,
|
|
5678
5701
|
"hiddenAliases": [],
|
|
5679
|
-
"id": "hardis:org:
|
|
5702
|
+
"id": "hardis:org:files:import",
|
|
5680
5703
|
"pluginAlias": "sfdx-hardis",
|
|
5681
5704
|
"pluginName": "sfdx-hardis",
|
|
5682
5705
|
"pluginType": "core",
|
|
5683
5706
|
"strict": true,
|
|
5684
5707
|
"enableJsonFlag": true,
|
|
5685
|
-
"title": "
|
|
5708
|
+
"title": "Import files",
|
|
5686
5709
|
"requiresProject": false,
|
|
5687
5710
|
"isESM": true,
|
|
5688
5711
|
"relativePath": [
|
|
@@ -5690,46 +5713,44 @@
|
|
|
5690
5713
|
"commands",
|
|
5691
5714
|
"hardis",
|
|
5692
5715
|
"org",
|
|
5693
|
-
"
|
|
5694
|
-
"
|
|
5716
|
+
"files",
|
|
5717
|
+
"import.js"
|
|
5695
5718
|
],
|
|
5696
5719
|
"aliasPermutations": [],
|
|
5697
5720
|
"permutations": [
|
|
5698
|
-
"hardis:org:
|
|
5699
|
-
"org:hardis:
|
|
5700
|
-
"org:
|
|
5701
|
-
"org:
|
|
5702
|
-
"hardis:
|
|
5703
|
-
"
|
|
5704
|
-
"
|
|
5705
|
-
"
|
|
5706
|
-
"hardis:
|
|
5707
|
-
"
|
|
5708
|
-
"
|
|
5709
|
-
"
|
|
5710
|
-
"hardis:org:
|
|
5711
|
-
"org:hardis:
|
|
5712
|
-
"org:
|
|
5713
|
-
"org:
|
|
5714
|
-
"hardis:
|
|
5715
|
-
"
|
|
5716
|
-
"
|
|
5717
|
-
"
|
|
5718
|
-
"hardis:
|
|
5719
|
-
"
|
|
5720
|
-
"
|
|
5721
|
-
"
|
|
5721
|
+
"hardis:org:files:import",
|
|
5722
|
+
"org:hardis:files:import",
|
|
5723
|
+
"org:files:hardis:import",
|
|
5724
|
+
"org:files:import:hardis",
|
|
5725
|
+
"hardis:files:org:import",
|
|
5726
|
+
"files:hardis:org:import",
|
|
5727
|
+
"files:org:hardis:import",
|
|
5728
|
+
"files:org:import:hardis",
|
|
5729
|
+
"hardis:files:import:org",
|
|
5730
|
+
"files:hardis:import:org",
|
|
5731
|
+
"files:import:hardis:org",
|
|
5732
|
+
"files:import:org:hardis",
|
|
5733
|
+
"hardis:org:import:files",
|
|
5734
|
+
"org:hardis:import:files",
|
|
5735
|
+
"org:import:hardis:files",
|
|
5736
|
+
"org:import:files:hardis",
|
|
5737
|
+
"hardis:import:org:files",
|
|
5738
|
+
"import:hardis:org:files",
|
|
5739
|
+
"import:org:hardis:files",
|
|
5740
|
+
"import:org:files:hardis",
|
|
5741
|
+
"hardis:import:files:org",
|
|
5742
|
+
"import:hardis:files:org",
|
|
5743
|
+
"import:files:hardis:org",
|
|
5744
|
+
"import:files:org:hardis"
|
|
5722
5745
|
]
|
|
5723
5746
|
},
|
|
5724
|
-
"hardis:org:
|
|
5747
|
+
"hardis:org:fix:listviewmine": {
|
|
5725
5748
|
"aliases": [],
|
|
5726
5749
|
"args": {},
|
|
5727
|
-
"description": "
|
|
5750
|
+
"description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
|
|
5728
5751
|
"examples": [
|
|
5729
|
-
"$ sf hardis:org:
|
|
5730
|
-
"$ sf hardis:org:
|
|
5731
|
-
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
5732
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
5752
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
5753
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
5733
5754
|
],
|
|
5734
5755
|
"flags": {
|
|
5735
5756
|
"json": {
|
|
@@ -5747,28 +5768,10 @@
|
|
|
5747
5768
|
"multiple": false,
|
|
5748
5769
|
"type": "option"
|
|
5749
5770
|
},
|
|
5750
|
-
"
|
|
5751
|
-
"char": "e",
|
|
5752
|
-
"description": "Type of EventLogFile event to analyze",
|
|
5753
|
-
"name": "eventtype",
|
|
5754
|
-
"default": "ApiTotalUsage",
|
|
5755
|
-
"hasDynamicHelp": false,
|
|
5756
|
-
"multiple": false,
|
|
5757
|
-
"type": "option"
|
|
5758
|
-
},
|
|
5759
|
-
"limit": {
|
|
5771
|
+
"listviews": {
|
|
5760
5772
|
"char": "l",
|
|
5761
|
-
"description": "
|
|
5762
|
-
"name": "
|
|
5763
|
-
"default": 999,
|
|
5764
|
-
"hasDynamicHelp": false,
|
|
5765
|
-
"multiple": false,
|
|
5766
|
-
"type": "option"
|
|
5767
|
-
},
|
|
5768
|
-
"outputfile": {
|
|
5769
|
-
"char": "f",
|
|
5770
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5771
|
-
"name": "outputfile",
|
|
5773
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
5774
|
+
"name": "listviews",
|
|
5772
5775
|
"hasDynamicHelp": false,
|
|
5773
5776
|
"multiple": false,
|
|
5774
5777
|
"type": "option"
|
|
@@ -5811,57 +5814,60 @@
|
|
|
5811
5814
|
},
|
|
5812
5815
|
"hasDynamicHelp": true,
|
|
5813
5816
|
"hiddenAliases": [],
|
|
5814
|
-
"id": "hardis:org:
|
|
5817
|
+
"id": "hardis:org:fix:listviewmine",
|
|
5815
5818
|
"pluginAlias": "sfdx-hardis",
|
|
5816
5819
|
"pluginName": "sfdx-hardis",
|
|
5817
5820
|
"pluginType": "core",
|
|
5818
5821
|
"strict": true,
|
|
5819
5822
|
"enableJsonFlag": true,
|
|
5820
|
-
"title": "
|
|
5821
|
-
"requiresProject":
|
|
5823
|
+
"title": "Fix listviews with ",
|
|
5824
|
+
"requiresProject": true,
|
|
5822
5825
|
"isESM": true,
|
|
5823
5826
|
"relativePath": [
|
|
5824
5827
|
"lib",
|
|
5825
5828
|
"commands",
|
|
5826
5829
|
"hardis",
|
|
5827
5830
|
"org",
|
|
5828
|
-
"
|
|
5829
|
-
"
|
|
5831
|
+
"fix",
|
|
5832
|
+
"listviewmine.js"
|
|
5830
5833
|
],
|
|
5831
5834
|
"aliasPermutations": [],
|
|
5832
5835
|
"permutations": [
|
|
5833
|
-
"hardis:org:
|
|
5834
|
-
"org:hardis:
|
|
5835
|
-
"org:
|
|
5836
|
-
"org:
|
|
5837
|
-
"hardis:
|
|
5838
|
-
"
|
|
5839
|
-
"
|
|
5840
|
-
"
|
|
5841
|
-
"hardis:
|
|
5842
|
-
"
|
|
5843
|
-
"
|
|
5844
|
-
"
|
|
5845
|
-
"hardis:org:
|
|
5846
|
-
"org:hardis:
|
|
5847
|
-
"org:
|
|
5848
|
-
"org:
|
|
5849
|
-
"hardis:
|
|
5850
|
-
"
|
|
5851
|
-
"
|
|
5852
|
-
"
|
|
5853
|
-
"hardis:
|
|
5854
|
-
"
|
|
5855
|
-
"
|
|
5856
|
-
"
|
|
5836
|
+
"hardis:org:fix:listviewmine",
|
|
5837
|
+
"org:hardis:fix:listviewmine",
|
|
5838
|
+
"org:fix:hardis:listviewmine",
|
|
5839
|
+
"org:fix:listviewmine:hardis",
|
|
5840
|
+
"hardis:fix:org:listviewmine",
|
|
5841
|
+
"fix:hardis:org:listviewmine",
|
|
5842
|
+
"fix:org:hardis:listviewmine",
|
|
5843
|
+
"fix:org:listviewmine:hardis",
|
|
5844
|
+
"hardis:fix:listviewmine:org",
|
|
5845
|
+
"fix:hardis:listviewmine:org",
|
|
5846
|
+
"fix:listviewmine:hardis:org",
|
|
5847
|
+
"fix:listviewmine:org:hardis",
|
|
5848
|
+
"hardis:org:listviewmine:fix",
|
|
5849
|
+
"org:hardis:listviewmine:fix",
|
|
5850
|
+
"org:listviewmine:hardis:fix",
|
|
5851
|
+
"org:listviewmine:fix:hardis",
|
|
5852
|
+
"hardis:listviewmine:org:fix",
|
|
5853
|
+
"listviewmine:hardis:org:fix",
|
|
5854
|
+
"listviewmine:org:hardis:fix",
|
|
5855
|
+
"listviewmine:org:fix:hardis",
|
|
5856
|
+
"hardis:listviewmine:fix:org",
|
|
5857
|
+
"listviewmine:hardis:fix:org",
|
|
5858
|
+
"listviewmine:fix:hardis:org",
|
|
5859
|
+
"listviewmine:fix:org:hardis"
|
|
5857
5860
|
]
|
|
5858
5861
|
},
|
|
5859
|
-
"hardis:org:diagnose:
|
|
5862
|
+
"hardis:org:diagnose:audittrail": {
|
|
5860
5863
|
"aliases": [],
|
|
5861
5864
|
"args": {},
|
|
5862
|
-
"description": "
|
|
5865
|
+
"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",
|
|
5863
5866
|
"examples": [
|
|
5864
|
-
"$ sf hardis:org:diagnose:
|
|
5867
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5868
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5869
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5870
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5865
5871
|
],
|
|
5866
5872
|
"flags": {
|
|
5867
5873
|
"json": {
|
|
@@ -5879,6 +5885,22 @@
|
|
|
5879
5885
|
"multiple": false,
|
|
5880
5886
|
"type": "option"
|
|
5881
5887
|
},
|
|
5888
|
+
"excludeusers": {
|
|
5889
|
+
"char": "e",
|
|
5890
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5891
|
+
"name": "excludeusers",
|
|
5892
|
+
"hasDynamicHelp": false,
|
|
5893
|
+
"multiple": false,
|
|
5894
|
+
"type": "option"
|
|
5895
|
+
},
|
|
5896
|
+
"lastndays": {
|
|
5897
|
+
"char": "t",
|
|
5898
|
+
"description": "Number of days to extract from today (included)",
|
|
5899
|
+
"name": "lastndays",
|
|
5900
|
+
"hasDynamicHelp": false,
|
|
5901
|
+
"multiple": false,
|
|
5902
|
+
"type": "option"
|
|
5903
|
+
},
|
|
5882
5904
|
"outputfile": {
|
|
5883
5905
|
"char": "f",
|
|
5884
5906
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -5887,13 +5909,6 @@
|
|
|
5887
5909
|
"multiple": false,
|
|
5888
5910
|
"type": "option"
|
|
5889
5911
|
},
|
|
5890
|
-
"usedonly": {
|
|
5891
|
-
"char": "u",
|
|
5892
|
-
"description": "Filter to have only used licenses",
|
|
5893
|
-
"name": "usedonly",
|
|
5894
|
-
"allowNo": false,
|
|
5895
|
-
"type": "boolean"
|
|
5896
|
-
},
|
|
5897
5912
|
"debug": {
|
|
5898
5913
|
"char": "d",
|
|
5899
5914
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5932,13 +5947,13 @@
|
|
|
5932
5947
|
},
|
|
5933
5948
|
"hasDynamicHelp": true,
|
|
5934
5949
|
"hiddenAliases": [],
|
|
5935
|
-
"id": "hardis:org:diagnose:
|
|
5950
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5936
5951
|
"pluginAlias": "sfdx-hardis",
|
|
5937
5952
|
"pluginName": "sfdx-hardis",
|
|
5938
5953
|
"pluginType": "core",
|
|
5939
5954
|
"strict": true,
|
|
5940
5955
|
"enableJsonFlag": true,
|
|
5941
|
-
"title": "
|
|
5956
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5942
5957
|
"requiresProject": false,
|
|
5943
5958
|
"isESM": true,
|
|
5944
5959
|
"relativePath": [
|
|
@@ -5947,42 +5962,42 @@
|
|
|
5947
5962
|
"hardis",
|
|
5948
5963
|
"org",
|
|
5949
5964
|
"diagnose",
|
|
5950
|
-
"
|
|
5965
|
+
"audittrail.js"
|
|
5951
5966
|
],
|
|
5952
5967
|
"aliasPermutations": [],
|
|
5953
5968
|
"permutations": [
|
|
5954
|
-
"hardis:org:diagnose:
|
|
5955
|
-
"org:hardis:diagnose:
|
|
5956
|
-
"org:diagnose:hardis:
|
|
5957
|
-
"org:diagnose:
|
|
5958
|
-
"hardis:diagnose:org:
|
|
5959
|
-
"diagnose:hardis:org:
|
|
5960
|
-
"diagnose:org:hardis:
|
|
5961
|
-
"diagnose:org:
|
|
5962
|
-
"hardis:diagnose:
|
|
5963
|
-
"diagnose:hardis:
|
|
5964
|
-
"diagnose:
|
|
5965
|
-
"diagnose:
|
|
5966
|
-
"hardis:org:
|
|
5967
|
-
"org:hardis:
|
|
5968
|
-
"org:
|
|
5969
|
-
"org:
|
|
5970
|
-
"hardis:
|
|
5971
|
-
"
|
|
5972
|
-
"
|
|
5973
|
-
"
|
|
5974
|
-
"hardis:
|
|
5975
|
-
"
|
|
5976
|
-
"
|
|
5977
|
-
"
|
|
5969
|
+
"hardis:org:diagnose:audittrail",
|
|
5970
|
+
"org:hardis:diagnose:audittrail",
|
|
5971
|
+
"org:diagnose:hardis:audittrail",
|
|
5972
|
+
"org:diagnose:audittrail:hardis",
|
|
5973
|
+
"hardis:diagnose:org:audittrail",
|
|
5974
|
+
"diagnose:hardis:org:audittrail",
|
|
5975
|
+
"diagnose:org:hardis:audittrail",
|
|
5976
|
+
"diagnose:org:audittrail:hardis",
|
|
5977
|
+
"hardis:diagnose:audittrail:org",
|
|
5978
|
+
"diagnose:hardis:audittrail:org",
|
|
5979
|
+
"diagnose:audittrail:hardis:org",
|
|
5980
|
+
"diagnose:audittrail:org:hardis",
|
|
5981
|
+
"hardis:org:audittrail:diagnose",
|
|
5982
|
+
"org:hardis:audittrail:diagnose",
|
|
5983
|
+
"org:audittrail:hardis:diagnose",
|
|
5984
|
+
"org:audittrail:diagnose:hardis",
|
|
5985
|
+
"hardis:audittrail:org:diagnose",
|
|
5986
|
+
"audittrail:hardis:org:diagnose",
|
|
5987
|
+
"audittrail:org:hardis:diagnose",
|
|
5988
|
+
"audittrail:org:diagnose:hardis",
|
|
5989
|
+
"hardis:audittrail:diagnose:org",
|
|
5990
|
+
"audittrail:hardis:diagnose:org",
|
|
5991
|
+
"audittrail:diagnose:hardis:org",
|
|
5992
|
+
"audittrail:diagnose:org:hardis"
|
|
5978
5993
|
]
|
|
5979
5994
|
},
|
|
5980
|
-
"hardis:org:diagnose:
|
|
5995
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5981
5996
|
"aliases": [],
|
|
5982
5997
|
"args": {},
|
|
5983
|
-
"description": "
|
|
5998
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the scheduled upgrade date for a Salesforce org's instance.**\n\nThis command provides crucial information about when your Salesforce instance will be upgraded to the next major release (Spring, Summer, or Winter). This is vital for release planning, testing, and ensuring compatibility with upcoming Salesforce features.\n\nKey functionalities:\n\n- **Instance Identification:** Determines the Salesforce instance name of your target org.\n- **Upgrade Date Retrieval:** Fetches the planned start time of the next major core service upgrade for that instance from the Salesforce Status API.\n- **Days Until Upgrade:** Calculates and displays the number of days remaining until the next major upgrade.\n- **Severity-Based Logging:** Adjusts the log severity (info, warning) based on the proximity of the upgrade date, providing a visual cue for urgency.\n- **Notifications:** Sends notifications to configured channels (e.g., Slack, MS Teams, Grafana) with the upgrade information, making it suitable for automated monitoring.\n\n## Technical explanations\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the `Organization` object in Salesforce to get the `InstanceName` of the target org.\n- **Salesforce Status API Integration:** It makes an HTTP GET request to the Salesforce Status API (`https://api.status.salesforce.com/v1/instances/{instanceName}/status`) to retrieve detailed information about the instance, including scheduled maintenances.\n- **Data Parsing:** It parses the JSON response from the Status API to extract the relevant major release upgrade information.\n- **Date Calculation:** Uses the `moment` library to calculate the difference in days between the current date and the planned upgrade date.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including the instance name, upgrade date, and days remaining, along with relevant metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the upgrade status and proximity.\n",
|
|
5984
5999
|
"examples": [
|
|
5985
|
-
"$ sf hardis:org:diagnose:
|
|
6000
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5986
6001
|
],
|
|
5987
6002
|
"flags": {
|
|
5988
6003
|
"json": {
|
|
@@ -6000,14 +6015,6 @@
|
|
|
6000
6015
|
"multiple": false,
|
|
6001
6016
|
"type": "option"
|
|
6002
6017
|
},
|
|
6003
|
-
"outputfile": {
|
|
6004
|
-
"char": "f",
|
|
6005
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6006
|
-
"name": "outputfile",
|
|
6007
|
-
"hasDynamicHelp": false,
|
|
6008
|
-
"multiple": false,
|
|
6009
|
-
"type": "option"
|
|
6010
|
-
},
|
|
6011
6018
|
"debug": {
|
|
6012
6019
|
"char": "d",
|
|
6013
6020
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6046,13 +6053,13 @@
|
|
|
6046
6053
|
},
|
|
6047
6054
|
"hasDynamicHelp": true,
|
|
6048
6055
|
"hiddenAliases": [],
|
|
6049
|
-
"id": "hardis:org:diagnose:
|
|
6056
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
6050
6057
|
"pluginAlias": "sfdx-hardis",
|
|
6051
6058
|
"pluginName": "sfdx-hardis",
|
|
6052
6059
|
"pluginType": "core",
|
|
6053
6060
|
"strict": true,
|
|
6054
6061
|
"enableJsonFlag": true,
|
|
6055
|
-
"title": "
|
|
6062
|
+
"title": "Get Instance Upgrade date",
|
|
6056
6063
|
"requiresProject": false,
|
|
6057
6064
|
"isESM": true,
|
|
6058
6065
|
"relativePath": [
|
|
@@ -6061,43 +6068,45 @@
|
|
|
6061
6068
|
"hardis",
|
|
6062
6069
|
"org",
|
|
6063
6070
|
"diagnose",
|
|
6064
|
-
"
|
|
6071
|
+
"instanceupgrade.js"
|
|
6065
6072
|
],
|
|
6066
6073
|
"aliasPermutations": [],
|
|
6067
6074
|
"permutations": [
|
|
6068
|
-
"hardis:org:diagnose:
|
|
6069
|
-
"org:hardis:diagnose:
|
|
6070
|
-
"org:diagnose:hardis:
|
|
6071
|
-
"org:diagnose:
|
|
6072
|
-
"hardis:diagnose:org:
|
|
6073
|
-
"diagnose:hardis:org:
|
|
6074
|
-
"diagnose:org:hardis:
|
|
6075
|
-
"diagnose:org:
|
|
6076
|
-
"hardis:diagnose:
|
|
6077
|
-
"diagnose:hardis:
|
|
6078
|
-
"diagnose:
|
|
6079
|
-
"diagnose:
|
|
6080
|
-
"hardis:org:
|
|
6081
|
-
"org:hardis:
|
|
6082
|
-
"org:
|
|
6083
|
-
"org:
|
|
6084
|
-
"hardis:
|
|
6085
|
-
"
|
|
6086
|
-
"
|
|
6087
|
-
"
|
|
6088
|
-
"hardis:
|
|
6089
|
-
"
|
|
6090
|
-
"
|
|
6091
|
-
"
|
|
6092
|
-
]
|
|
6093
|
-
},
|
|
6094
|
-
"hardis:org:diagnose:
|
|
6095
|
-
"aliases": [],
|
|
6096
|
-
"args": {},
|
|
6097
|
-
"description": "
|
|
6075
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
6076
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
6077
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
6078
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
6079
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
6080
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
6081
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
6082
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
6083
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
6084
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
6085
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
6086
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
6087
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
6088
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
6089
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
6090
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
6091
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
6092
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
6093
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
6094
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
6095
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
6096
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
6097
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
6098
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
6099
|
+
]
|
|
6100
|
+
},
|
|
6101
|
+
"hardis:org:diagnose:legacyapi": {
|
|
6102
|
+
"aliases": [],
|
|
6103
|
+
"args": {},
|
|
6104
|
+
"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",
|
|
6098
6105
|
"examples": [
|
|
6099
|
-
"$ sf hardis:org:diagnose:
|
|
6100
|
-
"$ sf hardis:org:diagnose:
|
|
6106
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
6107
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6108
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6109
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6101
6110
|
],
|
|
6102
6111
|
"flags": {
|
|
6103
6112
|
"json": {
|
|
@@ -6115,18 +6124,28 @@
|
|
|
6115
6124
|
"multiple": false,
|
|
6116
6125
|
"type": "option"
|
|
6117
6126
|
},
|
|
6118
|
-
"
|
|
6119
|
-
"char": "
|
|
6120
|
-
"description": "
|
|
6121
|
-
"name": "
|
|
6127
|
+
"eventtype": {
|
|
6128
|
+
"char": "e",
|
|
6129
|
+
"description": "Type of EventLogFile event to analyze",
|
|
6130
|
+
"name": "eventtype",
|
|
6131
|
+
"default": "ApiTotalUsage",
|
|
6122
6132
|
"hasDynamicHelp": false,
|
|
6123
6133
|
"multiple": false,
|
|
6124
6134
|
"type": "option"
|
|
6125
6135
|
},
|
|
6126
|
-
"
|
|
6127
|
-
"char": "
|
|
6128
|
-
"description": "
|
|
6129
|
-
"name": "
|
|
6136
|
+
"limit": {
|
|
6137
|
+
"char": "l",
|
|
6138
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
6139
|
+
"name": "limit",
|
|
6140
|
+
"default": 999,
|
|
6141
|
+
"hasDynamicHelp": false,
|
|
6142
|
+
"multiple": false,
|
|
6143
|
+
"type": "option"
|
|
6144
|
+
},
|
|
6145
|
+
"outputfile": {
|
|
6146
|
+
"char": "f",
|
|
6147
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6148
|
+
"name": "outputfile",
|
|
6130
6149
|
"hasDynamicHelp": false,
|
|
6131
6150
|
"multiple": false,
|
|
6132
6151
|
"type": "option"
|
|
@@ -6169,13 +6188,13 @@
|
|
|
6169
6188
|
},
|
|
6170
6189
|
"hasDynamicHelp": true,
|
|
6171
6190
|
"hiddenAliases": [],
|
|
6172
|
-
"id": "hardis:org:diagnose:
|
|
6191
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
6173
6192
|
"pluginAlias": "sfdx-hardis",
|
|
6174
6193
|
"pluginName": "sfdx-hardis",
|
|
6175
6194
|
"pluginType": "core",
|
|
6176
6195
|
"strict": true,
|
|
6177
6196
|
"enableJsonFlag": true,
|
|
6178
|
-
"title": "
|
|
6197
|
+
"title": "Check for legacy API use",
|
|
6179
6198
|
"requiresProject": false,
|
|
6180
6199
|
"isESM": true,
|
|
6181
6200
|
"relativePath": [
|
|
@@ -6184,42 +6203,42 @@
|
|
|
6184
6203
|
"hardis",
|
|
6185
6204
|
"org",
|
|
6186
6205
|
"diagnose",
|
|
6187
|
-
"
|
|
6206
|
+
"legacyapi.js"
|
|
6188
6207
|
],
|
|
6189
6208
|
"aliasPermutations": [],
|
|
6190
6209
|
"permutations": [
|
|
6191
|
-
"hardis:org:diagnose:
|
|
6192
|
-
"org:hardis:diagnose:
|
|
6193
|
-
"org:diagnose:hardis:
|
|
6194
|
-
"org:diagnose:
|
|
6195
|
-
"hardis:diagnose:org:
|
|
6196
|
-
"diagnose:hardis:org:
|
|
6197
|
-
"diagnose:org:hardis:
|
|
6198
|
-
"diagnose:org:
|
|
6199
|
-
"hardis:diagnose:
|
|
6200
|
-
"diagnose:hardis:
|
|
6201
|
-
"diagnose:
|
|
6202
|
-
"diagnose:
|
|
6203
|
-
"hardis:org:
|
|
6204
|
-
"org:hardis:
|
|
6205
|
-
"org:
|
|
6206
|
-
"org:
|
|
6207
|
-
"hardis:
|
|
6208
|
-
"
|
|
6209
|
-
"
|
|
6210
|
-
"
|
|
6211
|
-
"hardis:
|
|
6212
|
-
"
|
|
6213
|
-
"
|
|
6214
|
-
"
|
|
6210
|
+
"hardis:org:diagnose:legacyapi",
|
|
6211
|
+
"org:hardis:diagnose:legacyapi",
|
|
6212
|
+
"org:diagnose:hardis:legacyapi",
|
|
6213
|
+
"org:diagnose:legacyapi:hardis",
|
|
6214
|
+
"hardis:diagnose:org:legacyapi",
|
|
6215
|
+
"diagnose:hardis:org:legacyapi",
|
|
6216
|
+
"diagnose:org:hardis:legacyapi",
|
|
6217
|
+
"diagnose:org:legacyapi:hardis",
|
|
6218
|
+
"hardis:diagnose:legacyapi:org",
|
|
6219
|
+
"diagnose:hardis:legacyapi:org",
|
|
6220
|
+
"diagnose:legacyapi:hardis:org",
|
|
6221
|
+
"diagnose:legacyapi:org:hardis",
|
|
6222
|
+
"hardis:org:legacyapi:diagnose",
|
|
6223
|
+
"org:hardis:legacyapi:diagnose",
|
|
6224
|
+
"org:legacyapi:hardis:diagnose",
|
|
6225
|
+
"org:legacyapi:diagnose:hardis",
|
|
6226
|
+
"hardis:legacyapi:org:diagnose",
|
|
6227
|
+
"legacyapi:hardis:org:diagnose",
|
|
6228
|
+
"legacyapi:org:hardis:diagnose",
|
|
6229
|
+
"legacyapi:org:diagnose:hardis",
|
|
6230
|
+
"hardis:legacyapi:diagnose:org",
|
|
6231
|
+
"legacyapi:hardis:diagnose:org",
|
|
6232
|
+
"legacyapi:diagnose:hardis:org",
|
|
6233
|
+
"legacyapi:diagnose:org:hardis"
|
|
6215
6234
|
]
|
|
6216
6235
|
},
|
|
6217
|
-
"hardis:org:diagnose:
|
|
6236
|
+
"hardis:org:diagnose:licenses": {
|
|
6218
6237
|
"aliases": [],
|
|
6219
6238
|
"args": {},
|
|
6220
|
-
"description": "\n
|
|
6239
|
+
"description": "\n**Lists and analyzes User Licenses and Permission Set Licenses subscribed and used in a Salesforce org.**\n\nThis command provides a comprehensive overview of your Salesforce license consumption. It's particularly useful for:\n\n- **License Management:** Understanding which licenses are active, how many are available, and how many are being used.\n- **Cost Optimization:** Identifying unused or underutilized licenses that could be reallocated or decommissioned.\n- **Compliance:** Ensuring that your organization is compliant with Salesforce licensing agreements.\n- **Monitoring:** Tracking license usage trends over time.\n\nKey functionalities:\n\n- **User License Details:** Retrieves information about standard and custom User Licenses, including `MasterLabel`, `Name`, `TotalLicenses`, and `UsedLicenses`.\n- **Permission Set License Details:** Retrieves information about Permission Set Licenses, including `MasterLabel`, `PermissionSetLicenseKey`, `TotalLicenses`, and `UsedLicenses`.\n- **Used Licenses Filter:** The `--usedonly` flag allows you to filter the report to show only licenses that have at least one `UsedLicenses` count greater than zero.\n- **CSV Report Generation:** Generates a CSV file containing all the retrieved license information, suitable for detailed analysis.\n- **Notifications:** Sends notifications to configured channels (e.g., Grafana, Slack, MS Teams) with a summary of license usage, including lists of active and used licenses.\n\n## Technical explanations\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It executes SOQL queries against the `UserLicense` and `PermissionSetLicense` objects in Salesforce to retrieve license data.\n- **Data Transformation:** It processes the query results, reformatting the data to be more readable and consistent for reporting purposes (e.g., removing `Id` and `attributes`, renaming `PermissionSetLicenseKey` to `Name`).\n- **Data Aggregation:** It aggregates license information, creating a `licensesByKey` object for quick lookups and a `usedLicenses` array for a concise list of actively used licenses.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of license data.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the license extraction process and the used licenses.\n",
|
|
6221
6240
|
"examples": [
|
|
6222
|
-
"$ sf hardis:org:diagnose:
|
|
6241
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
6223
6242
|
],
|
|
6224
6243
|
"flags": {
|
|
6225
6244
|
"json": {
|
|
@@ -6245,6 +6264,13 @@
|
|
|
6245
6264
|
"multiple": false,
|
|
6246
6265
|
"type": "option"
|
|
6247
6266
|
},
|
|
6267
|
+
"usedonly": {
|
|
6268
|
+
"char": "u",
|
|
6269
|
+
"description": "Filter to have only used licenses",
|
|
6270
|
+
"name": "usedonly",
|
|
6271
|
+
"allowNo": false,
|
|
6272
|
+
"type": "boolean"
|
|
6273
|
+
},
|
|
6248
6274
|
"debug": {
|
|
6249
6275
|
"char": "d",
|
|
6250
6276
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6283,30 +6309,13 @@
|
|
|
6283
6309
|
},
|
|
6284
6310
|
"hasDynamicHelp": true,
|
|
6285
6311
|
"hiddenAliases": [],
|
|
6286
|
-
"id": "hardis:org:diagnose:
|
|
6312
|
+
"id": "hardis:org:diagnose:licenses",
|
|
6287
6313
|
"pluginAlias": "sfdx-hardis",
|
|
6288
6314
|
"pluginName": "sfdx-hardis",
|
|
6289
6315
|
"pluginType": "core",
|
|
6290
6316
|
"strict": true,
|
|
6291
6317
|
"enableJsonFlag": true,
|
|
6292
|
-
"title": "
|
|
6293
|
-
"allowedInactiveConnectedApps": [
|
|
6294
|
-
"Ant Migration Tool",
|
|
6295
|
-
"Chatter Desktop",
|
|
6296
|
-
"Chatter Mobile for BlackBerry",
|
|
6297
|
-
"Force.com IDE",
|
|
6298
|
-
"OIQ_Integration",
|
|
6299
|
-
"Salesforce CLI",
|
|
6300
|
-
"Salesforce Files",
|
|
6301
|
-
"Salesforce Mobile Dashboards",
|
|
6302
|
-
"Salesforce Touch",
|
|
6303
|
-
"Salesforce for Outlook",
|
|
6304
|
-
"SalesforceA",
|
|
6305
|
-
"SalesforceA for Android",
|
|
6306
|
-
"SalesforceA for iOS",
|
|
6307
|
-
"SalesforceDX Namespace Registry",
|
|
6308
|
-
"SalesforceIQ"
|
|
6309
|
-
],
|
|
6318
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6310
6319
|
"requiresProject": false,
|
|
6311
6320
|
"isESM": true,
|
|
6312
6321
|
"relativePath": [
|
|
@@ -6315,43 +6324,42 @@
|
|
|
6315
6324
|
"hardis",
|
|
6316
6325
|
"org",
|
|
6317
6326
|
"diagnose",
|
|
6318
|
-
"
|
|
6327
|
+
"licenses.js"
|
|
6319
6328
|
],
|
|
6320
6329
|
"aliasPermutations": [],
|
|
6321
6330
|
"permutations": [
|
|
6322
|
-
"hardis:org:diagnose:
|
|
6323
|
-
"org:hardis:diagnose:
|
|
6324
|
-
"org:diagnose:hardis:
|
|
6325
|
-
"org:diagnose:
|
|
6326
|
-
"hardis:diagnose:org:
|
|
6327
|
-
"diagnose:hardis:org:
|
|
6328
|
-
"diagnose:org:hardis:
|
|
6329
|
-
"diagnose:org:
|
|
6330
|
-
"hardis:diagnose:
|
|
6331
|
-
"diagnose:hardis:
|
|
6332
|
-
"diagnose:
|
|
6333
|
-
"diagnose:
|
|
6334
|
-
"hardis:org:
|
|
6335
|
-
"org:hardis:
|
|
6336
|
-
"org:
|
|
6337
|
-
"org:
|
|
6338
|
-
"hardis:
|
|
6339
|
-
"
|
|
6340
|
-
"
|
|
6341
|
-
"
|
|
6342
|
-
"hardis:
|
|
6343
|
-
"
|
|
6344
|
-
"
|
|
6345
|
-
"
|
|
6331
|
+
"hardis:org:diagnose:licenses",
|
|
6332
|
+
"org:hardis:diagnose:licenses",
|
|
6333
|
+
"org:diagnose:hardis:licenses",
|
|
6334
|
+
"org:diagnose:licenses:hardis",
|
|
6335
|
+
"hardis:diagnose:org:licenses",
|
|
6336
|
+
"diagnose:hardis:org:licenses",
|
|
6337
|
+
"diagnose:org:hardis:licenses",
|
|
6338
|
+
"diagnose:org:licenses:hardis",
|
|
6339
|
+
"hardis:diagnose:licenses:org",
|
|
6340
|
+
"diagnose:hardis:licenses:org",
|
|
6341
|
+
"diagnose:licenses:hardis:org",
|
|
6342
|
+
"diagnose:licenses:org:hardis",
|
|
6343
|
+
"hardis:org:licenses:diagnose",
|
|
6344
|
+
"org:hardis:licenses:diagnose",
|
|
6345
|
+
"org:licenses:hardis:diagnose",
|
|
6346
|
+
"org:licenses:diagnose:hardis",
|
|
6347
|
+
"hardis:licenses:org:diagnose",
|
|
6348
|
+
"licenses:hardis:org:diagnose",
|
|
6349
|
+
"licenses:org:hardis:diagnose",
|
|
6350
|
+
"licenses:org:diagnose:hardis",
|
|
6351
|
+
"hardis:licenses:diagnose:org",
|
|
6352
|
+
"licenses:hardis:diagnose:org",
|
|
6353
|
+
"licenses:diagnose:hardis:org",
|
|
6354
|
+
"licenses:diagnose:org:hardis"
|
|
6346
6355
|
]
|
|
6347
6356
|
},
|
|
6348
|
-
"hardis:org:diagnose:
|
|
6357
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6349
6358
|
"aliases": [],
|
|
6350
6359
|
"args": {},
|
|
6351
|
-
"description": "
|
|
6360
|
+
"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",
|
|
6352
6361
|
"examples": [
|
|
6353
|
-
"$ sf hardis:org:diagnose:
|
|
6354
|
-
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6362
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6355
6363
|
],
|
|
6356
6364
|
"flags": {
|
|
6357
6365
|
"json": {
|
|
@@ -6415,32 +6423,14 @@
|
|
|
6415
6423
|
},
|
|
6416
6424
|
"hasDynamicHelp": true,
|
|
6417
6425
|
"hiddenAliases": [],
|
|
6418
|
-
"id": "hardis:org:diagnose:
|
|
6426
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6419
6427
|
"pluginAlias": "sfdx-hardis",
|
|
6420
6428
|
"pluginName": "sfdx-hardis",
|
|
6421
6429
|
"pluginType": "core",
|
|
6422
6430
|
"strict": true,
|
|
6423
6431
|
"enableJsonFlag": true,
|
|
6424
|
-
"title": "
|
|
6432
|
+
"title": "Check Release Updates of an org",
|
|
6425
6433
|
"requiresProject": false,
|
|
6426
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
6427
|
-
"Sales_User"
|
|
6428
|
-
],
|
|
6429
|
-
"permSetsPermSetLicenses": [
|
|
6430
|
-
{
|
|
6431
|
-
"permSet": "Sales_User",
|
|
6432
|
-
"permSetLicense": "SalesUserPsl"
|
|
6433
|
-
}
|
|
6434
|
-
],
|
|
6435
|
-
"profilesPermissionSetLicenses": [
|
|
6436
|
-
{
|
|
6437
|
-
"profile": "Salesforce API Only",
|
|
6438
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6439
|
-
}
|
|
6440
|
-
],
|
|
6441
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6442
|
-
"IdentityConnect"
|
|
6443
|
-
],
|
|
6444
6434
|
"isESM": true,
|
|
6445
6435
|
"relativePath": [
|
|
6446
6436
|
"lib",
|
|
@@ -6448,46 +6438,43 @@
|
|
|
6448
6438
|
"hardis",
|
|
6449
6439
|
"org",
|
|
6450
6440
|
"diagnose",
|
|
6451
|
-
"
|
|
6441
|
+
"releaseupdates.js"
|
|
6452
6442
|
],
|
|
6453
6443
|
"aliasPermutations": [],
|
|
6454
6444
|
"permutations": [
|
|
6455
|
-
"hardis:org:diagnose:
|
|
6456
|
-
"org:hardis:diagnose:
|
|
6457
|
-
"org:diagnose:hardis:
|
|
6458
|
-
"org:diagnose:
|
|
6459
|
-
"hardis:diagnose:org:
|
|
6460
|
-
"diagnose:hardis:org:
|
|
6461
|
-
"diagnose:org:hardis:
|
|
6462
|
-
"diagnose:org:
|
|
6463
|
-
"hardis:diagnose:
|
|
6464
|
-
"diagnose:hardis:
|
|
6465
|
-
"diagnose:
|
|
6466
|
-
"diagnose:
|
|
6467
|
-
"hardis:org:
|
|
6468
|
-
"org:hardis:
|
|
6469
|
-
"org:
|
|
6470
|
-
"org:
|
|
6471
|
-
"hardis:
|
|
6472
|
-
"
|
|
6473
|
-
"
|
|
6474
|
-
"
|
|
6475
|
-
"hardis:
|
|
6476
|
-
"
|
|
6477
|
-
"
|
|
6478
|
-
"
|
|
6445
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6446
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6447
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6448
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6449
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6450
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6451
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6452
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6453
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6454
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6455
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6456
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6457
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6458
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6459
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6460
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6461
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6462
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6463
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6464
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6465
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6466
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6467
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6468
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6479
6469
|
]
|
|
6480
6470
|
},
|
|
6481
|
-
"hardis:org:diagnose:
|
|
6471
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6482
6472
|
"aliases": [],
|
|
6483
6473
|
"args": {},
|
|
6484
|
-
"description": "
|
|
6474
|
+
"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",
|
|
6485
6475
|
"examples": [
|
|
6486
|
-
"$ sf hardis:org:diagnose:
|
|
6487
|
-
"$ sf hardis:org:diagnose:
|
|
6488
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6489
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6490
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6476
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6477
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6491
6478
|
],
|
|
6492
6479
|
"flags": {
|
|
6493
6480
|
"json": {
|
|
@@ -6521,33 +6508,6 @@
|
|
|
6521
6508
|
"multiple": false,
|
|
6522
6509
|
"type": "option"
|
|
6523
6510
|
},
|
|
6524
|
-
"licensetypes": {
|
|
6525
|
-
"char": "l",
|
|
6526
|
-
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6527
|
-
"name": "licensetypes",
|
|
6528
|
-
"hasDynamicHelp": false,
|
|
6529
|
-
"multiple": false,
|
|
6530
|
-
"options": [
|
|
6531
|
-
"all",
|
|
6532
|
-
"all-crm",
|
|
6533
|
-
"all-paying"
|
|
6534
|
-
],
|
|
6535
|
-
"type": "option"
|
|
6536
|
-
},
|
|
6537
|
-
"licenseidentifiers": {
|
|
6538
|
-
"char": "i",
|
|
6539
|
-
"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",
|
|
6540
|
-
"name": "licenseidentifiers",
|
|
6541
|
-
"hasDynamicHelp": false,
|
|
6542
|
-
"multiple": false,
|
|
6543
|
-
"type": "option"
|
|
6544
|
-
},
|
|
6545
|
-
"returnactiveusers": {
|
|
6546
|
-
"description": "Inverts the command by returning the active users",
|
|
6547
|
-
"name": "returnactiveusers",
|
|
6548
|
-
"allowNo": false,
|
|
6549
|
-
"type": "boolean"
|
|
6550
|
-
},
|
|
6551
6511
|
"debug": {
|
|
6552
6512
|
"char": "d",
|
|
6553
6513
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6586,13 +6546,13 @@
|
|
|
6586
6546
|
},
|
|
6587
6547
|
"hasDynamicHelp": true,
|
|
6588
6548
|
"hiddenAliases": [],
|
|
6589
|
-
"id": "hardis:org:diagnose:
|
|
6549
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6590
6550
|
"pluginAlias": "sfdx-hardis",
|
|
6591
6551
|
"pluginName": "sfdx-hardis",
|
|
6592
6552
|
"pluginType": "core",
|
|
6593
6553
|
"strict": true,
|
|
6594
6554
|
"enableJsonFlag": true,
|
|
6595
|
-
"title": "Detect unused
|
|
6555
|
+
"title": "Detect unused Apex classes in an org",
|
|
6596
6556
|
"requiresProject": false,
|
|
6597
6557
|
"isESM": true,
|
|
6598
6558
|
"relativePath": [
|
|
@@ -6601,42 +6561,42 @@
|
|
|
6601
6561
|
"hardis",
|
|
6602
6562
|
"org",
|
|
6603
6563
|
"diagnose",
|
|
6604
|
-
"
|
|
6564
|
+
"unused-apex-classes.js"
|
|
6605
6565
|
],
|
|
6606
6566
|
"aliasPermutations": [],
|
|
6607
6567
|
"permutations": [
|
|
6608
|
-
"hardis:org:diagnose:
|
|
6609
|
-
"org:hardis:diagnose:
|
|
6610
|
-
"org:diagnose:hardis:
|
|
6611
|
-
"org:diagnose:
|
|
6612
|
-
"hardis:diagnose:org:
|
|
6613
|
-
"diagnose:hardis:org:
|
|
6614
|
-
"diagnose:org:hardis:
|
|
6615
|
-
"diagnose:org:
|
|
6616
|
-
"hardis:diagnose:
|
|
6617
|
-
"diagnose:hardis:
|
|
6618
|
-
"diagnose:
|
|
6619
|
-
"diagnose:
|
|
6620
|
-
"hardis:org:
|
|
6621
|
-
"org:hardis:
|
|
6622
|
-
"org:
|
|
6623
|
-
"org:
|
|
6624
|
-
"hardis:
|
|
6625
|
-
"
|
|
6626
|
-
"
|
|
6627
|
-
"
|
|
6628
|
-
"hardis:
|
|
6629
|
-
"
|
|
6630
|
-
"
|
|
6631
|
-
"
|
|
6568
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6569
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6570
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6571
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6572
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6573
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6574
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6575
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6576
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6577
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6578
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6579
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6580
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6581
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6582
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6583
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6584
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6585
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6586
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6587
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6588
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6589
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6590
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6591
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6632
6592
|
]
|
|
6633
6593
|
},
|
|
6634
|
-
"hardis:org:
|
|
6594
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6635
6595
|
"aliases": [],
|
|
6636
6596
|
"args": {},
|
|
6637
|
-
"description": "\n## Command Behavior\n\n**
|
|
6597
|
+
"description": "\n## Command Behavior\n\n**Identifies and reports on potentially unused Connected Apps in a Salesforce org, suggesting candidates for deletion or deactivation.**\n\nThis command helps improve org security and reduce technical debt by pinpointing Connected Apps that are no longer actively used. Connected Apps can pose security risks if left unmonitored, and cleaning them up contributes to a healthier Salesforce environment.\n\nKey functionalities:\n\n- **Connected App Data Collection:** Gathers information about all Connected Apps in the org, including creation and last modified dates, and associated users.\n- **Usage Analysis:** Analyzes `LoginHistory` and `OAuthToken` records to determine the last usage date of each Connected App.\n- **Inactivity Detection:** Flags Connected Apps as potentially unused if they have no recent login history or OAuth token usage.\n- **Accessibility Check:** Examines Connected App metadata to identify if they are accessible (e.g., if they require admin approval and have no profiles or permission sets assigned).\n- **Ignored Apps:** Automatically ignores a predefined list of common Salesforce Connected Apps (e.g., `Salesforce CLI`, `Salesforce Mobile Dashboards`). You can extend this list by defining the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n- **CSV Report Generation:** Generates a CSV file containing details of all analyzed Connected Apps, including their usage status, last usage date, and reasons for being flagged as potentially unused.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of potentially unused Connected Apps.\n\n**Default Ignored Connected Apps:**\n\n- Ant Migration Tool\n- Chatter Desktop\n- Chatter Mobile for BlackBerry\n- Force.com IDE\n- OIQ_Integration\n- Salesforce CLI\n- Salesforce Files\n- Salesforce Mobile Dashboards\n- Salesforce Touch\n- Salesforce for Outlook\n- SalesforceA\n- SalesforceA for Android\n- SalesforceA for iOS\n- SalesforceDX Namespace Registry\n- SalesforceIQ\n\nYou can add more ignored apps by defining a comma-separated list of names in the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n\n_Example: \nALLOWED_INACTIVE_CONNECTED_APPS=My App 1,My App 2, My App 3_\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-connected-apps/) and can output Grafana, Slack and MsTeams Notifications.\n\n## Technical explanations\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It performs SOQL queries against `ConnectedApplication`, `LoginHistory`, and `OAuthToken` objects to gather comprehensive data about Connected Apps and their usage.\n- **Temporary SFDX Project:** It creates a temporary SFDX project to retrieve Connected App metadata, allowing for local parsing and analysis of their XML files.\n- **Metadata Parsing:** It parses the `connectedApp-meta.xml` files to check for `isAdminApproved` and the presence of `profileName` or `permissionsetName` to determine accessibility.\n- **Data Correlation:** It correlates data from various Salesforce objects to build a complete picture of each Connected App's usage and status.\n- **Date Calculation:** Uses `moment` to calculate the time since the last OAuth token usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused Connected Apps.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **File System Operations:** Uses `fs-extra` for creating and removing temporary directories and files.\n- **Environment Variable Reading:** Reads the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable to customize the list of ignored Connected Apps.\n",
|
|
6638
6598
|
"examples": [
|
|
6639
|
-
"$ sf hardis:org:
|
|
6599
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6640
6600
|
],
|
|
6641
6601
|
"flags": {
|
|
6642
6602
|
"json": {
|
|
@@ -6654,37 +6614,10 @@
|
|
|
6654
6614
|
"multiple": false,
|
|
6655
6615
|
"type": "option"
|
|
6656
6616
|
},
|
|
6657
|
-
"
|
|
6658
|
-
"char": "
|
|
6659
|
-
"description": "
|
|
6660
|
-
"name": "
|
|
6661
|
-
"hasDynamicHelp": false,
|
|
6662
|
-
"multiple": false,
|
|
6663
|
-
"type": "option"
|
|
6664
|
-
},
|
|
6665
|
-
"chunksize": {
|
|
6666
|
-
"char": "c",
|
|
6667
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
6668
|
-
"name": "chunksize",
|
|
6669
|
-
"default": 1000,
|
|
6670
|
-
"hasDynamicHelp": false,
|
|
6671
|
-
"multiple": false,
|
|
6672
|
-
"type": "option"
|
|
6673
|
-
},
|
|
6674
|
-
"polltimeout": {
|
|
6675
|
-
"char": "t",
|
|
6676
|
-
"description": "Timeout in MS for Bulk API calls",
|
|
6677
|
-
"name": "polltimeout",
|
|
6678
|
-
"default": 300000,
|
|
6679
|
-
"hasDynamicHelp": false,
|
|
6680
|
-
"multiple": false,
|
|
6681
|
-
"type": "option"
|
|
6682
|
-
},
|
|
6683
|
-
"startchunknumber": {
|
|
6684
|
-
"char": "s",
|
|
6685
|
-
"description": "Chunk number to start from",
|
|
6686
|
-
"name": "startchunknumber",
|
|
6687
|
-
"default": 0,
|
|
6617
|
+
"outputfile": {
|
|
6618
|
+
"char": "f",
|
|
6619
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6620
|
+
"name": "outputfile",
|
|
6688
6621
|
"hasDynamicHelp": false,
|
|
6689
6622
|
"multiple": false,
|
|
6690
6623
|
"type": "option"
|
|
@@ -6727,13 +6660,30 @@
|
|
|
6727
6660
|
},
|
|
6728
6661
|
"hasDynamicHelp": true,
|
|
6729
6662
|
"hiddenAliases": [],
|
|
6730
|
-
"id": "hardis:org:
|
|
6663
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6731
6664
|
"pluginAlias": "sfdx-hardis",
|
|
6732
6665
|
"pluginName": "sfdx-hardis",
|
|
6733
6666
|
"pluginType": "core",
|
|
6734
6667
|
"strict": true,
|
|
6735
6668
|
"enableJsonFlag": true,
|
|
6736
|
-
"title": "
|
|
6669
|
+
"title": "Unused Connected Apps in an org",
|
|
6670
|
+
"allowedInactiveConnectedApps": [
|
|
6671
|
+
"Ant Migration Tool",
|
|
6672
|
+
"Chatter Desktop",
|
|
6673
|
+
"Chatter Mobile for BlackBerry",
|
|
6674
|
+
"Force.com IDE",
|
|
6675
|
+
"OIQ_Integration",
|
|
6676
|
+
"Salesforce CLI",
|
|
6677
|
+
"Salesforce Files",
|
|
6678
|
+
"Salesforce Mobile Dashboards",
|
|
6679
|
+
"Salesforce Touch",
|
|
6680
|
+
"Salesforce for Outlook",
|
|
6681
|
+
"SalesforceA",
|
|
6682
|
+
"SalesforceA for Android",
|
|
6683
|
+
"SalesforceA for iOS",
|
|
6684
|
+
"SalesforceDX Namespace Registry",
|
|
6685
|
+
"SalesforceIQ"
|
|
6686
|
+
],
|
|
6737
6687
|
"requiresProject": false,
|
|
6738
6688
|
"isESM": true,
|
|
6739
6689
|
"relativePath": [
|
|
@@ -6741,43 +6691,44 @@
|
|
|
6741
6691
|
"commands",
|
|
6742
6692
|
"hardis",
|
|
6743
6693
|
"org",
|
|
6744
|
-
"
|
|
6745
|
-
"
|
|
6694
|
+
"diagnose",
|
|
6695
|
+
"unused-connected-apps.js"
|
|
6746
6696
|
],
|
|
6747
6697
|
"aliasPermutations": [],
|
|
6748
6698
|
"permutations": [
|
|
6749
|
-
"hardis:org:
|
|
6750
|
-
"org:hardis:
|
|
6751
|
-
"org:
|
|
6752
|
-
"org:
|
|
6753
|
-
"hardis:
|
|
6754
|
-
"
|
|
6755
|
-
"
|
|
6756
|
-
"
|
|
6757
|
-
"hardis:
|
|
6758
|
-
"
|
|
6759
|
-
"
|
|
6760
|
-
"
|
|
6761
|
-
"hardis:org:
|
|
6762
|
-
"org:hardis:
|
|
6763
|
-
"org:
|
|
6764
|
-
"org:
|
|
6765
|
-
"hardis:
|
|
6766
|
-
"
|
|
6767
|
-
"
|
|
6768
|
-
"
|
|
6769
|
-
"hardis:
|
|
6770
|
-
"
|
|
6771
|
-
"
|
|
6772
|
-
"
|
|
6699
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6700
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6701
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6702
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6703
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6704
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6705
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6706
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6707
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6708
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6709
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6710
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6711
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6712
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6713
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6714
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6715
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6716
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6717
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6718
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6719
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6720
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6721
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6722
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6773
6723
|
]
|
|
6774
6724
|
},
|
|
6775
|
-
"hardis:org:
|
|
6725
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6776
6726
|
"aliases": [],
|
|
6777
6727
|
"args": {},
|
|
6778
|
-
"description": "\
|
|
6728
|
+
"description": "\n## Command Behavior\n\n**Detects and suggests the deletion of unused Permission Set License Assignments in a Salesforce org.**\n\nWhen a Permission Set (PS) linked to a Permission Set License (PSL) is assigned to a user, a Permission Set License Assignment (PSLA) is automatically created. However, when that PS is unassigned from the user, the PSLA is *not* automatically deleted. This can lead to organizations being charged for unused PSLAs, representing a hidden cost and technical debt.\n\nThis command identifies such useless PSLAs and provides options to delete them, helping to optimize license usage and reduce unnecessary expenses.\n\nKey functionalities:\n\n- **PSLA Detection:** Queries the Salesforce org to find all active PSLAs.\n- **Usage Verification:** Correlates PSLAs with actual Permission Set Assignments and Permission Set Group Assignments to determine if the underlying Permission Sets are still assigned to the user.\n- **Special Case Handling:** Accounts for specific scenarios where profiles might implicitly assign PSLAs (e.g., `Salesforce API Only` profile assigning `SalesforceAPIIntegrationPsl`) and allows for always excluding certain PSLAs from the unused check.\n- **Reporting:** Generates a CSV report of all identified unused PSLAs, including the user and the associated Permission Set License.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of unused PSLAs.\n- **Interactive Deletion:** In non-CI environments, it offers an interactive prompt to bulk delete the identified unused PSLAs.\n\nMany thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command :)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-licenses/) and can output Grafana, Slack and MsTeams Notifications.\n\n## Technical explanations\n\nThe command's technical implementation involves extensive querying of Salesforce objects and data correlation:\n\n- **SOQL Queries (Bulk API):** It uses `bulkQuery` and `bulkQueryChunksIn` to efficiently retrieve large volumes of data from `PermissionSetLicenseAssign`, `PermissionSetLicense`, `PermissionSet`, `PermissionSetGroupComponent`, and `PermissionSetAssignment` objects.\n- **Data Correlation:** It meticulously correlates data across these objects to determine if a `PermissionSetLicenseAssign` record has a corresponding active assignment to a Permission Set or Permission Set Group for the same user.\n- **Filtering Logic:** It applies complex filtering logic to exclude PSLAs that are genuinely in use or are part of predefined exceptions (e.g., `alwaysExcludeForActiveUsersPermissionSetLicenses`).\n- **Bulk Deletion:** If the user opts to delete unused PSLAs, it uses `bulkUpdate` with the `delete` operation to efficiently remove multiple records.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused PSLAs.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Interaction:** Uses `prompts` for interactive confirmation before performing deletion operations.\n",
|
|
6779
6729
|
"examples": [
|
|
6780
|
-
"$ sf hardis:org:
|
|
6730
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6731
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6781
6732
|
],
|
|
6782
6733
|
"flags": {
|
|
6783
6734
|
"json": {
|
|
@@ -6795,21 +6746,14 @@
|
|
|
6795
6746
|
"multiple": false,
|
|
6796
6747
|
"type": "option"
|
|
6797
6748
|
},
|
|
6798
|
-
"
|
|
6799
|
-
"char": "
|
|
6800
|
-
"description": "
|
|
6801
|
-
"name": "
|
|
6749
|
+
"outputfile": {
|
|
6750
|
+
"char": "f",
|
|
6751
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6752
|
+
"name": "outputfile",
|
|
6802
6753
|
"hasDynamicHelp": false,
|
|
6803
6754
|
"multiple": false,
|
|
6804
6755
|
"type": "option"
|
|
6805
6756
|
},
|
|
6806
|
-
"overwrite": {
|
|
6807
|
-
"char": "f",
|
|
6808
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
6809
|
-
"name": "overwrite",
|
|
6810
|
-
"allowNo": false,
|
|
6811
|
-
"type": "boolean"
|
|
6812
|
-
},
|
|
6813
6757
|
"debug": {
|
|
6814
6758
|
"char": "d",
|
|
6815
6759
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6848,58 +6792,79 @@
|
|
|
6848
6792
|
},
|
|
6849
6793
|
"hasDynamicHelp": true,
|
|
6850
6794
|
"hiddenAliases": [],
|
|
6851
|
-
"id": "hardis:org:
|
|
6795
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
6852
6796
|
"pluginAlias": "sfdx-hardis",
|
|
6853
6797
|
"pluginName": "sfdx-hardis",
|
|
6854
6798
|
"pluginType": "core",
|
|
6855
6799
|
"strict": true,
|
|
6856
6800
|
"enableJsonFlag": true,
|
|
6857
|
-
"title": "
|
|
6801
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
6858
6802
|
"requiresProject": false,
|
|
6803
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6804
|
+
"Sales_User"
|
|
6805
|
+
],
|
|
6806
|
+
"permSetsPermSetLicenses": [
|
|
6807
|
+
{
|
|
6808
|
+
"permSet": "Sales_User",
|
|
6809
|
+
"permSetLicense": "SalesUserPsl"
|
|
6810
|
+
}
|
|
6811
|
+
],
|
|
6812
|
+
"profilesPermissionSetLicenses": [
|
|
6813
|
+
{
|
|
6814
|
+
"profile": "Salesforce API Only",
|
|
6815
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6816
|
+
}
|
|
6817
|
+
],
|
|
6818
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6819
|
+
"IdentityConnect"
|
|
6820
|
+
],
|
|
6859
6821
|
"isESM": true,
|
|
6860
6822
|
"relativePath": [
|
|
6861
6823
|
"lib",
|
|
6862
6824
|
"commands",
|
|
6863
6825
|
"hardis",
|
|
6864
6826
|
"org",
|
|
6865
|
-
"
|
|
6866
|
-
"
|
|
6827
|
+
"diagnose",
|
|
6828
|
+
"unusedlicenses.js"
|
|
6867
6829
|
],
|
|
6868
6830
|
"aliasPermutations": [],
|
|
6869
6831
|
"permutations": [
|
|
6870
|
-
"hardis:org:
|
|
6871
|
-
"org:hardis:
|
|
6872
|
-
"org:
|
|
6873
|
-
"org:
|
|
6874
|
-
"hardis:
|
|
6875
|
-
"
|
|
6876
|
-
"
|
|
6877
|
-
"
|
|
6878
|
-
"hardis:
|
|
6879
|
-
"
|
|
6880
|
-
"
|
|
6881
|
-
"
|
|
6882
|
-
"hardis:org:
|
|
6883
|
-
"org:hardis:
|
|
6884
|
-
"org:
|
|
6885
|
-
"org:
|
|
6886
|
-
"hardis:
|
|
6887
|
-
"
|
|
6888
|
-
"
|
|
6889
|
-
"
|
|
6890
|
-
"hardis:
|
|
6891
|
-
"
|
|
6892
|
-
"
|
|
6893
|
-
"
|
|
6832
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
6833
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
6834
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
6835
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
6836
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
6837
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
6838
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
6839
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
6840
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
6841
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
6842
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
6843
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
6844
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
6845
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
6846
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
6847
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
6848
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
6849
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
6850
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
6851
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
6852
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
6853
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
6854
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
6855
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
6894
6856
|
]
|
|
6895
6857
|
},
|
|
6896
|
-
"hardis:org:
|
|
6858
|
+
"hardis:org:diagnose:unusedusers": {
|
|
6897
6859
|
"aliases": [],
|
|
6898
6860
|
"args": {},
|
|
6899
|
-
"description": "
|
|
6861
|
+
"description": "\n## Command Behavior\n\n**Detects and reports on inactive or unused Salesforce user accounts, helping to optimize license usage and enhance security.**\n\nEfficient user management is vital in Salesforce to ensure resources are optimized and costs are controlled. However, inactive or unused user accounts can often go unnoticed, leading to wasted licenses and potential security risks. This tool addresses this challenge by enabling administrators to identify users who haven't logged in within a specified period.\n\nBy analyzing user login activity and last login timestamps, this feature highlights inactive user accounts, allowing administrators to take appropriate action. Whether it's deactivating dormant accounts, freeing up licenses, or ensuring compliance with security policies, this functionality empowers administrators to maintain a lean and secure Salesforce environment.\n\nKey functionalities:\n\n- **Inactivity Detection:** Identifies users who have not logged in for a specified number of days (`--days` flag, default 180 days in CI, 365 days otherwise).\n- **License Type Filtering:** Allows filtering users by license type using `--licensetypes` (e.g., `all-crm`, `all-paying`) or specific license identifiers using `--licenseidentifiers`.\n - `all-crm`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT` licenses.\n - `all-paying`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT`, `PID_Customer_Community`, `PID_Customer_Community_Login`, `PID_Partner_Community`, `PID_Partner_Community_Login` licenses.\n - Note: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/sfdx_cli_reference/sforce_api_objects_userlicense.htm).\n- **Active User Retrieval:** The `--returnactiveusers` flag inverts the command, allowing you to retrieve active users who *have* logged in during the specified period.\n- **CSV Report Generation:** Generates a CSV file containing details of all identified users (inactive or active), including their last login date, profile, and license information.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of inactive or active users.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-users/) and can output Grafana, Slack and MsTeams Notifications.\n\n## Technical explanations\n\nThe command's technical implementation involves:\n\n- **SOQL Query (Bulk API):** It uses `bulkQuery` to efficiently retrieve user records from the Salesforce `User` object. The SOQL query dynamically constructs its WHERE clause based on the `--days`, `--licensetypes`, `--licenseidentifiers`, and `--returnactiveusers` flags.\n- **Interactive Prompts:** Uses `prompts` to interactively ask the user for the number of inactive days and license types if not provided via flags.\n- **License Mapping:** Internally maps common license type aliases (e.g., `all-crm`) to their corresponding Salesforce `LicenseDefinitionKey` values.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of users.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides a summary of the findings in the console, indicating the number of inactive or active users found.\n",
|
|
6900
6862
|
"examples": [
|
|
6901
|
-
"$ sf hardis:org:
|
|
6902
|
-
"$ sf hardis:org:
|
|
6863
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
6864
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6865
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6866
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6867
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6903
6868
|
],
|
|
6904
6869
|
"flags": {
|
|
6905
6870
|
"json": {
|
|
@@ -6917,14 +6882,49 @@
|
|
|
6917
6882
|
"multiple": false,
|
|
6918
6883
|
"type": "option"
|
|
6919
6884
|
},
|
|
6920
|
-
"
|
|
6885
|
+
"outputfile": {
|
|
6886
|
+
"char": "f",
|
|
6887
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6888
|
+
"name": "outputfile",
|
|
6889
|
+
"hasDynamicHelp": false,
|
|
6890
|
+
"multiple": false,
|
|
6891
|
+
"type": "option"
|
|
6892
|
+
},
|
|
6893
|
+
"days": {
|
|
6894
|
+
"char": "t",
|
|
6895
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6896
|
+
"name": "days",
|
|
6897
|
+
"hasDynamicHelp": false,
|
|
6898
|
+
"multiple": false,
|
|
6899
|
+
"type": "option"
|
|
6900
|
+
},
|
|
6901
|
+
"licensetypes": {
|
|
6921
6902
|
"char": "l",
|
|
6922
|
-
"description": "
|
|
6923
|
-
"name": "
|
|
6903
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6904
|
+
"name": "licensetypes",
|
|
6905
|
+
"hasDynamicHelp": false,
|
|
6906
|
+
"multiple": false,
|
|
6907
|
+
"options": [
|
|
6908
|
+
"all",
|
|
6909
|
+
"all-crm",
|
|
6910
|
+
"all-paying"
|
|
6911
|
+
],
|
|
6912
|
+
"type": "option"
|
|
6913
|
+
},
|
|
6914
|
+
"licenseidentifiers": {
|
|
6915
|
+
"char": "i",
|
|
6916
|
+
"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",
|
|
6917
|
+
"name": "licenseidentifiers",
|
|
6924
6918
|
"hasDynamicHelp": false,
|
|
6925
6919
|
"multiple": false,
|
|
6926
6920
|
"type": "option"
|
|
6927
6921
|
},
|
|
6922
|
+
"returnactiveusers": {
|
|
6923
|
+
"description": "Inverts the command by returning the active users",
|
|
6924
|
+
"name": "returnactiveusers",
|
|
6925
|
+
"allowNo": false,
|
|
6926
|
+
"type": "boolean"
|
|
6927
|
+
},
|
|
6928
6928
|
"debug": {
|
|
6929
6929
|
"char": "d",
|
|
6930
6930
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6963,55 +6963,55 @@
|
|
|
6963
6963
|
},
|
|
6964
6964
|
"hasDynamicHelp": true,
|
|
6965
6965
|
"hiddenAliases": [],
|
|
6966
|
-
"id": "hardis:org:
|
|
6966
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
6967
6967
|
"pluginAlias": "sfdx-hardis",
|
|
6968
6968
|
"pluginName": "sfdx-hardis",
|
|
6969
6969
|
"pluginType": "core",
|
|
6970
6970
|
"strict": true,
|
|
6971
6971
|
"enableJsonFlag": true,
|
|
6972
|
-
"title": "
|
|
6973
|
-
"requiresProject":
|
|
6972
|
+
"title": "Detect unused Users in Salesforce",
|
|
6973
|
+
"requiresProject": false,
|
|
6974
6974
|
"isESM": true,
|
|
6975
6975
|
"relativePath": [
|
|
6976
6976
|
"lib",
|
|
6977
6977
|
"commands",
|
|
6978
6978
|
"hardis",
|
|
6979
6979
|
"org",
|
|
6980
|
-
"
|
|
6981
|
-
"
|
|
6980
|
+
"diagnose",
|
|
6981
|
+
"unusedusers.js"
|
|
6982
6982
|
],
|
|
6983
6983
|
"aliasPermutations": [],
|
|
6984
6984
|
"permutations": [
|
|
6985
|
-
"hardis:org:
|
|
6986
|
-
"org:hardis:
|
|
6987
|
-
"org:
|
|
6988
|
-
"org:
|
|
6989
|
-
"hardis:
|
|
6990
|
-
"
|
|
6991
|
-
"
|
|
6992
|
-
"
|
|
6993
|
-
"hardis:
|
|
6994
|
-
"
|
|
6995
|
-
"
|
|
6996
|
-
"
|
|
6997
|
-
"hardis:org:
|
|
6998
|
-
"org:hardis:
|
|
6999
|
-
"org:
|
|
7000
|
-
"org:
|
|
7001
|
-
"hardis:
|
|
7002
|
-
"
|
|
7003
|
-
"
|
|
7004
|
-
"
|
|
7005
|
-
"hardis:
|
|
7006
|
-
"
|
|
7007
|
-
"
|
|
7008
|
-
"
|
|
6985
|
+
"hardis:org:diagnose:unusedusers",
|
|
6986
|
+
"org:hardis:diagnose:unusedusers",
|
|
6987
|
+
"org:diagnose:hardis:unusedusers",
|
|
6988
|
+
"org:diagnose:unusedusers:hardis",
|
|
6989
|
+
"hardis:diagnose:org:unusedusers",
|
|
6990
|
+
"diagnose:hardis:org:unusedusers",
|
|
6991
|
+
"diagnose:org:hardis:unusedusers",
|
|
6992
|
+
"diagnose:org:unusedusers:hardis",
|
|
6993
|
+
"hardis:diagnose:unusedusers:org",
|
|
6994
|
+
"diagnose:hardis:unusedusers:org",
|
|
6995
|
+
"diagnose:unusedusers:hardis:org",
|
|
6996
|
+
"diagnose:unusedusers:org:hardis",
|
|
6997
|
+
"hardis:org:unusedusers:diagnose",
|
|
6998
|
+
"org:hardis:unusedusers:diagnose",
|
|
6999
|
+
"org:unusedusers:hardis:diagnose",
|
|
7000
|
+
"org:unusedusers:diagnose:hardis",
|
|
7001
|
+
"hardis:unusedusers:org:diagnose",
|
|
7002
|
+
"unusedusers:hardis:org:diagnose",
|
|
7003
|
+
"unusedusers:org:hardis:diagnose",
|
|
7004
|
+
"unusedusers:org:diagnose:hardis",
|
|
7005
|
+
"hardis:unusedusers:diagnose:org",
|
|
7006
|
+
"unusedusers:hardis:diagnose:org",
|
|
7007
|
+
"unusedusers:diagnose:hardis:org",
|
|
7008
|
+
"unusedusers:diagnose:org:hardis"
|
|
7009
7009
|
]
|
|
7010
7010
|
},
|
|
7011
7011
|
"hardis:org:generate:packagexmlfull": {
|
|
7012
7012
|
"aliases": [],
|
|
7013
7013
|
"args": {},
|
|
7014
|
-
"description": "\n## Command Behavior\n\n**Generates a comprehensive `package.xml` file for a Salesforce org, including all metadata components, even managed ones.**\n\nThis command is essential for various Salesforce development and administration tasks, especially when you need a complete snapshot of an org's metadata. It goes beyond typical source tracking by including managed package components, which is crucial for understanding the full metadata footprint of an org.\n\nKey functionalities:\n\n- **Full Org Metadata Retrieval:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a complete list of all metadata types and their members.\n- **Managed Package Inclusion:** Unlike standard source retrieval, this command explicitly includes metadata from managed packages, providing a truly comprehensive `package.xml`.\n- **Customizable Output:** Allows you to specify the output file path for the generated `package.xml`.\n- **Interactive Org Selection:** If no target org is specified, it interactively prompts the user to choose an org
|
|
7014
|
+
"description": "\n## Command Behavior\n\n**Generates a comprehensive `package.xml` file for a Salesforce org, including all metadata components, even managed ones.**\n\nThis command is essential for various Salesforce development and administration tasks, especially when you need a complete snapshot of an org's metadata. It goes beyond typical source tracking by including managed package components, which is crucial for understanding the full metadata footprint of an org.\n\nKey functionalities:\n\n- **Full Org Metadata Retrieval:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a complete list of all metadata types and their members.\n- **Managed Package Inclusion:** Unlike standard source retrieval, this command explicitly includes metadata from managed packages, providing a truly comprehensive `package.xml`.\n- **Customizable Output:** Allows you to specify the output file path for the generated `package.xml`.\n- **Interactive Org Selection:** If no target org is specified, it interactively prompts the user to choose an org. (or use --no-prompt to skip this step)\n\n## Technical explanations\n\nThe command's technical implementation involves:\n\n- **Salesforce Metadata API Interaction:** It leverages the Salesforce Metadata API to list all available metadata types and then retrieve all components for each type.\n- **`buildOrgManifest` Utility:** The core logic for querying the org's metadata and constructing the `package.xml` is encapsulated within the `buildOrgManifest` utility function.\n- **XML Generation:** It dynamically builds the XML structure of the `package.xml` file, including the `types` and `members` elements for all retrieved metadata.\n- **File System Operations:** It writes the generated `package.xml` file to the specified output path.\n- **Interactive Prompts:** Uses `promptOrgUsernameDefault` to guide the user in selecting the target Salesforce org.\n",
|
|
7015
7015
|
"examples": [
|
|
7016
7016
|
"$ sf hardis:org:generate:packagexmlfull",
|
|
7017
7017
|
"$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
|
|
@@ -7047,6 +7047,13 @@
|
|
|
7047
7047
|
"allowNo": false,
|
|
7048
7048
|
"type": "boolean"
|
|
7049
7049
|
},
|
|
7050
|
+
"no-prompt": {
|
|
7051
|
+
"char": "n",
|
|
7052
|
+
"description": "Do not prompt for org username, use the default one",
|
|
7053
|
+
"name": "no-prompt",
|
|
7054
|
+
"allowNo": false,
|
|
7055
|
+
"type": "boolean"
|
|
7056
|
+
},
|
|
7050
7057
|
"websocket": {
|
|
7051
7058
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7052
7059
|
"name": "websocket",
|
|
@@ -8847,135 +8854,6 @@
|
|
|
8847
8854
|
"promote:version:package:hardis"
|
|
8848
8855
|
]
|
|
8849
8856
|
},
|
|
8850
|
-
"hardis:project:configure:auth": {
|
|
8851
|
-
"aliases": [],
|
|
8852
|
-
"args": {},
|
|
8853
|
-
"description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n## Technical explanations\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
|
|
8854
|
-
"examples": [
|
|
8855
|
-
"$ sf hardis:project:configure:auth"
|
|
8856
|
-
],
|
|
8857
|
-
"flags": {
|
|
8858
|
-
"json": {
|
|
8859
|
-
"description": "Format output as json.",
|
|
8860
|
-
"helpGroup": "GLOBAL",
|
|
8861
|
-
"name": "json",
|
|
8862
|
-
"allowNo": false,
|
|
8863
|
-
"type": "boolean"
|
|
8864
|
-
},
|
|
8865
|
-
"flags-dir": {
|
|
8866
|
-
"helpGroup": "GLOBAL",
|
|
8867
|
-
"name": "flags-dir",
|
|
8868
|
-
"summary": "Import flag values from a directory.",
|
|
8869
|
-
"hasDynamicHelp": false,
|
|
8870
|
-
"multiple": false,
|
|
8871
|
-
"type": "option"
|
|
8872
|
-
},
|
|
8873
|
-
"devhub": {
|
|
8874
|
-
"char": "b",
|
|
8875
|
-
"description": "Configure project DevHub",
|
|
8876
|
-
"name": "devhub",
|
|
8877
|
-
"allowNo": false,
|
|
8878
|
-
"type": "boolean"
|
|
8879
|
-
},
|
|
8880
|
-
"debug": {
|
|
8881
|
-
"char": "d",
|
|
8882
|
-
"description": "Activate debug mode (more logs)",
|
|
8883
|
-
"name": "debug",
|
|
8884
|
-
"allowNo": false,
|
|
8885
|
-
"type": "boolean"
|
|
8886
|
-
},
|
|
8887
|
-
"websocket": {
|
|
8888
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8889
|
-
"name": "websocket",
|
|
8890
|
-
"hasDynamicHelp": false,
|
|
8891
|
-
"multiple": false,
|
|
8892
|
-
"type": "option"
|
|
8893
|
-
},
|
|
8894
|
-
"skipauth": {
|
|
8895
|
-
"description": "Skip authentication check when a default username is required",
|
|
8896
|
-
"name": "skipauth",
|
|
8897
|
-
"allowNo": false,
|
|
8898
|
-
"type": "boolean"
|
|
8899
|
-
},
|
|
8900
|
-
"target-org": {
|
|
8901
|
-
"aliases": [
|
|
8902
|
-
"targetusername",
|
|
8903
|
-
"u"
|
|
8904
|
-
],
|
|
8905
|
-
"char": "o",
|
|
8906
|
-
"deprecateAliases": true,
|
|
8907
|
-
"name": "target-org",
|
|
8908
|
-
"noCacheDefault": true,
|
|
8909
|
-
"summary": "Username or alias of the target org.",
|
|
8910
|
-
"hasDynamicHelp": true,
|
|
8911
|
-
"multiple": false,
|
|
8912
|
-
"type": "option"
|
|
8913
|
-
},
|
|
8914
|
-
"target-dev-hub": {
|
|
8915
|
-
"aliases": [
|
|
8916
|
-
"targetdevhubusername"
|
|
8917
|
-
],
|
|
8918
|
-
"char": "v",
|
|
8919
|
-
"deprecateAliases": true,
|
|
8920
|
-
"name": "target-dev-hub",
|
|
8921
|
-
"noCacheDefault": true,
|
|
8922
|
-
"required": false,
|
|
8923
|
-
"summary": "Username or alias of the Dev Hub org.",
|
|
8924
|
-
"hasDynamicHelp": true,
|
|
8925
|
-
"multiple": false,
|
|
8926
|
-
"type": "option"
|
|
8927
|
-
}
|
|
8928
|
-
},
|
|
8929
|
-
"hasDynamicHelp": true,
|
|
8930
|
-
"hiddenAliases": [],
|
|
8931
|
-
"id": "hardis:project:configure:auth",
|
|
8932
|
-
"pluginAlias": "sfdx-hardis",
|
|
8933
|
-
"pluginName": "sfdx-hardis",
|
|
8934
|
-
"pluginType": "core",
|
|
8935
|
-
"strict": true,
|
|
8936
|
-
"enableJsonFlag": true,
|
|
8937
|
-
"title": "Configure authentication",
|
|
8938
|
-
"requiresProject": false,
|
|
8939
|
-
"requiresDependencies": [
|
|
8940
|
-
"openssl"
|
|
8941
|
-
],
|
|
8942
|
-
"isESM": true,
|
|
8943
|
-
"relativePath": [
|
|
8944
|
-
"lib",
|
|
8945
|
-
"commands",
|
|
8946
|
-
"hardis",
|
|
8947
|
-
"project",
|
|
8948
|
-
"configure",
|
|
8949
|
-
"auth.js"
|
|
8950
|
-
],
|
|
8951
|
-
"aliasPermutations": [],
|
|
8952
|
-
"permutations": [
|
|
8953
|
-
"hardis:project:configure:auth",
|
|
8954
|
-
"project:hardis:configure:auth",
|
|
8955
|
-
"project:configure:hardis:auth",
|
|
8956
|
-
"project:configure:auth:hardis",
|
|
8957
|
-
"hardis:configure:project:auth",
|
|
8958
|
-
"configure:hardis:project:auth",
|
|
8959
|
-
"configure:project:hardis:auth",
|
|
8960
|
-
"configure:project:auth:hardis",
|
|
8961
|
-
"hardis:configure:auth:project",
|
|
8962
|
-
"configure:hardis:auth:project",
|
|
8963
|
-
"configure:auth:hardis:project",
|
|
8964
|
-
"configure:auth:project:hardis",
|
|
8965
|
-
"hardis:project:auth:configure",
|
|
8966
|
-
"project:hardis:auth:configure",
|
|
8967
|
-
"project:auth:hardis:configure",
|
|
8968
|
-
"project:auth:configure:hardis",
|
|
8969
|
-
"hardis:auth:project:configure",
|
|
8970
|
-
"auth:hardis:project:configure",
|
|
8971
|
-
"auth:project:hardis:configure",
|
|
8972
|
-
"auth:project:configure:hardis",
|
|
8973
|
-
"hardis:auth:configure:project",
|
|
8974
|
-
"auth:hardis:configure:project",
|
|
8975
|
-
"auth:configure:hardis:project",
|
|
8976
|
-
"auth:configure:project:hardis"
|
|
8977
|
-
]
|
|
8978
|
-
},
|
|
8979
8857
|
"hardis:project:audit:apiversion": {
|
|
8980
8858
|
"aliases": [],
|
|
8981
8859
|
"args": {},
|
|
@@ -9389,12 +9267,12 @@
|
|
|
9389
9267
|
"remotesites:audit:project:hardis"
|
|
9390
9268
|
]
|
|
9391
9269
|
},
|
|
9392
|
-
"hardis:project:
|
|
9270
|
+
"hardis:project:configure:auth": {
|
|
9393
9271
|
"aliases": [],
|
|
9394
9272
|
"args": {},
|
|
9395
|
-
"description": "\n## Command Behavior\n\n**
|
|
9273
|
+
"description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n## Technical explanations\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
|
|
9396
9274
|
"examples": [
|
|
9397
|
-
"$ sf hardis:project:
|
|
9275
|
+
"$ sf hardis:project:configure:auth"
|
|
9398
9276
|
],
|
|
9399
9277
|
"flags": {
|
|
9400
9278
|
"json": {
|
|
@@ -9412,14 +9290,12 @@
|
|
|
9412
9290
|
"multiple": false,
|
|
9413
9291
|
"type": "option"
|
|
9414
9292
|
},
|
|
9415
|
-
"
|
|
9416
|
-
"char": "
|
|
9417
|
-
"description": "
|
|
9418
|
-
"name": "
|
|
9419
|
-
"
|
|
9420
|
-
"
|
|
9421
|
-
"multiple": true,
|
|
9422
|
-
"type": "option"
|
|
9293
|
+
"devhub": {
|
|
9294
|
+
"char": "b",
|
|
9295
|
+
"description": "Configure project DevHub",
|
|
9296
|
+
"name": "devhub",
|
|
9297
|
+
"allowNo": false,
|
|
9298
|
+
"type": "boolean"
|
|
9423
9299
|
},
|
|
9424
9300
|
"debug": {
|
|
9425
9301
|
"char": "d",
|
|
@@ -9435,25 +9311,53 @@
|
|
|
9435
9311
|
"multiple": false,
|
|
9436
9312
|
"type": "option"
|
|
9437
9313
|
},
|
|
9438
|
-
"skipauth": {
|
|
9439
|
-
"description": "Skip authentication check when a default username is required",
|
|
9440
|
-
"name": "skipauth",
|
|
9441
|
-
"allowNo": false,
|
|
9442
|
-
"type": "boolean"
|
|
9314
|
+
"skipauth": {
|
|
9315
|
+
"description": "Skip authentication check when a default username is required",
|
|
9316
|
+
"name": "skipauth",
|
|
9317
|
+
"allowNo": false,
|
|
9318
|
+
"type": "boolean"
|
|
9319
|
+
},
|
|
9320
|
+
"target-org": {
|
|
9321
|
+
"aliases": [
|
|
9322
|
+
"targetusername",
|
|
9323
|
+
"u"
|
|
9324
|
+
],
|
|
9325
|
+
"char": "o",
|
|
9326
|
+
"deprecateAliases": true,
|
|
9327
|
+
"name": "target-org",
|
|
9328
|
+
"noCacheDefault": true,
|
|
9329
|
+
"summary": "Username or alias of the target org.",
|
|
9330
|
+
"hasDynamicHelp": true,
|
|
9331
|
+
"multiple": false,
|
|
9332
|
+
"type": "option"
|
|
9333
|
+
},
|
|
9334
|
+
"target-dev-hub": {
|
|
9335
|
+
"aliases": [
|
|
9336
|
+
"targetdevhubusername"
|
|
9337
|
+
],
|
|
9338
|
+
"char": "v",
|
|
9339
|
+
"deprecateAliases": true,
|
|
9340
|
+
"name": "target-dev-hub",
|
|
9341
|
+
"noCacheDefault": true,
|
|
9342
|
+
"required": false,
|
|
9343
|
+
"summary": "Username or alias of the Dev Hub org.",
|
|
9344
|
+
"hasDynamicHelp": true,
|
|
9345
|
+
"multiple": false,
|
|
9346
|
+
"type": "option"
|
|
9443
9347
|
}
|
|
9444
9348
|
},
|
|
9445
|
-
"hasDynamicHelp":
|
|
9349
|
+
"hasDynamicHelp": true,
|
|
9446
9350
|
"hiddenAliases": [],
|
|
9447
|
-
"id": "hardis:project:
|
|
9351
|
+
"id": "hardis:project:configure:auth",
|
|
9448
9352
|
"pluginAlias": "sfdx-hardis",
|
|
9449
9353
|
"pluginName": "sfdx-hardis",
|
|
9450
9354
|
"pluginType": "core",
|
|
9451
9355
|
"strict": true,
|
|
9452
9356
|
"enableJsonFlag": true,
|
|
9453
|
-
"title": "
|
|
9454
|
-
"requiresProject":
|
|
9455
|
-
"
|
|
9456
|
-
"
|
|
9357
|
+
"title": "Configure authentication",
|
|
9358
|
+
"requiresProject": false,
|
|
9359
|
+
"requiresDependencies": [
|
|
9360
|
+
"openssl"
|
|
9457
9361
|
],
|
|
9458
9362
|
"isESM": true,
|
|
9459
9363
|
"relativePath": [
|
|
@@ -9461,35 +9365,35 @@
|
|
|
9461
9365
|
"commands",
|
|
9462
9366
|
"hardis",
|
|
9463
9367
|
"project",
|
|
9464
|
-
"
|
|
9465
|
-
"
|
|
9368
|
+
"configure",
|
|
9369
|
+
"auth.js"
|
|
9466
9370
|
],
|
|
9467
9371
|
"aliasPermutations": [],
|
|
9468
9372
|
"permutations": [
|
|
9469
|
-
"hardis:project:
|
|
9470
|
-
"project:hardis:
|
|
9471
|
-
"project:
|
|
9472
|
-
"project:
|
|
9473
|
-
"hardis:
|
|
9474
|
-
"
|
|
9475
|
-
"
|
|
9476
|
-
"
|
|
9477
|
-
"hardis:
|
|
9478
|
-
"
|
|
9479
|
-
"
|
|
9480
|
-
"
|
|
9481
|
-
"hardis:project:
|
|
9482
|
-
"project:hardis:
|
|
9483
|
-
"project:
|
|
9484
|
-
"project:
|
|
9485
|
-
"hardis:
|
|
9486
|
-
"
|
|
9487
|
-
"
|
|
9488
|
-
"
|
|
9489
|
-
"hardis:
|
|
9490
|
-
"
|
|
9491
|
-
"
|
|
9492
|
-
"
|
|
9373
|
+
"hardis:project:configure:auth",
|
|
9374
|
+
"project:hardis:configure:auth",
|
|
9375
|
+
"project:configure:hardis:auth",
|
|
9376
|
+
"project:configure:auth:hardis",
|
|
9377
|
+
"hardis:configure:project:auth",
|
|
9378
|
+
"configure:hardis:project:auth",
|
|
9379
|
+
"configure:project:hardis:auth",
|
|
9380
|
+
"configure:project:auth:hardis",
|
|
9381
|
+
"hardis:configure:auth:project",
|
|
9382
|
+
"configure:hardis:auth:project",
|
|
9383
|
+
"configure:auth:hardis:project",
|
|
9384
|
+
"configure:auth:project:hardis",
|
|
9385
|
+
"hardis:project:auth:configure",
|
|
9386
|
+
"project:hardis:auth:configure",
|
|
9387
|
+
"project:auth:hardis:configure",
|
|
9388
|
+
"project:auth:configure:hardis",
|
|
9389
|
+
"hardis:auth:project:configure",
|
|
9390
|
+
"auth:hardis:project:configure",
|
|
9391
|
+
"auth:project:hardis:configure",
|
|
9392
|
+
"auth:project:configure:hardis",
|
|
9393
|
+
"hardis:auth:configure:project",
|
|
9394
|
+
"auth:hardis:configure:project",
|
|
9395
|
+
"auth:configure:hardis:project",
|
|
9396
|
+
"auth:configure:project:hardis"
|
|
9493
9397
|
]
|
|
9494
9398
|
},
|
|
9495
9399
|
"hardis:project:clean:emptyitems": {
|
|
@@ -10977,127 +10881,12 @@
|
|
|
10977
10881
|
"xml:clean:project:hardis"
|
|
10978
10882
|
]
|
|
10979
10883
|
},
|
|
10980
|
-
"hardis:project:
|
|
10981
|
-
"aliases": [],
|
|
10982
|
-
"args": {},
|
|
10983
|
-
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n## Technical explanations\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n",
|
|
10984
|
-
"examples": [
|
|
10985
|
-
"$ sf hardis:project:fix:profiletabs"
|
|
10986
|
-
],
|
|
10987
|
-
"flags": {
|
|
10988
|
-
"json": {
|
|
10989
|
-
"description": "Format output as json.",
|
|
10990
|
-
"helpGroup": "GLOBAL",
|
|
10991
|
-
"name": "json",
|
|
10992
|
-
"allowNo": false,
|
|
10993
|
-
"type": "boolean"
|
|
10994
|
-
},
|
|
10995
|
-
"flags-dir": {
|
|
10996
|
-
"helpGroup": "GLOBAL",
|
|
10997
|
-
"name": "flags-dir",
|
|
10998
|
-
"summary": "Import flag values from a directory.",
|
|
10999
|
-
"hasDynamicHelp": false,
|
|
11000
|
-
"multiple": false,
|
|
11001
|
-
"type": "option"
|
|
11002
|
-
},
|
|
11003
|
-
"path": {
|
|
11004
|
-
"char": "p",
|
|
11005
|
-
"description": "Root folder",
|
|
11006
|
-
"name": "path",
|
|
11007
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
11008
|
-
"hasDynamicHelp": false,
|
|
11009
|
-
"multiple": false,
|
|
11010
|
-
"type": "option"
|
|
11011
|
-
},
|
|
11012
|
-
"debug": {
|
|
11013
|
-
"char": "d",
|
|
11014
|
-
"description": "Activate debug mode (more logs)",
|
|
11015
|
-
"name": "debug",
|
|
11016
|
-
"allowNo": false,
|
|
11017
|
-
"type": "boolean"
|
|
11018
|
-
},
|
|
11019
|
-
"websocket": {
|
|
11020
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11021
|
-
"name": "websocket",
|
|
11022
|
-
"hasDynamicHelp": false,
|
|
11023
|
-
"multiple": false,
|
|
11024
|
-
"type": "option"
|
|
11025
|
-
},
|
|
11026
|
-
"skipauth": {
|
|
11027
|
-
"description": "Skip authentication check when a default username is required",
|
|
11028
|
-
"name": "skipauth",
|
|
11029
|
-
"allowNo": false,
|
|
11030
|
-
"type": "boolean"
|
|
11031
|
-
},
|
|
11032
|
-
"target-org": {
|
|
11033
|
-
"aliases": [
|
|
11034
|
-
"targetusername",
|
|
11035
|
-
"u"
|
|
11036
|
-
],
|
|
11037
|
-
"char": "o",
|
|
11038
|
-
"deprecateAliases": true,
|
|
11039
|
-
"name": "target-org",
|
|
11040
|
-
"noCacheDefault": true,
|
|
11041
|
-
"required": true,
|
|
11042
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
11043
|
-
"hasDynamicHelp": true,
|
|
11044
|
-
"multiple": false,
|
|
11045
|
-
"type": "option"
|
|
11046
|
-
}
|
|
11047
|
-
},
|
|
11048
|
-
"hasDynamicHelp": true,
|
|
11049
|
-
"hiddenAliases": [],
|
|
11050
|
-
"id": "hardis:project:fix:profiletabs",
|
|
11051
|
-
"pluginAlias": "sfdx-hardis",
|
|
11052
|
-
"pluginName": "sfdx-hardis",
|
|
11053
|
-
"pluginType": "core",
|
|
11054
|
-
"strict": true,
|
|
11055
|
-
"enableJsonFlag": true,
|
|
11056
|
-
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
11057
|
-
"requiresProject": true,
|
|
11058
|
-
"isESM": true,
|
|
11059
|
-
"relativePath": [
|
|
11060
|
-
"lib",
|
|
11061
|
-
"commands",
|
|
11062
|
-
"hardis",
|
|
11063
|
-
"project",
|
|
11064
|
-
"fix",
|
|
11065
|
-
"profiletabs.js"
|
|
11066
|
-
],
|
|
11067
|
-
"aliasPermutations": [],
|
|
11068
|
-
"permutations": [
|
|
11069
|
-
"hardis:project:fix:profiletabs",
|
|
11070
|
-
"project:hardis:fix:profiletabs",
|
|
11071
|
-
"project:fix:hardis:profiletabs",
|
|
11072
|
-
"project:fix:profiletabs:hardis",
|
|
11073
|
-
"hardis:fix:project:profiletabs",
|
|
11074
|
-
"fix:hardis:project:profiletabs",
|
|
11075
|
-
"fix:project:hardis:profiletabs",
|
|
11076
|
-
"fix:project:profiletabs:hardis",
|
|
11077
|
-
"hardis:fix:profiletabs:project",
|
|
11078
|
-
"fix:hardis:profiletabs:project",
|
|
11079
|
-
"fix:profiletabs:hardis:project",
|
|
11080
|
-
"fix:profiletabs:project:hardis",
|
|
11081
|
-
"hardis:project:profiletabs:fix",
|
|
11082
|
-
"project:hardis:profiletabs:fix",
|
|
11083
|
-
"project:profiletabs:hardis:fix",
|
|
11084
|
-
"project:profiletabs:fix:hardis",
|
|
11085
|
-
"hardis:profiletabs:project:fix",
|
|
11086
|
-
"profiletabs:hardis:project:fix",
|
|
11087
|
-
"profiletabs:project:hardis:fix",
|
|
11088
|
-
"profiletabs:project:fix:hardis",
|
|
11089
|
-
"hardis:profiletabs:fix:project",
|
|
11090
|
-
"profiletabs:hardis:fix:project",
|
|
11091
|
-
"profiletabs:fix:hardis:project",
|
|
11092
|
-
"profiletabs:fix:project:hardis"
|
|
11093
|
-
]
|
|
11094
|
-
},
|
|
11095
|
-
"hardis:project:fix:v53flexipages": {
|
|
10884
|
+
"hardis:project:convert:profilestopermsets": {
|
|
11096
10885
|
"aliases": [],
|
|
11097
10886
|
"args": {},
|
|
11098
|
-
"description": "\n## Command Behavior\n\n**
|
|
10887
|
+
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n## Technical explanations\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n",
|
|
11099
10888
|
"examples": [
|
|
11100
|
-
"$ sf hardis:project:
|
|
10889
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
11101
10890
|
],
|
|
11102
10891
|
"flags": {
|
|
11103
10892
|
"json": {
|
|
@@ -11115,13 +10904,13 @@
|
|
|
11115
10904
|
"multiple": false,
|
|
11116
10905
|
"type": "option"
|
|
11117
10906
|
},
|
|
11118
|
-
"
|
|
11119
|
-
"char": "
|
|
11120
|
-
"description": "
|
|
11121
|
-
"name": "
|
|
11122
|
-
"default":
|
|
10907
|
+
"except": {
|
|
10908
|
+
"char": "e",
|
|
10909
|
+
"description": "List of filters",
|
|
10910
|
+
"name": "except",
|
|
10911
|
+
"default": [],
|
|
11123
10912
|
"hasDynamicHelp": false,
|
|
11124
|
-
"multiple":
|
|
10913
|
+
"multiple": true,
|
|
11125
10914
|
"type": "option"
|
|
11126
10915
|
},
|
|
11127
10916
|
"debug": {
|
|
@@ -11147,49 +10936,52 @@
|
|
|
11147
10936
|
},
|
|
11148
10937
|
"hasDynamicHelp": false,
|
|
11149
10938
|
"hiddenAliases": [],
|
|
11150
|
-
"id": "hardis:project:
|
|
10939
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
11151
10940
|
"pluginAlias": "sfdx-hardis",
|
|
11152
10941
|
"pluginName": "sfdx-hardis",
|
|
11153
10942
|
"pluginType": "core",
|
|
11154
10943
|
"strict": true,
|
|
11155
|
-
"enableJsonFlag": true,
|
|
11156
|
-
"title": "
|
|
11157
|
-
"requiresProject": true,
|
|
11158
|
-
"
|
|
11159
|
-
|
|
11160
|
-
|
|
11161
|
-
|
|
11162
|
-
|
|
11163
|
-
"
|
|
11164
|
-
"
|
|
11165
|
-
"
|
|
11166
|
-
|
|
11167
|
-
|
|
11168
|
-
|
|
11169
|
-
|
|
11170
|
-
|
|
11171
|
-
|
|
11172
|
-
"project:
|
|
11173
|
-
"hardis:
|
|
11174
|
-
"
|
|
11175
|
-
"
|
|
11176
|
-
"
|
|
11177
|
-
"hardis:
|
|
11178
|
-
"
|
|
11179
|
-
"
|
|
11180
|
-
"
|
|
11181
|
-
"hardis:project
|
|
11182
|
-
"
|
|
11183
|
-
"project:
|
|
11184
|
-
"project:
|
|
11185
|
-
"hardis:
|
|
11186
|
-
"
|
|
11187
|
-
"
|
|
11188
|
-
"
|
|
11189
|
-
"hardis:
|
|
11190
|
-
"
|
|
11191
|
-
"
|
|
11192
|
-
"
|
|
10944
|
+
"enableJsonFlag": true,
|
|
10945
|
+
"title": "Convert Profiles into Permission Sets",
|
|
10946
|
+
"requiresProject": true,
|
|
10947
|
+
"requiresSfdxPlugins": [
|
|
10948
|
+
"shane-sfdx-plugins"
|
|
10949
|
+
],
|
|
10950
|
+
"isESM": true,
|
|
10951
|
+
"relativePath": [
|
|
10952
|
+
"lib",
|
|
10953
|
+
"commands",
|
|
10954
|
+
"hardis",
|
|
10955
|
+
"project",
|
|
10956
|
+
"convert",
|
|
10957
|
+
"profilestopermsets.js"
|
|
10958
|
+
],
|
|
10959
|
+
"aliasPermutations": [],
|
|
10960
|
+
"permutations": [
|
|
10961
|
+
"hardis:project:convert:profilestopermsets",
|
|
10962
|
+
"project:hardis:convert:profilestopermsets",
|
|
10963
|
+
"project:convert:hardis:profilestopermsets",
|
|
10964
|
+
"project:convert:profilestopermsets:hardis",
|
|
10965
|
+
"hardis:convert:project:profilestopermsets",
|
|
10966
|
+
"convert:hardis:project:profilestopermsets",
|
|
10967
|
+
"convert:project:hardis:profilestopermsets",
|
|
10968
|
+
"convert:project:profilestopermsets:hardis",
|
|
10969
|
+
"hardis:convert:profilestopermsets:project",
|
|
10970
|
+
"convert:hardis:profilestopermsets:project",
|
|
10971
|
+
"convert:profilestopermsets:hardis:project",
|
|
10972
|
+
"convert:profilestopermsets:project:hardis",
|
|
10973
|
+
"hardis:project:profilestopermsets:convert",
|
|
10974
|
+
"project:hardis:profilestopermsets:convert",
|
|
10975
|
+
"project:profilestopermsets:hardis:convert",
|
|
10976
|
+
"project:profilestopermsets:convert:hardis",
|
|
10977
|
+
"hardis:profilestopermsets:project:convert",
|
|
10978
|
+
"profilestopermsets:hardis:project:convert",
|
|
10979
|
+
"profilestopermsets:project:hardis:convert",
|
|
10980
|
+
"profilestopermsets:project:convert:hardis",
|
|
10981
|
+
"hardis:profilestopermsets:convert:project",
|
|
10982
|
+
"profilestopermsets:hardis:convert:project",
|
|
10983
|
+
"profilestopermsets:convert:hardis:project",
|
|
10984
|
+
"profilestopermsets:convert:project:hardis"
|
|
11193
10985
|
]
|
|
11194
10986
|
},
|
|
11195
10987
|
"hardis:project:deploy:notify": {
|
|
@@ -12367,6 +12159,221 @@
|
|
|
12367
12159
|
"validate:deploy:project:hardis"
|
|
12368
12160
|
]
|
|
12369
12161
|
},
|
|
12162
|
+
"hardis:project:fix:profiletabs": {
|
|
12163
|
+
"aliases": [],
|
|
12164
|
+
"args": {},
|
|
12165
|
+
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n## Technical explanations\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n",
|
|
12166
|
+
"examples": [
|
|
12167
|
+
"$ sf hardis:project:fix:profiletabs"
|
|
12168
|
+
],
|
|
12169
|
+
"flags": {
|
|
12170
|
+
"json": {
|
|
12171
|
+
"description": "Format output as json.",
|
|
12172
|
+
"helpGroup": "GLOBAL",
|
|
12173
|
+
"name": "json",
|
|
12174
|
+
"allowNo": false,
|
|
12175
|
+
"type": "boolean"
|
|
12176
|
+
},
|
|
12177
|
+
"flags-dir": {
|
|
12178
|
+
"helpGroup": "GLOBAL",
|
|
12179
|
+
"name": "flags-dir",
|
|
12180
|
+
"summary": "Import flag values from a directory.",
|
|
12181
|
+
"hasDynamicHelp": false,
|
|
12182
|
+
"multiple": false,
|
|
12183
|
+
"type": "option"
|
|
12184
|
+
},
|
|
12185
|
+
"path": {
|
|
12186
|
+
"char": "p",
|
|
12187
|
+
"description": "Root folder",
|
|
12188
|
+
"name": "path",
|
|
12189
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12190
|
+
"hasDynamicHelp": false,
|
|
12191
|
+
"multiple": false,
|
|
12192
|
+
"type": "option"
|
|
12193
|
+
},
|
|
12194
|
+
"debug": {
|
|
12195
|
+
"char": "d",
|
|
12196
|
+
"description": "Activate debug mode (more logs)",
|
|
12197
|
+
"name": "debug",
|
|
12198
|
+
"allowNo": false,
|
|
12199
|
+
"type": "boolean"
|
|
12200
|
+
},
|
|
12201
|
+
"websocket": {
|
|
12202
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12203
|
+
"name": "websocket",
|
|
12204
|
+
"hasDynamicHelp": false,
|
|
12205
|
+
"multiple": false,
|
|
12206
|
+
"type": "option"
|
|
12207
|
+
},
|
|
12208
|
+
"skipauth": {
|
|
12209
|
+
"description": "Skip authentication check when a default username is required",
|
|
12210
|
+
"name": "skipauth",
|
|
12211
|
+
"allowNo": false,
|
|
12212
|
+
"type": "boolean"
|
|
12213
|
+
},
|
|
12214
|
+
"target-org": {
|
|
12215
|
+
"aliases": [
|
|
12216
|
+
"targetusername",
|
|
12217
|
+
"u"
|
|
12218
|
+
],
|
|
12219
|
+
"char": "o",
|
|
12220
|
+
"deprecateAliases": true,
|
|
12221
|
+
"name": "target-org",
|
|
12222
|
+
"noCacheDefault": true,
|
|
12223
|
+
"required": true,
|
|
12224
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
12225
|
+
"hasDynamicHelp": true,
|
|
12226
|
+
"multiple": false,
|
|
12227
|
+
"type": "option"
|
|
12228
|
+
}
|
|
12229
|
+
},
|
|
12230
|
+
"hasDynamicHelp": true,
|
|
12231
|
+
"hiddenAliases": [],
|
|
12232
|
+
"id": "hardis:project:fix:profiletabs",
|
|
12233
|
+
"pluginAlias": "sfdx-hardis",
|
|
12234
|
+
"pluginName": "sfdx-hardis",
|
|
12235
|
+
"pluginType": "core",
|
|
12236
|
+
"strict": true,
|
|
12237
|
+
"enableJsonFlag": true,
|
|
12238
|
+
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
12239
|
+
"requiresProject": true,
|
|
12240
|
+
"isESM": true,
|
|
12241
|
+
"relativePath": [
|
|
12242
|
+
"lib",
|
|
12243
|
+
"commands",
|
|
12244
|
+
"hardis",
|
|
12245
|
+
"project",
|
|
12246
|
+
"fix",
|
|
12247
|
+
"profiletabs.js"
|
|
12248
|
+
],
|
|
12249
|
+
"aliasPermutations": [],
|
|
12250
|
+
"permutations": [
|
|
12251
|
+
"hardis:project:fix:profiletabs",
|
|
12252
|
+
"project:hardis:fix:profiletabs",
|
|
12253
|
+
"project:fix:hardis:profiletabs",
|
|
12254
|
+
"project:fix:profiletabs:hardis",
|
|
12255
|
+
"hardis:fix:project:profiletabs",
|
|
12256
|
+
"fix:hardis:project:profiletabs",
|
|
12257
|
+
"fix:project:hardis:profiletabs",
|
|
12258
|
+
"fix:project:profiletabs:hardis",
|
|
12259
|
+
"hardis:fix:profiletabs:project",
|
|
12260
|
+
"fix:hardis:profiletabs:project",
|
|
12261
|
+
"fix:profiletabs:hardis:project",
|
|
12262
|
+
"fix:profiletabs:project:hardis",
|
|
12263
|
+
"hardis:project:profiletabs:fix",
|
|
12264
|
+
"project:hardis:profiletabs:fix",
|
|
12265
|
+
"project:profiletabs:hardis:fix",
|
|
12266
|
+
"project:profiletabs:fix:hardis",
|
|
12267
|
+
"hardis:profiletabs:project:fix",
|
|
12268
|
+
"profiletabs:hardis:project:fix",
|
|
12269
|
+
"profiletabs:project:hardis:fix",
|
|
12270
|
+
"profiletabs:project:fix:hardis",
|
|
12271
|
+
"hardis:profiletabs:fix:project",
|
|
12272
|
+
"profiletabs:hardis:fix:project",
|
|
12273
|
+
"profiletabs:fix:hardis:project",
|
|
12274
|
+
"profiletabs:fix:project:hardis"
|
|
12275
|
+
]
|
|
12276
|
+
},
|
|
12277
|
+
"hardis:project:fix:v53flexipages": {
|
|
12278
|
+
"aliases": [],
|
|
12279
|
+
"args": {},
|
|
12280
|
+
"description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n## Technical explanations\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n",
|
|
12281
|
+
"examples": [
|
|
12282
|
+
"$ sf hardis:project:fix:v53flexipages"
|
|
12283
|
+
],
|
|
12284
|
+
"flags": {
|
|
12285
|
+
"json": {
|
|
12286
|
+
"description": "Format output as json.",
|
|
12287
|
+
"helpGroup": "GLOBAL",
|
|
12288
|
+
"name": "json",
|
|
12289
|
+
"allowNo": false,
|
|
12290
|
+
"type": "boolean"
|
|
12291
|
+
},
|
|
12292
|
+
"flags-dir": {
|
|
12293
|
+
"helpGroup": "GLOBAL",
|
|
12294
|
+
"name": "flags-dir",
|
|
12295
|
+
"summary": "Import flag values from a directory.",
|
|
12296
|
+
"hasDynamicHelp": false,
|
|
12297
|
+
"multiple": false,
|
|
12298
|
+
"type": "option"
|
|
12299
|
+
},
|
|
12300
|
+
"path": {
|
|
12301
|
+
"char": "p",
|
|
12302
|
+
"description": "Root folder",
|
|
12303
|
+
"name": "path",
|
|
12304
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12305
|
+
"hasDynamicHelp": false,
|
|
12306
|
+
"multiple": false,
|
|
12307
|
+
"type": "option"
|
|
12308
|
+
},
|
|
12309
|
+
"debug": {
|
|
12310
|
+
"char": "d",
|
|
12311
|
+
"description": "Activate debug mode (more logs)",
|
|
12312
|
+
"name": "debug",
|
|
12313
|
+
"allowNo": false,
|
|
12314
|
+
"type": "boolean"
|
|
12315
|
+
},
|
|
12316
|
+
"websocket": {
|
|
12317
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12318
|
+
"name": "websocket",
|
|
12319
|
+
"hasDynamicHelp": false,
|
|
12320
|
+
"multiple": false,
|
|
12321
|
+
"type": "option"
|
|
12322
|
+
},
|
|
12323
|
+
"skipauth": {
|
|
12324
|
+
"description": "Skip authentication check when a default username is required",
|
|
12325
|
+
"name": "skipauth",
|
|
12326
|
+
"allowNo": false,
|
|
12327
|
+
"type": "boolean"
|
|
12328
|
+
}
|
|
12329
|
+
},
|
|
12330
|
+
"hasDynamicHelp": false,
|
|
12331
|
+
"hiddenAliases": [],
|
|
12332
|
+
"id": "hardis:project:fix:v53flexipages",
|
|
12333
|
+
"pluginAlias": "sfdx-hardis",
|
|
12334
|
+
"pluginName": "sfdx-hardis",
|
|
12335
|
+
"pluginType": "core",
|
|
12336
|
+
"strict": true,
|
|
12337
|
+
"enableJsonFlag": true,
|
|
12338
|
+
"title": "Fix flexipages for v53",
|
|
12339
|
+
"requiresProject": true,
|
|
12340
|
+
"isESM": true,
|
|
12341
|
+
"relativePath": [
|
|
12342
|
+
"lib",
|
|
12343
|
+
"commands",
|
|
12344
|
+
"hardis",
|
|
12345
|
+
"project",
|
|
12346
|
+
"fix",
|
|
12347
|
+
"v53flexipages.js"
|
|
12348
|
+
],
|
|
12349
|
+
"aliasPermutations": [],
|
|
12350
|
+
"permutations": [
|
|
12351
|
+
"hardis:project:fix:v53flexipages",
|
|
12352
|
+
"project:hardis:fix:v53flexipages",
|
|
12353
|
+
"project:fix:hardis:v53flexipages",
|
|
12354
|
+
"project:fix:v53flexipages:hardis",
|
|
12355
|
+
"hardis:fix:project:v53flexipages",
|
|
12356
|
+
"fix:hardis:project:v53flexipages",
|
|
12357
|
+
"fix:project:hardis:v53flexipages",
|
|
12358
|
+
"fix:project:v53flexipages:hardis",
|
|
12359
|
+
"hardis:fix:v53flexipages:project",
|
|
12360
|
+
"fix:hardis:v53flexipages:project",
|
|
12361
|
+
"fix:v53flexipages:hardis:project",
|
|
12362
|
+
"fix:v53flexipages:project:hardis",
|
|
12363
|
+
"hardis:project:v53flexipages:fix",
|
|
12364
|
+
"project:hardis:v53flexipages:fix",
|
|
12365
|
+
"project:v53flexipages:hardis:fix",
|
|
12366
|
+
"project:v53flexipages:fix:hardis",
|
|
12367
|
+
"hardis:v53flexipages:project:fix",
|
|
12368
|
+
"v53flexipages:hardis:project:fix",
|
|
12369
|
+
"v53flexipages:project:hardis:fix",
|
|
12370
|
+
"v53flexipages:project:fix:hardis",
|
|
12371
|
+
"hardis:v53flexipages:fix:project",
|
|
12372
|
+
"v53flexipages:hardis:fix:project",
|
|
12373
|
+
"v53flexipages:fix:hardis:project",
|
|
12374
|
+
"v53flexipages:fix:project:hardis"
|
|
12375
|
+
]
|
|
12376
|
+
},
|
|
12370
12377
|
"hardis:project:generate:bypass": {
|
|
12371
12378
|
"aliases": [],
|
|
12372
12379
|
"args": {},
|
|
@@ -14849,5 +14856,5 @@
|
|
|
14849
14856
|
]
|
|
14850
14857
|
}
|
|
14851
14858
|
},
|
|
14852
|
-
"version": "6.0.
|
|
14859
|
+
"version": "6.0.4-beta202508121754.0"
|
|
14853
14860
|
}
|