sfdx-hardis 6.1.0 → 6.1.1-beta202508240003.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 +4 -0
- package/README.md +24 -7
- package/lib/common/utils/authUtils.d.ts +1 -0
- package/lib/common/utils/authUtils.js +78 -39
- package/lib/common/utils/authUtils.js.map +1 -1
- package/lib/common/utils/index.d.ts +1 -0
- package/lib/common/utils/index.js +17 -0
- package/lib/common/utils/index.js.map +1 -1
- package/lib/common/utils/orgUtils.js +6 -1
- package/lib/common/utils/orgUtils.js.map +1 -1
- package/lib/common/websocketClient.d.ts +3 -0
- package/lib/common/websocketClient.js +20 -1
- package/lib/common/websocketClient.js.map +1 -1
- package/lib/hooks/init/start-ws-client.js +1 -0
- package/lib/hooks/init/start-ws-client.js.map +1 -1
- package/oclif.manifest.json +853 -853
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -57,13 +57,12 @@
|
|
|
57
57
|
"world:hello"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
|
-
"hardis:
|
|
60
|
+
"hardis:cache:clear": {
|
|
61
61
|
"aliases": [],
|
|
62
62
|
"args": {},
|
|
63
|
-
"description": "\n## Command Behavior\n\n**
|
|
63
|
+
"description": "\n## Command Behavior\n\n**Clears the local cache generated by the sfdx-hardis plugin.**\n\nThis command is designed to remove temporary files, stored configurations, and other cached data that sfdx-hardis uses to optimize its operations. Clearing the cache can be beneficial for:\n\n- **Troubleshooting:** Resolving unexpected behavior or inconsistencies.\n- **Disk Space Management:** Freeing up storage on your local machine.\n- **Ensuring Fresh Data:** Guaranteeing that the plugin operates with the most current data and configurations.\n\n## Technical explanations\n\nThe command's technical implementation is straightforward:\n\n- **Direct Function Call:** It directly invokes the `clearCache()` function, which is imported from \buri../../../common/cache/index.js\buri.\n- **Cache Management Logic:** The \buriclearCache()` function encapsulates the logic for identifying and removing the specific files and directories that constitute the sfdx-hardis cache.\n",
|
|
64
64
|
"examples": [
|
|
65
|
-
"$ sf hardis:
|
|
66
|
-
"CI=true sf hardis:auth:login"
|
|
65
|
+
"$ sf hardis:cache:clear"
|
|
67
66
|
],
|
|
68
67
|
"flags": {
|
|
69
68
|
"json": {
|
|
@@ -81,28 +80,6 @@
|
|
|
81
80
|
"multiple": false,
|
|
82
81
|
"type": "option"
|
|
83
82
|
},
|
|
84
|
-
"instanceurl": {
|
|
85
|
-
"char": "r",
|
|
86
|
-
"description": "URL of org instance",
|
|
87
|
-
"name": "instanceurl",
|
|
88
|
-
"hasDynamicHelp": false,
|
|
89
|
-
"multiple": false,
|
|
90
|
-
"type": "option"
|
|
91
|
-
},
|
|
92
|
-
"devhub": {
|
|
93
|
-
"char": "h",
|
|
94
|
-
"description": "Also connect associated DevHub",
|
|
95
|
-
"name": "devhub",
|
|
96
|
-
"allowNo": false,
|
|
97
|
-
"type": "boolean"
|
|
98
|
-
},
|
|
99
|
-
"scratchorg": {
|
|
100
|
-
"char": "s",
|
|
101
|
-
"description": "Scratch org",
|
|
102
|
-
"name": "scratchorg",
|
|
103
|
-
"allowNo": false,
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
},
|
|
106
83
|
"debug": {
|
|
107
84
|
"char": "d",
|
|
108
85
|
"description": "Activate debug mode (more logs)",
|
|
@@ -126,38 +103,41 @@
|
|
|
126
103
|
},
|
|
127
104
|
"hasDynamicHelp": false,
|
|
128
105
|
"hiddenAliases": [],
|
|
129
|
-
"id": "hardis:
|
|
106
|
+
"id": "hardis:cache:clear",
|
|
130
107
|
"pluginAlias": "sfdx-hardis",
|
|
131
108
|
"pluginName": "sfdx-hardis",
|
|
132
109
|
"pluginType": "core",
|
|
133
110
|
"strict": true,
|
|
134
111
|
"enableJsonFlag": true,
|
|
135
|
-
"title": "
|
|
112
|
+
"title": "Clear sfdx-hardis cache",
|
|
113
|
+
"uiConfig": {
|
|
114
|
+
"hide": true
|
|
115
|
+
},
|
|
136
116
|
"requiresProject": false,
|
|
137
117
|
"isESM": true,
|
|
138
118
|
"relativePath": [
|
|
139
119
|
"lib",
|
|
140
120
|
"commands",
|
|
141
121
|
"hardis",
|
|
142
|
-
"
|
|
143
|
-
"
|
|
122
|
+
"cache",
|
|
123
|
+
"clear.js"
|
|
144
124
|
],
|
|
145
125
|
"aliasPermutations": [],
|
|
146
126
|
"permutations": [
|
|
147
|
-
"hardis:
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"hardis:
|
|
151
|
-
"
|
|
152
|
-
"
|
|
127
|
+
"hardis:cache:clear",
|
|
128
|
+
"cache:hardis:clear",
|
|
129
|
+
"cache:clear:hardis",
|
|
130
|
+
"hardis:clear:cache",
|
|
131
|
+
"clear:hardis:cache",
|
|
132
|
+
"clear:cache:hardis"
|
|
153
133
|
]
|
|
154
134
|
},
|
|
155
|
-
"hardis:
|
|
135
|
+
"hardis:config:get": {
|
|
156
136
|
"aliases": [],
|
|
157
137
|
"args": {},
|
|
158
|
-
"description": "\n## Command Behavior\n\n**
|
|
138
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the sfdx-hardis configuration for a specified level.**\n\nThis command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.\n\n- **Configuration levels:** It can retrieve configuration from three different levels:\n - **Project:** The configuration defined in the project's `.sfdx-hardis.yml` file.\n - **Branch:** The configuration defined in a branch-specific configuration file (e.g., `.sfdx-hardis.production.yml`).\n - **User:** The global user-level configuration.\n\n## Technical explanations\n\nThe command's logic is straightforward:\n\n- **`getConfig` function:** It calls the `getConfig` utility function, passing the desired configuration level as an argument.\n- **Configuration loading:** The `getConfig` function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON.\n- **Output:** The retrieved configuration is then displayed to the user as a JSON string.\n",
|
|
159
139
|
"examples": [
|
|
160
|
-
"$ sf hardis:
|
|
140
|
+
"$ sf hardis:project:deploy:sources:metadata"
|
|
161
141
|
],
|
|
162
142
|
"flags": {
|
|
163
143
|
"json": {
|
|
@@ -175,6 +155,20 @@
|
|
|
175
155
|
"multiple": false,
|
|
176
156
|
"type": "option"
|
|
177
157
|
},
|
|
158
|
+
"level": {
|
|
159
|
+
"char": "l",
|
|
160
|
+
"description": "project,branch or user",
|
|
161
|
+
"name": "level",
|
|
162
|
+
"default": "project",
|
|
163
|
+
"hasDynamicHelp": false,
|
|
164
|
+
"multiple": false,
|
|
165
|
+
"options": [
|
|
166
|
+
"project",
|
|
167
|
+
"branch",
|
|
168
|
+
"user"
|
|
169
|
+
],
|
|
170
|
+
"type": "option"
|
|
171
|
+
},
|
|
178
172
|
"debug": {
|
|
179
173
|
"char": "d",
|
|
180
174
|
"description": "Activate debug mode (more logs)",
|
|
@@ -198,41 +192,39 @@
|
|
|
198
192
|
},
|
|
199
193
|
"hasDynamicHelp": false,
|
|
200
194
|
"hiddenAliases": [],
|
|
201
|
-
"id": "hardis:
|
|
195
|
+
"id": "hardis:config:get",
|
|
202
196
|
"pluginAlias": "sfdx-hardis",
|
|
203
197
|
"pluginName": "sfdx-hardis",
|
|
204
198
|
"pluginType": "core",
|
|
205
199
|
"strict": true,
|
|
206
200
|
"enableJsonFlag": true,
|
|
207
|
-
"title": "
|
|
208
|
-
"uiConfig": {
|
|
209
|
-
"hide": true
|
|
210
|
-
},
|
|
201
|
+
"title": "Deploy metadata sources to org",
|
|
211
202
|
"requiresProject": false,
|
|
212
203
|
"isESM": true,
|
|
213
204
|
"relativePath": [
|
|
214
205
|
"lib",
|
|
215
206
|
"commands",
|
|
216
207
|
"hardis",
|
|
217
|
-
"
|
|
218
|
-
"
|
|
208
|
+
"config",
|
|
209
|
+
"get.js"
|
|
219
210
|
],
|
|
220
211
|
"aliasPermutations": [],
|
|
221
212
|
"permutations": [
|
|
222
|
-
"hardis:
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"hardis:
|
|
226
|
-
"
|
|
227
|
-
"
|
|
213
|
+
"hardis:config:get",
|
|
214
|
+
"config:hardis:get",
|
|
215
|
+
"config:get:hardis",
|
|
216
|
+
"hardis:get:config",
|
|
217
|
+
"get:hardis:config",
|
|
218
|
+
"get:config:hardis"
|
|
228
219
|
]
|
|
229
220
|
},
|
|
230
|
-
"hardis:
|
|
221
|
+
"hardis:auth:login": {
|
|
231
222
|
"aliases": [],
|
|
232
223
|
"args": {},
|
|
233
|
-
"description": "\n## Command Behavior\n\n**
|
|
224
|
+
"description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n</details>\n",
|
|
234
225
|
"examples": [
|
|
235
|
-
"$ sf hardis:
|
|
226
|
+
"$ sf hardis:auth:login",
|
|
227
|
+
"CI=true sf hardis:auth:login"
|
|
236
228
|
],
|
|
237
229
|
"flags": {
|
|
238
230
|
"json": {
|
|
@@ -250,20 +242,28 @@
|
|
|
250
242
|
"multiple": false,
|
|
251
243
|
"type": "option"
|
|
252
244
|
},
|
|
253
|
-
"
|
|
254
|
-
"char": "
|
|
255
|
-
"description": "
|
|
256
|
-
"name": "
|
|
257
|
-
"default": "project",
|
|
245
|
+
"instanceurl": {
|
|
246
|
+
"char": "r",
|
|
247
|
+
"description": "URL of org instance",
|
|
248
|
+
"name": "instanceurl",
|
|
258
249
|
"hasDynamicHelp": false,
|
|
259
250
|
"multiple": false,
|
|
260
|
-
"options": [
|
|
261
|
-
"project",
|
|
262
|
-
"branch",
|
|
263
|
-
"user"
|
|
264
|
-
],
|
|
265
251
|
"type": "option"
|
|
266
252
|
},
|
|
253
|
+
"devhub": {
|
|
254
|
+
"char": "h",
|
|
255
|
+
"description": "Also connect associated DevHub",
|
|
256
|
+
"name": "devhub",
|
|
257
|
+
"allowNo": false,
|
|
258
|
+
"type": "boolean"
|
|
259
|
+
},
|
|
260
|
+
"scratchorg": {
|
|
261
|
+
"char": "s",
|
|
262
|
+
"description": "Scratch org",
|
|
263
|
+
"name": "scratchorg",
|
|
264
|
+
"allowNo": false,
|
|
265
|
+
"type": "boolean"
|
|
266
|
+
},
|
|
267
267
|
"debug": {
|
|
268
268
|
"char": "d",
|
|
269
269
|
"description": "Activate debug mode (more logs)",
|
|
@@ -287,30 +287,30 @@
|
|
|
287
287
|
},
|
|
288
288
|
"hasDynamicHelp": false,
|
|
289
289
|
"hiddenAliases": [],
|
|
290
|
-
"id": "hardis:
|
|
290
|
+
"id": "hardis:auth:login",
|
|
291
291
|
"pluginAlias": "sfdx-hardis",
|
|
292
292
|
"pluginName": "sfdx-hardis",
|
|
293
293
|
"pluginType": "core",
|
|
294
294
|
"strict": true,
|
|
295
295
|
"enableJsonFlag": true,
|
|
296
|
-
"title": "
|
|
296
|
+
"title": "Login",
|
|
297
297
|
"requiresProject": false,
|
|
298
298
|
"isESM": true,
|
|
299
299
|
"relativePath": [
|
|
300
300
|
"lib",
|
|
301
301
|
"commands",
|
|
302
302
|
"hardis",
|
|
303
|
-
"
|
|
304
|
-
"
|
|
303
|
+
"auth",
|
|
304
|
+
"login.js"
|
|
305
305
|
],
|
|
306
306
|
"aliasPermutations": [],
|
|
307
307
|
"permutations": [
|
|
308
|
-
"hardis:
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"hardis:
|
|
312
|
-
"
|
|
313
|
-
"
|
|
308
|
+
"hardis:auth:login",
|
|
309
|
+
"auth:hardis:login",
|
|
310
|
+
"auth:login:hardis",
|
|
311
|
+
"hardis:login:auth",
|
|
312
|
+
"login:hardis:auth",
|
|
313
|
+
"login:auth:hardis"
|
|
314
314
|
]
|
|
315
315
|
},
|
|
316
316
|
"hardis:doc:fieldusage": {
|
|
@@ -5489,15 +5489,12 @@
|
|
|
5489
5489
|
"import:data:org:hardis"
|
|
5490
5490
|
]
|
|
5491
5491
|
},
|
|
5492
|
-
"hardis:org:
|
|
5492
|
+
"hardis:org:files:export": {
|
|
5493
5493
|
"aliases": [],
|
|
5494
5494
|
"args": {},
|
|
5495
|
-
"description": "
|
|
5495
|
+
"description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, and output naming conventions.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project and `promptFilesExportConfiguration` for customizing export options.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues or API limits.\n</details>\n",
|
|
5496
5496
|
"examples": [
|
|
5497
|
-
"$ sf hardis:org:
|
|
5498
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5499
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5500
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5497
|
+
"$ sf hardis:org:files:export"
|
|
5501
5498
|
],
|
|
5502
5499
|
"flags": {
|
|
5503
5500
|
"json": {
|
|
@@ -5515,26 +5512,37 @@
|
|
|
5515
5512
|
"multiple": false,
|
|
5516
5513
|
"type": "option"
|
|
5517
5514
|
},
|
|
5518
|
-
"
|
|
5519
|
-
"char": "
|
|
5520
|
-
"description": "
|
|
5521
|
-
"name": "
|
|
5515
|
+
"path": {
|
|
5516
|
+
"char": "p",
|
|
5517
|
+
"description": "Path to the file export project",
|
|
5518
|
+
"name": "path",
|
|
5522
5519
|
"hasDynamicHelp": false,
|
|
5523
5520
|
"multiple": false,
|
|
5524
5521
|
"type": "option"
|
|
5525
5522
|
},
|
|
5526
|
-
"
|
|
5523
|
+
"chunksize": {
|
|
5524
|
+
"char": "c",
|
|
5525
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
5526
|
+
"name": "chunksize",
|
|
5527
|
+
"default": 1000,
|
|
5528
|
+
"hasDynamicHelp": false,
|
|
5529
|
+
"multiple": false,
|
|
5530
|
+
"type": "option"
|
|
5531
|
+
},
|
|
5532
|
+
"polltimeout": {
|
|
5527
5533
|
"char": "t",
|
|
5528
|
-
"description": "
|
|
5529
|
-
"name": "
|
|
5534
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
5535
|
+
"name": "polltimeout",
|
|
5536
|
+
"default": 300000,
|
|
5530
5537
|
"hasDynamicHelp": false,
|
|
5531
5538
|
"multiple": false,
|
|
5532
5539
|
"type": "option"
|
|
5533
5540
|
},
|
|
5534
|
-
"
|
|
5535
|
-
"char": "
|
|
5536
|
-
"description": "
|
|
5537
|
-
"name": "
|
|
5541
|
+
"startchunknumber": {
|
|
5542
|
+
"char": "s",
|
|
5543
|
+
"description": "Chunk number to start from",
|
|
5544
|
+
"name": "startchunknumber",
|
|
5545
|
+
"default": 0,
|
|
5538
5546
|
"hasDynamicHelp": false,
|
|
5539
5547
|
"multiple": false,
|
|
5540
5548
|
"type": "option"
|
|
@@ -5577,13 +5585,13 @@
|
|
|
5577
5585
|
},
|
|
5578
5586
|
"hasDynamicHelp": true,
|
|
5579
5587
|
"hiddenAliases": [],
|
|
5580
|
-
"id": "hardis:org:
|
|
5588
|
+
"id": "hardis:org:files:export",
|
|
5581
5589
|
"pluginAlias": "sfdx-hardis",
|
|
5582
5590
|
"pluginName": "sfdx-hardis",
|
|
5583
5591
|
"pluginType": "core",
|
|
5584
5592
|
"strict": true,
|
|
5585
5593
|
"enableJsonFlag": true,
|
|
5586
|
-
"title": "
|
|
5594
|
+
"title": "Export files",
|
|
5587
5595
|
"requiresProject": false,
|
|
5588
5596
|
"isESM": true,
|
|
5589
5597
|
"relativePath": [
|
|
@@ -5591,43 +5599,43 @@
|
|
|
5591
5599
|
"commands",
|
|
5592
5600
|
"hardis",
|
|
5593
5601
|
"org",
|
|
5594
|
-
"
|
|
5595
|
-
"
|
|
5602
|
+
"files",
|
|
5603
|
+
"export.js"
|
|
5596
5604
|
],
|
|
5597
5605
|
"aliasPermutations": [],
|
|
5598
5606
|
"permutations": [
|
|
5599
|
-
"hardis:org:
|
|
5600
|
-
"org:hardis:
|
|
5601
|
-
"org:
|
|
5602
|
-
"org:
|
|
5603
|
-
"hardis:
|
|
5604
|
-
"
|
|
5605
|
-
"
|
|
5606
|
-
"
|
|
5607
|
-
"hardis:
|
|
5608
|
-
"
|
|
5609
|
-
"
|
|
5610
|
-
"
|
|
5611
|
-
"hardis:org:
|
|
5612
|
-
"org:hardis:
|
|
5613
|
-
"org:
|
|
5614
|
-
"org:
|
|
5615
|
-
"hardis:
|
|
5616
|
-
"
|
|
5617
|
-
"
|
|
5618
|
-
"
|
|
5619
|
-
"hardis:
|
|
5620
|
-
"
|
|
5621
|
-
"
|
|
5622
|
-
"
|
|
5607
|
+
"hardis:org:files:export",
|
|
5608
|
+
"org:hardis:files:export",
|
|
5609
|
+
"org:files:hardis:export",
|
|
5610
|
+
"org:files:export:hardis",
|
|
5611
|
+
"hardis:files:org:export",
|
|
5612
|
+
"files:hardis:org:export",
|
|
5613
|
+
"files:org:hardis:export",
|
|
5614
|
+
"files:org:export:hardis",
|
|
5615
|
+
"hardis:files:export:org",
|
|
5616
|
+
"files:hardis:export:org",
|
|
5617
|
+
"files:export:hardis:org",
|
|
5618
|
+
"files:export:org:hardis",
|
|
5619
|
+
"hardis:org:export:files",
|
|
5620
|
+
"org:hardis:export:files",
|
|
5621
|
+
"org:export:hardis:files",
|
|
5622
|
+
"org:export:files:hardis",
|
|
5623
|
+
"hardis:export:org:files",
|
|
5624
|
+
"export:hardis:org:files",
|
|
5625
|
+
"export:org:hardis:files",
|
|
5626
|
+
"export:org:files:hardis",
|
|
5627
|
+
"hardis:export:files:org",
|
|
5628
|
+
"export:hardis:files:org",
|
|
5629
|
+
"export:files:hardis:org",
|
|
5630
|
+
"export:files:org:hardis"
|
|
5623
5631
|
]
|
|
5624
5632
|
},
|
|
5625
|
-
"hardis:org:
|
|
5633
|
+
"hardis:org:files:import": {
|
|
5626
5634
|
"aliases": [],
|
|
5627
5635
|
"args": {},
|
|
5628
|
-
"description": "\
|
|
5636
|
+
"description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
|
|
5629
5637
|
"examples": [
|
|
5630
|
-
"$ sf hardis:org:
|
|
5638
|
+
"$ sf hardis:org:files:import"
|
|
5631
5639
|
],
|
|
5632
5640
|
"flags": {
|
|
5633
5641
|
"json": {
|
|
@@ -5645,8 +5653,23 @@
|
|
|
5645
5653
|
"multiple": false,
|
|
5646
5654
|
"type": "option"
|
|
5647
5655
|
},
|
|
5648
|
-
"
|
|
5649
|
-
"char": "
|
|
5656
|
+
"path": {
|
|
5657
|
+
"char": "p",
|
|
5658
|
+
"description": "Path to the file export project",
|
|
5659
|
+
"name": "path",
|
|
5660
|
+
"hasDynamicHelp": false,
|
|
5661
|
+
"multiple": false,
|
|
5662
|
+
"type": "option"
|
|
5663
|
+
},
|
|
5664
|
+
"overwrite": {
|
|
5665
|
+
"char": "f",
|
|
5666
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
5667
|
+
"name": "overwrite",
|
|
5668
|
+
"allowNo": false,
|
|
5669
|
+
"type": "boolean"
|
|
5670
|
+
},
|
|
5671
|
+
"debug": {
|
|
5672
|
+
"char": "d",
|
|
5650
5673
|
"description": "Activate debug mode (more logs)",
|
|
5651
5674
|
"name": "debug",
|
|
5652
5675
|
"allowNo": false,
|
|
@@ -5683,13 +5706,13 @@
|
|
|
5683
5706
|
},
|
|
5684
5707
|
"hasDynamicHelp": true,
|
|
5685
5708
|
"hiddenAliases": [],
|
|
5686
|
-
"id": "hardis:org:
|
|
5709
|
+
"id": "hardis:org:files:import",
|
|
5687
5710
|
"pluginAlias": "sfdx-hardis",
|
|
5688
5711
|
"pluginName": "sfdx-hardis",
|
|
5689
5712
|
"pluginType": "core",
|
|
5690
5713
|
"strict": true,
|
|
5691
5714
|
"enableJsonFlag": true,
|
|
5692
|
-
"title": "
|
|
5715
|
+
"title": "Import files",
|
|
5693
5716
|
"requiresProject": false,
|
|
5694
5717
|
"isESM": true,
|
|
5695
5718
|
"relativePath": [
|
|
@@ -5697,46 +5720,44 @@
|
|
|
5697
5720
|
"commands",
|
|
5698
5721
|
"hardis",
|
|
5699
5722
|
"org",
|
|
5700
|
-
"
|
|
5701
|
-
"
|
|
5723
|
+
"files",
|
|
5724
|
+
"import.js"
|
|
5702
5725
|
],
|
|
5703
5726
|
"aliasPermutations": [],
|
|
5704
5727
|
"permutations": [
|
|
5705
|
-
"hardis:org:
|
|
5706
|
-
"org:hardis:
|
|
5707
|
-
"org:
|
|
5708
|
-
"org:
|
|
5709
|
-
"hardis:
|
|
5710
|
-
"
|
|
5711
|
-
"
|
|
5712
|
-
"
|
|
5713
|
-
"hardis:
|
|
5714
|
-
"
|
|
5715
|
-
"
|
|
5716
|
-
"
|
|
5717
|
-
"hardis:org:
|
|
5718
|
-
"org:hardis:
|
|
5719
|
-
"org:
|
|
5720
|
-
"org:
|
|
5721
|
-
"hardis:
|
|
5722
|
-
"
|
|
5723
|
-
"
|
|
5724
|
-
"
|
|
5725
|
-
"hardis:
|
|
5726
|
-
"
|
|
5727
|
-
"
|
|
5728
|
-
"
|
|
5728
|
+
"hardis:org:files:import",
|
|
5729
|
+
"org:hardis:files:import",
|
|
5730
|
+
"org:files:hardis:import",
|
|
5731
|
+
"org:files:import:hardis",
|
|
5732
|
+
"hardis:files:org:import",
|
|
5733
|
+
"files:hardis:org:import",
|
|
5734
|
+
"files:org:hardis:import",
|
|
5735
|
+
"files:org:import:hardis",
|
|
5736
|
+
"hardis:files:import:org",
|
|
5737
|
+
"files:hardis:import:org",
|
|
5738
|
+
"files:import:hardis:org",
|
|
5739
|
+
"files:import:org:hardis",
|
|
5740
|
+
"hardis:org:import:files",
|
|
5741
|
+
"org:hardis:import:files",
|
|
5742
|
+
"org:import:hardis:files",
|
|
5743
|
+
"org:import:files:hardis",
|
|
5744
|
+
"hardis:import:org:files",
|
|
5745
|
+
"import:hardis:org:files",
|
|
5746
|
+
"import:org:hardis:files",
|
|
5747
|
+
"import:org:files:hardis",
|
|
5748
|
+
"hardis:import:files:org",
|
|
5749
|
+
"import:hardis:files:org",
|
|
5750
|
+
"import:files:hardis:org",
|
|
5751
|
+
"import:files:org:hardis"
|
|
5729
5752
|
]
|
|
5730
5753
|
},
|
|
5731
|
-
"hardis:org:
|
|
5754
|
+
"hardis:org:fix:listviewmine": {
|
|
5732
5755
|
"aliases": [],
|
|
5733
5756
|
"args": {},
|
|
5734
|
-
"description": "
|
|
5757
|
+
"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",
|
|
5735
5758
|
"examples": [
|
|
5736
|
-
"$ sf hardis:org:
|
|
5737
|
-
"$ sf hardis:org:
|
|
5738
|
-
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
5739
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
5759
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
5760
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
5740
5761
|
],
|
|
5741
5762
|
"flags": {
|
|
5742
5763
|
"json": {
|
|
@@ -5754,28 +5775,10 @@
|
|
|
5754
5775
|
"multiple": false,
|
|
5755
5776
|
"type": "option"
|
|
5756
5777
|
},
|
|
5757
|
-
"
|
|
5758
|
-
"char": "e",
|
|
5759
|
-
"description": "Type of EventLogFile event to analyze",
|
|
5760
|
-
"name": "eventtype",
|
|
5761
|
-
"default": "ApiTotalUsage",
|
|
5762
|
-
"hasDynamicHelp": false,
|
|
5763
|
-
"multiple": false,
|
|
5764
|
-
"type": "option"
|
|
5765
|
-
},
|
|
5766
|
-
"limit": {
|
|
5778
|
+
"listviews": {
|
|
5767
5779
|
"char": "l",
|
|
5768
|
-
"description": "
|
|
5769
|
-
"name": "
|
|
5770
|
-
"default": 999,
|
|
5771
|
-
"hasDynamicHelp": false,
|
|
5772
|
-
"multiple": false,
|
|
5773
|
-
"type": "option"
|
|
5774
|
-
},
|
|
5775
|
-
"outputfile": {
|
|
5776
|
-
"char": "f",
|
|
5777
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5778
|
-
"name": "outputfile",
|
|
5780
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
5781
|
+
"name": "listviews",
|
|
5779
5782
|
"hasDynamicHelp": false,
|
|
5780
5783
|
"multiple": false,
|
|
5781
5784
|
"type": "option"
|
|
@@ -5818,57 +5821,60 @@
|
|
|
5818
5821
|
},
|
|
5819
5822
|
"hasDynamicHelp": true,
|
|
5820
5823
|
"hiddenAliases": [],
|
|
5821
|
-
"id": "hardis:org:
|
|
5824
|
+
"id": "hardis:org:fix:listviewmine",
|
|
5822
5825
|
"pluginAlias": "sfdx-hardis",
|
|
5823
5826
|
"pluginName": "sfdx-hardis",
|
|
5824
5827
|
"pluginType": "core",
|
|
5825
5828
|
"strict": true,
|
|
5826
5829
|
"enableJsonFlag": true,
|
|
5827
|
-
"title": "
|
|
5828
|
-
"requiresProject":
|
|
5830
|
+
"title": "Fix listviews with ",
|
|
5831
|
+
"requiresProject": true,
|
|
5829
5832
|
"isESM": true,
|
|
5830
5833
|
"relativePath": [
|
|
5831
5834
|
"lib",
|
|
5832
5835
|
"commands",
|
|
5833
5836
|
"hardis",
|
|
5834
5837
|
"org",
|
|
5835
|
-
"
|
|
5836
|
-
"
|
|
5838
|
+
"fix",
|
|
5839
|
+
"listviewmine.js"
|
|
5837
5840
|
],
|
|
5838
5841
|
"aliasPermutations": [],
|
|
5839
5842
|
"permutations": [
|
|
5840
|
-
"hardis:org:
|
|
5841
|
-
"org:hardis:
|
|
5842
|
-
"org:
|
|
5843
|
-
"org:
|
|
5844
|
-
"hardis:
|
|
5845
|
-
"
|
|
5846
|
-
"
|
|
5847
|
-
"
|
|
5848
|
-
"hardis:
|
|
5849
|
-
"
|
|
5850
|
-
"
|
|
5851
|
-
"
|
|
5852
|
-
"hardis:org:
|
|
5853
|
-
"org:hardis:
|
|
5854
|
-
"org:
|
|
5855
|
-
"org:
|
|
5856
|
-
"hardis:
|
|
5857
|
-
"
|
|
5858
|
-
"
|
|
5859
|
-
"
|
|
5860
|
-
"hardis:
|
|
5861
|
-
"
|
|
5862
|
-
"
|
|
5863
|
-
"
|
|
5843
|
+
"hardis:org:fix:listviewmine",
|
|
5844
|
+
"org:hardis:fix:listviewmine",
|
|
5845
|
+
"org:fix:hardis:listviewmine",
|
|
5846
|
+
"org:fix:listviewmine:hardis",
|
|
5847
|
+
"hardis:fix:org:listviewmine",
|
|
5848
|
+
"fix:hardis:org:listviewmine",
|
|
5849
|
+
"fix:org:hardis:listviewmine",
|
|
5850
|
+
"fix:org:listviewmine:hardis",
|
|
5851
|
+
"hardis:fix:listviewmine:org",
|
|
5852
|
+
"fix:hardis:listviewmine:org",
|
|
5853
|
+
"fix:listviewmine:hardis:org",
|
|
5854
|
+
"fix:listviewmine:org:hardis",
|
|
5855
|
+
"hardis:org:listviewmine:fix",
|
|
5856
|
+
"org:hardis:listviewmine:fix",
|
|
5857
|
+
"org:listviewmine:hardis:fix",
|
|
5858
|
+
"org:listviewmine:fix:hardis",
|
|
5859
|
+
"hardis:listviewmine:org:fix",
|
|
5860
|
+
"listviewmine:hardis:org:fix",
|
|
5861
|
+
"listviewmine:org:hardis:fix",
|
|
5862
|
+
"listviewmine:org:fix:hardis",
|
|
5863
|
+
"hardis:listviewmine:fix:org",
|
|
5864
|
+
"listviewmine:hardis:fix:org",
|
|
5865
|
+
"listviewmine:fix:hardis:org",
|
|
5866
|
+
"listviewmine:fix:org:hardis"
|
|
5864
5867
|
]
|
|
5865
5868
|
},
|
|
5866
|
-
"hardis:org:diagnose:
|
|
5869
|
+
"hardis:org:diagnose:audittrail": {
|
|
5867
5870
|
"aliases": [],
|
|
5868
5871
|
"args": {},
|
|
5869
|
-
"description": "
|
|
5872
|
+
"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",
|
|
5870
5873
|
"examples": [
|
|
5871
|
-
"$ sf hardis:org:diagnose:
|
|
5874
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5875
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5876
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5877
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5872
5878
|
],
|
|
5873
5879
|
"flags": {
|
|
5874
5880
|
"json": {
|
|
@@ -5886,6 +5892,22 @@
|
|
|
5886
5892
|
"multiple": false,
|
|
5887
5893
|
"type": "option"
|
|
5888
5894
|
},
|
|
5895
|
+
"excludeusers": {
|
|
5896
|
+
"char": "e",
|
|
5897
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5898
|
+
"name": "excludeusers",
|
|
5899
|
+
"hasDynamicHelp": false,
|
|
5900
|
+
"multiple": false,
|
|
5901
|
+
"type": "option"
|
|
5902
|
+
},
|
|
5903
|
+
"lastndays": {
|
|
5904
|
+
"char": "t",
|
|
5905
|
+
"description": "Number of days to extract from today (included)",
|
|
5906
|
+
"name": "lastndays",
|
|
5907
|
+
"hasDynamicHelp": false,
|
|
5908
|
+
"multiple": false,
|
|
5909
|
+
"type": "option"
|
|
5910
|
+
},
|
|
5889
5911
|
"outputfile": {
|
|
5890
5912
|
"char": "f",
|
|
5891
5913
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -5894,13 +5916,6 @@
|
|
|
5894
5916
|
"multiple": false,
|
|
5895
5917
|
"type": "option"
|
|
5896
5918
|
},
|
|
5897
|
-
"usedonly": {
|
|
5898
|
-
"char": "u",
|
|
5899
|
-
"description": "Filter to have only used licenses",
|
|
5900
|
-
"name": "usedonly",
|
|
5901
|
-
"allowNo": false,
|
|
5902
|
-
"type": "boolean"
|
|
5903
|
-
},
|
|
5904
5919
|
"debug": {
|
|
5905
5920
|
"char": "d",
|
|
5906
5921
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5939,13 +5954,13 @@
|
|
|
5939
5954
|
},
|
|
5940
5955
|
"hasDynamicHelp": true,
|
|
5941
5956
|
"hiddenAliases": [],
|
|
5942
|
-
"id": "hardis:org:diagnose:
|
|
5957
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5943
5958
|
"pluginAlias": "sfdx-hardis",
|
|
5944
5959
|
"pluginName": "sfdx-hardis",
|
|
5945
5960
|
"pluginType": "core",
|
|
5946
5961
|
"strict": true,
|
|
5947
5962
|
"enableJsonFlag": true,
|
|
5948
|
-
"title": "
|
|
5963
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5949
5964
|
"requiresProject": false,
|
|
5950
5965
|
"isESM": true,
|
|
5951
5966
|
"relativePath": [
|
|
@@ -5954,42 +5969,42 @@
|
|
|
5954
5969
|
"hardis",
|
|
5955
5970
|
"org",
|
|
5956
5971
|
"diagnose",
|
|
5957
|
-
"
|
|
5972
|
+
"audittrail.js"
|
|
5958
5973
|
],
|
|
5959
5974
|
"aliasPermutations": [],
|
|
5960
5975
|
"permutations": [
|
|
5961
|
-
"hardis:org:diagnose:
|
|
5962
|
-
"org:hardis:diagnose:
|
|
5963
|
-
"org:diagnose:hardis:
|
|
5964
|
-
"org:diagnose:
|
|
5965
|
-
"hardis:diagnose:org:
|
|
5966
|
-
"diagnose:hardis:org:
|
|
5967
|
-
"diagnose:org:hardis:
|
|
5968
|
-
"diagnose:org:
|
|
5969
|
-
"hardis:diagnose:
|
|
5970
|
-
"diagnose:hardis:
|
|
5971
|
-
"diagnose:
|
|
5972
|
-
"diagnose:
|
|
5973
|
-
"hardis:org:
|
|
5974
|
-
"org:hardis:
|
|
5975
|
-
"org:
|
|
5976
|
-
"org:
|
|
5977
|
-
"hardis:
|
|
5978
|
-
"
|
|
5979
|
-
"
|
|
5980
|
-
"
|
|
5981
|
-
"hardis:
|
|
5982
|
-
"
|
|
5983
|
-
"
|
|
5984
|
-
"
|
|
5976
|
+
"hardis:org:diagnose:audittrail",
|
|
5977
|
+
"org:hardis:diagnose:audittrail",
|
|
5978
|
+
"org:diagnose:hardis:audittrail",
|
|
5979
|
+
"org:diagnose:audittrail:hardis",
|
|
5980
|
+
"hardis:diagnose:org:audittrail",
|
|
5981
|
+
"diagnose:hardis:org:audittrail",
|
|
5982
|
+
"diagnose:org:hardis:audittrail",
|
|
5983
|
+
"diagnose:org:audittrail:hardis",
|
|
5984
|
+
"hardis:diagnose:audittrail:org",
|
|
5985
|
+
"diagnose:hardis:audittrail:org",
|
|
5986
|
+
"diagnose:audittrail:hardis:org",
|
|
5987
|
+
"diagnose:audittrail:org:hardis",
|
|
5988
|
+
"hardis:org:audittrail:diagnose",
|
|
5989
|
+
"org:hardis:audittrail:diagnose",
|
|
5990
|
+
"org:audittrail:hardis:diagnose",
|
|
5991
|
+
"org:audittrail:diagnose:hardis",
|
|
5992
|
+
"hardis:audittrail:org:diagnose",
|
|
5993
|
+
"audittrail:hardis:org:diagnose",
|
|
5994
|
+
"audittrail:org:hardis:diagnose",
|
|
5995
|
+
"audittrail:org:diagnose:hardis",
|
|
5996
|
+
"hardis:audittrail:diagnose:org",
|
|
5997
|
+
"audittrail:hardis:diagnose:org",
|
|
5998
|
+
"audittrail:diagnose:hardis:org",
|
|
5999
|
+
"audittrail:diagnose:org:hardis"
|
|
5985
6000
|
]
|
|
5986
6001
|
},
|
|
5987
|
-
"hardis:org:diagnose:
|
|
6002
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5988
6003
|
"aliases": [],
|
|
5989
6004
|
"args": {},
|
|
5990
|
-
"description": "
|
|
6005
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the scheduled upgrade date for a Salesforce org's instance.**\n\nThis command provides crucial information about when your Salesforce instance will be upgraded to the next major release (Spring, Summer, or Winter). This is vital for release planning, testing, and ensuring compatibility with upcoming Salesforce features.\n\nKey functionalities:\n\n- **Instance Identification:** Determines the Salesforce instance name of your target org.\n- **Upgrade Date Retrieval:** Fetches the planned start time of the next major core service upgrade for that instance from the Salesforce Status API.\n- **Days Until Upgrade:** Calculates and displays the number of days remaining until the next major upgrade.\n- **Severity-Based Logging:** Adjusts the log severity (info, warning) based on the proximity of the upgrade date, providing a visual cue for urgency.\n- **Notifications:** Sends notifications to configured channels (e.g., Slack, MS Teams, Grafana) with the upgrade information, making it suitable for automated monitoring.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the `Organization` object in Salesforce to get the `InstanceName` of the target org.\n- **Salesforce Status API Integration:** It makes an HTTP GET request to the Salesforce Status API (`https://api.status.salesforce.com/v1/instances/{instanceName}/status`) to retrieve detailed information about the instance, including scheduled maintenances.\n- **Data Parsing:** It parses the JSON response from the Status API to extract the relevant major release upgrade information.\n- **Date Calculation:** Uses the `moment` library to calculate the difference in days between the current date and the planned upgrade date.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including the instance name, upgrade date, and days remaining, along with relevant metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the upgrade status and proximity.\n</details>\n",
|
|
5991
6006
|
"examples": [
|
|
5992
|
-
"$ sf hardis:org:diagnose:
|
|
6007
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5993
6008
|
],
|
|
5994
6009
|
"flags": {
|
|
5995
6010
|
"json": {
|
|
@@ -6007,14 +6022,6 @@
|
|
|
6007
6022
|
"multiple": false,
|
|
6008
6023
|
"type": "option"
|
|
6009
6024
|
},
|
|
6010
|
-
"outputfile": {
|
|
6011
|
-
"char": "f",
|
|
6012
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6013
|
-
"name": "outputfile",
|
|
6014
|
-
"hasDynamicHelp": false,
|
|
6015
|
-
"multiple": false,
|
|
6016
|
-
"type": "option"
|
|
6017
|
-
},
|
|
6018
6025
|
"debug": {
|
|
6019
6026
|
"char": "d",
|
|
6020
6027
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6053,13 +6060,13 @@
|
|
|
6053
6060
|
},
|
|
6054
6061
|
"hasDynamicHelp": true,
|
|
6055
6062
|
"hiddenAliases": [],
|
|
6056
|
-
"id": "hardis:org:diagnose:
|
|
6063
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
6057
6064
|
"pluginAlias": "sfdx-hardis",
|
|
6058
6065
|
"pluginName": "sfdx-hardis",
|
|
6059
6066
|
"pluginType": "core",
|
|
6060
6067
|
"strict": true,
|
|
6061
6068
|
"enableJsonFlag": true,
|
|
6062
|
-
"title": "
|
|
6069
|
+
"title": "Get Instance Upgrade date",
|
|
6063
6070
|
"requiresProject": false,
|
|
6064
6071
|
"isESM": true,
|
|
6065
6072
|
"relativePath": [
|
|
@@ -6068,43 +6075,45 @@
|
|
|
6068
6075
|
"hardis",
|
|
6069
6076
|
"org",
|
|
6070
6077
|
"diagnose",
|
|
6071
|
-
"
|
|
6078
|
+
"instanceupgrade.js"
|
|
6072
6079
|
],
|
|
6073
6080
|
"aliasPermutations": [],
|
|
6074
6081
|
"permutations": [
|
|
6075
|
-
"hardis:org:diagnose:
|
|
6076
|
-
"org:hardis:diagnose:
|
|
6077
|
-
"org:diagnose:hardis:
|
|
6078
|
-
"org:diagnose:
|
|
6079
|
-
"hardis:diagnose:org:
|
|
6080
|
-
"diagnose:hardis:org:
|
|
6081
|
-
"diagnose:org:hardis:
|
|
6082
|
-
"diagnose:org:
|
|
6083
|
-
"hardis:diagnose:
|
|
6084
|
-
"diagnose:hardis:
|
|
6085
|
-
"diagnose:
|
|
6086
|
-
"diagnose:
|
|
6087
|
-
"hardis:org:
|
|
6088
|
-
"org:hardis:
|
|
6089
|
-
"org:
|
|
6090
|
-
"org:
|
|
6091
|
-
"hardis:
|
|
6092
|
-
"
|
|
6093
|
-
"
|
|
6094
|
-
"
|
|
6095
|
-
"hardis:
|
|
6096
|
-
"
|
|
6097
|
-
"
|
|
6098
|
-
"
|
|
6082
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
6083
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
6084
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
6085
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
6086
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
6087
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
6088
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
6089
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
6090
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
6091
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
6092
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
6093
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
6094
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
6095
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
6096
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
6097
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
6098
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
6099
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
6100
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
6101
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
6102
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
6103
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
6104
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
6105
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
6099
6106
|
]
|
|
6100
6107
|
},
|
|
6101
|
-
"hardis:org:diagnose:
|
|
6108
|
+
"hardis:org:diagnose:legacyapi": {
|
|
6102
6109
|
"aliases": [],
|
|
6103
6110
|
"args": {},
|
|
6104
|
-
"description": "
|
|
6111
|
+
"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",
|
|
6105
6112
|
"examples": [
|
|
6106
|
-
"$ sf hardis:org:diagnose:
|
|
6107
|
-
"$ sf hardis:org:diagnose:
|
|
6113
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
6114
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6115
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6116
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6108
6117
|
],
|
|
6109
6118
|
"flags": {
|
|
6110
6119
|
"json": {
|
|
@@ -6122,18 +6131,28 @@
|
|
|
6122
6131
|
"multiple": false,
|
|
6123
6132
|
"type": "option"
|
|
6124
6133
|
},
|
|
6125
|
-
"
|
|
6126
|
-
"char": "
|
|
6127
|
-
"description": "
|
|
6128
|
-
"name": "
|
|
6134
|
+
"eventtype": {
|
|
6135
|
+
"char": "e",
|
|
6136
|
+
"description": "Type of EventLogFile event to analyze",
|
|
6137
|
+
"name": "eventtype",
|
|
6138
|
+
"default": "ApiTotalUsage",
|
|
6129
6139
|
"hasDynamicHelp": false,
|
|
6130
6140
|
"multiple": false,
|
|
6131
6141
|
"type": "option"
|
|
6132
6142
|
},
|
|
6133
|
-
"
|
|
6134
|
-
"char": "
|
|
6135
|
-
"description": "
|
|
6136
|
-
"name": "
|
|
6143
|
+
"limit": {
|
|
6144
|
+
"char": "l",
|
|
6145
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
6146
|
+
"name": "limit",
|
|
6147
|
+
"default": 999,
|
|
6148
|
+
"hasDynamicHelp": false,
|
|
6149
|
+
"multiple": false,
|
|
6150
|
+
"type": "option"
|
|
6151
|
+
},
|
|
6152
|
+
"outputfile": {
|
|
6153
|
+
"char": "f",
|
|
6154
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6155
|
+
"name": "outputfile",
|
|
6137
6156
|
"hasDynamicHelp": false,
|
|
6138
6157
|
"multiple": false,
|
|
6139
6158
|
"type": "option"
|
|
@@ -6176,13 +6195,13 @@
|
|
|
6176
6195
|
},
|
|
6177
6196
|
"hasDynamicHelp": true,
|
|
6178
6197
|
"hiddenAliases": [],
|
|
6179
|
-
"id": "hardis:org:diagnose:
|
|
6198
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
6180
6199
|
"pluginAlias": "sfdx-hardis",
|
|
6181
6200
|
"pluginName": "sfdx-hardis",
|
|
6182
6201
|
"pluginType": "core",
|
|
6183
6202
|
"strict": true,
|
|
6184
6203
|
"enableJsonFlag": true,
|
|
6185
|
-
"title": "
|
|
6204
|
+
"title": "Check for legacy API use",
|
|
6186
6205
|
"requiresProject": false,
|
|
6187
6206
|
"isESM": true,
|
|
6188
6207
|
"relativePath": [
|
|
@@ -6191,42 +6210,42 @@
|
|
|
6191
6210
|
"hardis",
|
|
6192
6211
|
"org",
|
|
6193
6212
|
"diagnose",
|
|
6194
|
-
"
|
|
6213
|
+
"legacyapi.js"
|
|
6195
6214
|
],
|
|
6196
6215
|
"aliasPermutations": [],
|
|
6197
6216
|
"permutations": [
|
|
6198
|
-
"hardis:org:diagnose:
|
|
6199
|
-
"org:hardis:diagnose:
|
|
6200
|
-
"org:diagnose:hardis:
|
|
6201
|
-
"org:diagnose:
|
|
6202
|
-
"hardis:diagnose:org:
|
|
6203
|
-
"diagnose:hardis:org:
|
|
6204
|
-
"diagnose:org:hardis:
|
|
6205
|
-
"diagnose:org:
|
|
6206
|
-
"hardis:diagnose:
|
|
6207
|
-
"diagnose:hardis:
|
|
6208
|
-
"diagnose:
|
|
6209
|
-
"diagnose:
|
|
6210
|
-
"hardis:org:
|
|
6211
|
-
"org:hardis:
|
|
6212
|
-
"org:
|
|
6213
|
-
"org:
|
|
6214
|
-
"hardis:
|
|
6215
|
-
"
|
|
6216
|
-
"
|
|
6217
|
-
"
|
|
6218
|
-
"hardis:
|
|
6219
|
-
"
|
|
6220
|
-
"
|
|
6221
|
-
"
|
|
6217
|
+
"hardis:org:diagnose:legacyapi",
|
|
6218
|
+
"org:hardis:diagnose:legacyapi",
|
|
6219
|
+
"org:diagnose:hardis:legacyapi",
|
|
6220
|
+
"org:diagnose:legacyapi:hardis",
|
|
6221
|
+
"hardis:diagnose:org:legacyapi",
|
|
6222
|
+
"diagnose:hardis:org:legacyapi",
|
|
6223
|
+
"diagnose:org:hardis:legacyapi",
|
|
6224
|
+
"diagnose:org:legacyapi:hardis",
|
|
6225
|
+
"hardis:diagnose:legacyapi:org",
|
|
6226
|
+
"diagnose:hardis:legacyapi:org",
|
|
6227
|
+
"diagnose:legacyapi:hardis:org",
|
|
6228
|
+
"diagnose:legacyapi:org:hardis",
|
|
6229
|
+
"hardis:org:legacyapi:diagnose",
|
|
6230
|
+
"org:hardis:legacyapi:diagnose",
|
|
6231
|
+
"org:legacyapi:hardis:diagnose",
|
|
6232
|
+
"org:legacyapi:diagnose:hardis",
|
|
6233
|
+
"hardis:legacyapi:org:diagnose",
|
|
6234
|
+
"legacyapi:hardis:org:diagnose",
|
|
6235
|
+
"legacyapi:org:hardis:diagnose",
|
|
6236
|
+
"legacyapi:org:diagnose:hardis",
|
|
6237
|
+
"hardis:legacyapi:diagnose:org",
|
|
6238
|
+
"legacyapi:hardis:diagnose:org",
|
|
6239
|
+
"legacyapi:diagnose:hardis:org",
|
|
6240
|
+
"legacyapi:diagnose:org:hardis"
|
|
6222
6241
|
]
|
|
6223
6242
|
},
|
|
6224
|
-
"hardis:org:diagnose:
|
|
6243
|
+
"hardis:org:diagnose:licenses": {
|
|
6225
6244
|
"aliases": [],
|
|
6226
6245
|
"args": {},
|
|
6227
|
-
"description": "\n
|
|
6246
|
+
"description": "\n**Lists and analyzes User Licenses and Permission Set Licenses subscribed and used in a Salesforce org.**\n\nThis command provides a comprehensive overview of your Salesforce license consumption. It's particularly useful for:\n\n- **License Management:** Understanding which licenses are active, how many are available, and how many are being used.\n- **Cost Optimization:** Identifying unused or underutilized licenses that could be reallocated or decommissioned.\n- **Compliance:** Ensuring that your organization is compliant with Salesforce licensing agreements.\n- **Monitoring:** Tracking license usage trends over time.\n\nKey functionalities:\n\n- **User License Details:** Retrieves information about standard and custom User Licenses, including `MasterLabel`, `Name`, `TotalLicenses`, and `UsedLicenses`.\n- **Permission Set License Details:** Retrieves information about Permission Set Licenses, including `MasterLabel`, `PermissionSetLicenseKey`, `TotalLicenses`, and `UsedLicenses`.\n- **Used Licenses Filter:** The `--usedonly` flag allows you to filter the report to show only licenses that have at least one `UsedLicenses` count greater than zero.\n- **CSV Report Generation:** Generates a CSV file containing all the retrieved license information, suitable for detailed analysis.\n- **Notifications:** Sends notifications to configured channels (e.g., Grafana, Slack, MS Teams) with a summary of license usage, including lists of active and used licenses.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It executes SOQL queries against the `UserLicense` and `PermissionSetLicense` objects in Salesforce to retrieve license data.\n- **Data Transformation:** It processes the query results, reformatting the data to be more readable and consistent for reporting purposes (e.g., removing `Id` and `attributes`, renaming `PermissionSetLicenseKey` to `Name`).\n- **Data Aggregation:** It aggregates license information, creating a `licensesByKey` object for quick lookups and a `usedLicenses` array for a concise list of actively used licenses.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of license data.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the license extraction process and the used licenses.\n</details>\n",
|
|
6228
6247
|
"examples": [
|
|
6229
|
-
"$ sf hardis:org:diagnose:
|
|
6248
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
6230
6249
|
],
|
|
6231
6250
|
"flags": {
|
|
6232
6251
|
"json": {
|
|
@@ -6252,6 +6271,13 @@
|
|
|
6252
6271
|
"multiple": false,
|
|
6253
6272
|
"type": "option"
|
|
6254
6273
|
},
|
|
6274
|
+
"usedonly": {
|
|
6275
|
+
"char": "u",
|
|
6276
|
+
"description": "Filter to have only used licenses",
|
|
6277
|
+
"name": "usedonly",
|
|
6278
|
+
"allowNo": false,
|
|
6279
|
+
"type": "boolean"
|
|
6280
|
+
},
|
|
6255
6281
|
"debug": {
|
|
6256
6282
|
"char": "d",
|
|
6257
6283
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6290,30 +6316,13 @@
|
|
|
6290
6316
|
},
|
|
6291
6317
|
"hasDynamicHelp": true,
|
|
6292
6318
|
"hiddenAliases": [],
|
|
6293
|
-
"id": "hardis:org:diagnose:
|
|
6319
|
+
"id": "hardis:org:diagnose:licenses",
|
|
6294
6320
|
"pluginAlias": "sfdx-hardis",
|
|
6295
6321
|
"pluginName": "sfdx-hardis",
|
|
6296
6322
|
"pluginType": "core",
|
|
6297
6323
|
"strict": true,
|
|
6298
6324
|
"enableJsonFlag": true,
|
|
6299
|
-
"title": "
|
|
6300
|
-
"allowedInactiveConnectedApps": [
|
|
6301
|
-
"Ant Migration Tool",
|
|
6302
|
-
"Chatter Desktop",
|
|
6303
|
-
"Chatter Mobile for BlackBerry",
|
|
6304
|
-
"Force.com IDE",
|
|
6305
|
-
"OIQ_Integration",
|
|
6306
|
-
"Salesforce CLI",
|
|
6307
|
-
"Salesforce Files",
|
|
6308
|
-
"Salesforce Mobile Dashboards",
|
|
6309
|
-
"Salesforce Touch",
|
|
6310
|
-
"Salesforce for Outlook",
|
|
6311
|
-
"SalesforceA",
|
|
6312
|
-
"SalesforceA for Android",
|
|
6313
|
-
"SalesforceA for iOS",
|
|
6314
|
-
"SalesforceDX Namespace Registry",
|
|
6315
|
-
"SalesforceIQ"
|
|
6316
|
-
],
|
|
6325
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6317
6326
|
"requiresProject": false,
|
|
6318
6327
|
"isESM": true,
|
|
6319
6328
|
"relativePath": [
|
|
@@ -6322,43 +6331,42 @@
|
|
|
6322
6331
|
"hardis",
|
|
6323
6332
|
"org",
|
|
6324
6333
|
"diagnose",
|
|
6325
|
-
"
|
|
6334
|
+
"licenses.js"
|
|
6326
6335
|
],
|
|
6327
6336
|
"aliasPermutations": [],
|
|
6328
6337
|
"permutations": [
|
|
6329
|
-
"hardis:org:diagnose:
|
|
6330
|
-
"org:hardis:diagnose:
|
|
6331
|
-
"org:diagnose:hardis:
|
|
6332
|
-
"org:diagnose:
|
|
6333
|
-
"hardis:diagnose:org:
|
|
6334
|
-
"diagnose:hardis:org:
|
|
6335
|
-
"diagnose:org:hardis:
|
|
6336
|
-
"diagnose:org:
|
|
6337
|
-
"hardis:diagnose:
|
|
6338
|
-
"diagnose:hardis:
|
|
6339
|
-
"diagnose:
|
|
6340
|
-
"diagnose:
|
|
6341
|
-
"hardis:org:
|
|
6342
|
-
"org:hardis:
|
|
6343
|
-
"org:
|
|
6344
|
-
"org:
|
|
6345
|
-
"hardis:
|
|
6346
|
-
"
|
|
6347
|
-
"
|
|
6348
|
-
"
|
|
6349
|
-
"hardis:
|
|
6350
|
-
"
|
|
6351
|
-
"
|
|
6352
|
-
"
|
|
6338
|
+
"hardis:org:diagnose:licenses",
|
|
6339
|
+
"org:hardis:diagnose:licenses",
|
|
6340
|
+
"org:diagnose:hardis:licenses",
|
|
6341
|
+
"org:diagnose:licenses:hardis",
|
|
6342
|
+
"hardis:diagnose:org:licenses",
|
|
6343
|
+
"diagnose:hardis:org:licenses",
|
|
6344
|
+
"diagnose:org:hardis:licenses",
|
|
6345
|
+
"diagnose:org:licenses:hardis",
|
|
6346
|
+
"hardis:diagnose:licenses:org",
|
|
6347
|
+
"diagnose:hardis:licenses:org",
|
|
6348
|
+
"diagnose:licenses:hardis:org",
|
|
6349
|
+
"diagnose:licenses:org:hardis",
|
|
6350
|
+
"hardis:org:licenses:diagnose",
|
|
6351
|
+
"org:hardis:licenses:diagnose",
|
|
6352
|
+
"org:licenses:hardis:diagnose",
|
|
6353
|
+
"org:licenses:diagnose:hardis",
|
|
6354
|
+
"hardis:licenses:org:diagnose",
|
|
6355
|
+
"licenses:hardis:org:diagnose",
|
|
6356
|
+
"licenses:org:hardis:diagnose",
|
|
6357
|
+
"licenses:org:diagnose:hardis",
|
|
6358
|
+
"hardis:licenses:diagnose:org",
|
|
6359
|
+
"licenses:hardis:diagnose:org",
|
|
6360
|
+
"licenses:diagnose:hardis:org",
|
|
6361
|
+
"licenses:diagnose:org:hardis"
|
|
6353
6362
|
]
|
|
6354
6363
|
},
|
|
6355
|
-
"hardis:org:diagnose:
|
|
6364
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6356
6365
|
"aliases": [],
|
|
6357
6366
|
"args": {},
|
|
6358
|
-
"description": "
|
|
6367
|
+
"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",
|
|
6359
6368
|
"examples": [
|
|
6360
|
-
"$ sf hardis:org:diagnose:
|
|
6361
|
-
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6369
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6362
6370
|
],
|
|
6363
6371
|
"flags": {
|
|
6364
6372
|
"json": {
|
|
@@ -6422,32 +6430,14 @@
|
|
|
6422
6430
|
},
|
|
6423
6431
|
"hasDynamicHelp": true,
|
|
6424
6432
|
"hiddenAliases": [],
|
|
6425
|
-
"id": "hardis:org:diagnose:
|
|
6433
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6426
6434
|
"pluginAlias": "sfdx-hardis",
|
|
6427
6435
|
"pluginName": "sfdx-hardis",
|
|
6428
6436
|
"pluginType": "core",
|
|
6429
6437
|
"strict": true,
|
|
6430
6438
|
"enableJsonFlag": true,
|
|
6431
|
-
"title": "
|
|
6439
|
+
"title": "Check Release Updates of an org",
|
|
6432
6440
|
"requiresProject": false,
|
|
6433
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
6434
|
-
"Sales_User"
|
|
6435
|
-
],
|
|
6436
|
-
"permSetsPermSetLicenses": [
|
|
6437
|
-
{
|
|
6438
|
-
"permSet": "Sales_User",
|
|
6439
|
-
"permSetLicense": "SalesUserPsl"
|
|
6440
|
-
}
|
|
6441
|
-
],
|
|
6442
|
-
"profilesPermissionSetLicenses": [
|
|
6443
|
-
{
|
|
6444
|
-
"profile": "Salesforce API Only",
|
|
6445
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6446
|
-
}
|
|
6447
|
-
],
|
|
6448
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6449
|
-
"IdentityConnect"
|
|
6450
|
-
],
|
|
6451
6441
|
"isESM": true,
|
|
6452
6442
|
"relativePath": [
|
|
6453
6443
|
"lib",
|
|
@@ -6455,46 +6445,43 @@
|
|
|
6455
6445
|
"hardis",
|
|
6456
6446
|
"org",
|
|
6457
6447
|
"diagnose",
|
|
6458
|
-
"
|
|
6448
|
+
"releaseupdates.js"
|
|
6459
6449
|
],
|
|
6460
6450
|
"aliasPermutations": [],
|
|
6461
6451
|
"permutations": [
|
|
6462
|
-
"hardis:org:diagnose:
|
|
6463
|
-
"org:hardis:diagnose:
|
|
6464
|
-
"org:diagnose:hardis:
|
|
6465
|
-
"org:diagnose:
|
|
6466
|
-
"hardis:diagnose:org:
|
|
6467
|
-
"diagnose:hardis:org:
|
|
6468
|
-
"diagnose:org:hardis:
|
|
6469
|
-
"diagnose:org:
|
|
6470
|
-
"hardis:diagnose:
|
|
6471
|
-
"diagnose:hardis:
|
|
6472
|
-
"diagnose:
|
|
6473
|
-
"diagnose:
|
|
6474
|
-
"hardis:org:
|
|
6475
|
-
"org:hardis:
|
|
6476
|
-
"org:
|
|
6477
|
-
"org:
|
|
6478
|
-
"hardis:
|
|
6479
|
-
"
|
|
6480
|
-
"
|
|
6481
|
-
"
|
|
6482
|
-
"hardis:
|
|
6483
|
-
"
|
|
6484
|
-
"
|
|
6485
|
-
"
|
|
6452
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6453
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6454
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6455
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6456
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6457
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6458
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6459
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6460
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6461
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6462
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6463
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6464
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6465
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6466
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6467
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6468
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6469
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6470
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6471
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6472
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6473
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6474
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6475
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6486
6476
|
]
|
|
6487
6477
|
},
|
|
6488
|
-
"hardis:org:diagnose:
|
|
6478
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6489
6479
|
"aliases": [],
|
|
6490
6480
|
"args": {},
|
|
6491
|
-
"description": "
|
|
6481
|
+
"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",
|
|
6492
6482
|
"examples": [
|
|
6493
|
-
"$ sf hardis:org:diagnose:
|
|
6494
|
-
"$ sf hardis:org:diagnose:
|
|
6495
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6496
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6497
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6483
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6484
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6498
6485
|
],
|
|
6499
6486
|
"flags": {
|
|
6500
6487
|
"json": {
|
|
@@ -6528,33 +6515,6 @@
|
|
|
6528
6515
|
"multiple": false,
|
|
6529
6516
|
"type": "option"
|
|
6530
6517
|
},
|
|
6531
|
-
"licensetypes": {
|
|
6532
|
-
"char": "l",
|
|
6533
|
-
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6534
|
-
"name": "licensetypes",
|
|
6535
|
-
"hasDynamicHelp": false,
|
|
6536
|
-
"multiple": false,
|
|
6537
|
-
"options": [
|
|
6538
|
-
"all",
|
|
6539
|
-
"all-crm",
|
|
6540
|
-
"all-paying"
|
|
6541
|
-
],
|
|
6542
|
-
"type": "option"
|
|
6543
|
-
},
|
|
6544
|
-
"licenseidentifiers": {
|
|
6545
|
-
"char": "i",
|
|
6546
|
-
"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",
|
|
6547
|
-
"name": "licenseidentifiers",
|
|
6548
|
-
"hasDynamicHelp": false,
|
|
6549
|
-
"multiple": false,
|
|
6550
|
-
"type": "option"
|
|
6551
|
-
},
|
|
6552
|
-
"returnactiveusers": {
|
|
6553
|
-
"description": "Inverts the command by returning the active users",
|
|
6554
|
-
"name": "returnactiveusers",
|
|
6555
|
-
"allowNo": false,
|
|
6556
|
-
"type": "boolean"
|
|
6557
|
-
},
|
|
6558
6518
|
"debug": {
|
|
6559
6519
|
"char": "d",
|
|
6560
6520
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6593,13 +6553,13 @@
|
|
|
6593
6553
|
},
|
|
6594
6554
|
"hasDynamicHelp": true,
|
|
6595
6555
|
"hiddenAliases": [],
|
|
6596
|
-
"id": "hardis:org:diagnose:
|
|
6556
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6597
6557
|
"pluginAlias": "sfdx-hardis",
|
|
6598
6558
|
"pluginName": "sfdx-hardis",
|
|
6599
6559
|
"pluginType": "core",
|
|
6600
6560
|
"strict": true,
|
|
6601
6561
|
"enableJsonFlag": true,
|
|
6602
|
-
"title": "Detect unused
|
|
6562
|
+
"title": "Detect unused Apex classes in an org",
|
|
6603
6563
|
"requiresProject": false,
|
|
6604
6564
|
"isESM": true,
|
|
6605
6565
|
"relativePath": [
|
|
@@ -6608,42 +6568,42 @@
|
|
|
6608
6568
|
"hardis",
|
|
6609
6569
|
"org",
|
|
6610
6570
|
"diagnose",
|
|
6611
|
-
"
|
|
6571
|
+
"unused-apex-classes.js"
|
|
6612
6572
|
],
|
|
6613
6573
|
"aliasPermutations": [],
|
|
6614
6574
|
"permutations": [
|
|
6615
|
-
"hardis:org:diagnose:
|
|
6616
|
-
"org:hardis:diagnose:
|
|
6617
|
-
"org:diagnose:hardis:
|
|
6618
|
-
"org:diagnose:
|
|
6619
|
-
"hardis:diagnose:org:
|
|
6620
|
-
"diagnose:hardis:org:
|
|
6621
|
-
"diagnose:org:hardis:
|
|
6622
|
-
"diagnose:org:
|
|
6623
|
-
"hardis:diagnose:
|
|
6624
|
-
"diagnose:hardis:
|
|
6625
|
-
"diagnose:
|
|
6626
|
-
"diagnose:
|
|
6627
|
-
"hardis:org:
|
|
6628
|
-
"org:hardis:
|
|
6629
|
-
"org:
|
|
6630
|
-
"org:
|
|
6631
|
-
"hardis:
|
|
6632
|
-
"
|
|
6633
|
-
"
|
|
6634
|
-
"
|
|
6635
|
-
"hardis:
|
|
6636
|
-
"
|
|
6637
|
-
"
|
|
6638
|
-
"
|
|
6575
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6576
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6577
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6578
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6579
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6580
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6581
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6582
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6583
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6584
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6585
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6586
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6587
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6588
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6589
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6590
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6591
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6592
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6593
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6594
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6595
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6596
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6597
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6598
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6639
6599
|
]
|
|
6640
6600
|
},
|
|
6641
|
-
"hardis:org:
|
|
6601
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6642
6602
|
"aliases": [],
|
|
6643
6603
|
"args": {},
|
|
6644
|
-
"description": "\n## Command Behavior\n\n**
|
|
6604
|
+
"description": "\n## Command Behavior\n\n**Identifies and reports on potentially unused Connected Apps in a Salesforce org, suggesting candidates for deletion or deactivation.**\n\nThis command helps improve org security and reduce technical debt by pinpointing Connected Apps that are no longer actively used. Connected Apps can pose security risks if left unmonitored, and cleaning them up contributes to a healthier Salesforce environment.\n\nKey functionalities:\n\n- **Connected App Data Collection:** Gathers information about all Connected Apps in the org, including creation and last modified dates, and associated users.\n- **Usage Analysis:** Analyzes `LoginHistory` and `OAuthToken` records to determine the last usage date of each Connected App.\n- **Inactivity Detection:** Flags Connected Apps as potentially unused if they have no recent login history or OAuth token usage.\n- **Accessibility Check:** Examines Connected App metadata to identify if they are accessible (e.g., if they require admin approval and have no profiles or permission sets assigned).\n- **Ignored Apps:** Automatically ignores a predefined list of common Salesforce Connected Apps (e.g., `Salesforce CLI`, `Salesforce Mobile Dashboards`). You can extend this list by defining the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n- **CSV Report Generation:** Generates a CSV file containing details of all analyzed Connected Apps, including their usage status, last usage date, and reasons for being flagged as potentially unused.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of potentially unused Connected Apps.\n\n**Default Ignored Connected Apps:**\n\n- Ant Migration Tool\n- Chatter Desktop\n- Chatter Mobile for BlackBerry\n- Force.com IDE\n- OIQ_Integration\n- Salesforce CLI\n- Salesforce Files\n- Salesforce Mobile Dashboards\n- Salesforce Touch\n- Salesforce for Outlook\n- SalesforceA\n- SalesforceA for Android\n- SalesforceA for iOS\n- SalesforceDX Namespace Registry\n- SalesforceIQ\n\nYou can add more ignored apps by defining a comma-separated list of names in the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n\n_Example: \nALLOWED_INACTIVE_CONNECTED_APPS=My App 1,My App 2, My App 3_\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-connected-apps/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It performs SOQL queries against `ConnectedApplication`, `LoginHistory`, and `OAuthToken` objects to gather comprehensive data about Connected Apps and their usage.\n- **Temporary SFDX Project:** It creates a temporary SFDX project to retrieve Connected App metadata, allowing for local parsing and analysis of their XML files.\n- **Metadata Parsing:** It parses the `connectedApp-meta.xml` files to check for `isAdminApproved` and the presence of `profileName` or `permissionsetName` to determine accessibility.\n- **Data Correlation:** It correlates data from various Salesforce objects to build a complete picture of each Connected App's usage and status.\n- **Date Calculation:** Uses `moment` to calculate the time since the last OAuth token usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused Connected Apps.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **File System Operations:** Uses `fs-extra` for creating and removing temporary directories and files.\n- **Environment Variable Reading:** Reads the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable to customize the list of ignored Connected Apps.\n</details>\n",
|
|
6645
6605
|
"examples": [
|
|
6646
|
-
"$ sf hardis:org:
|
|
6606
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6647
6607
|
],
|
|
6648
6608
|
"flags": {
|
|
6649
6609
|
"json": {
|
|
@@ -6661,37 +6621,10 @@
|
|
|
6661
6621
|
"multiple": false,
|
|
6662
6622
|
"type": "option"
|
|
6663
6623
|
},
|
|
6664
|
-
"
|
|
6665
|
-
"char": "
|
|
6666
|
-
"description": "
|
|
6667
|
-
"name": "
|
|
6668
|
-
"hasDynamicHelp": false,
|
|
6669
|
-
"multiple": false,
|
|
6670
|
-
"type": "option"
|
|
6671
|
-
},
|
|
6672
|
-
"chunksize": {
|
|
6673
|
-
"char": "c",
|
|
6674
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
6675
|
-
"name": "chunksize",
|
|
6676
|
-
"default": 1000,
|
|
6677
|
-
"hasDynamicHelp": false,
|
|
6678
|
-
"multiple": false,
|
|
6679
|
-
"type": "option"
|
|
6680
|
-
},
|
|
6681
|
-
"polltimeout": {
|
|
6682
|
-
"char": "t",
|
|
6683
|
-
"description": "Timeout in MS for Bulk API calls",
|
|
6684
|
-
"name": "polltimeout",
|
|
6685
|
-
"default": 300000,
|
|
6686
|
-
"hasDynamicHelp": false,
|
|
6687
|
-
"multiple": false,
|
|
6688
|
-
"type": "option"
|
|
6689
|
-
},
|
|
6690
|
-
"startchunknumber": {
|
|
6691
|
-
"char": "s",
|
|
6692
|
-
"description": "Chunk number to start from",
|
|
6693
|
-
"name": "startchunknumber",
|
|
6694
|
-
"default": 0,
|
|
6624
|
+
"outputfile": {
|
|
6625
|
+
"char": "f",
|
|
6626
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6627
|
+
"name": "outputfile",
|
|
6695
6628
|
"hasDynamicHelp": false,
|
|
6696
6629
|
"multiple": false,
|
|
6697
6630
|
"type": "option"
|
|
@@ -6734,13 +6667,30 @@
|
|
|
6734
6667
|
},
|
|
6735
6668
|
"hasDynamicHelp": true,
|
|
6736
6669
|
"hiddenAliases": [],
|
|
6737
|
-
"id": "hardis:org:
|
|
6670
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6738
6671
|
"pluginAlias": "sfdx-hardis",
|
|
6739
6672
|
"pluginName": "sfdx-hardis",
|
|
6740
6673
|
"pluginType": "core",
|
|
6741
6674
|
"strict": true,
|
|
6742
6675
|
"enableJsonFlag": true,
|
|
6743
|
-
"title": "
|
|
6676
|
+
"title": "Unused Connected Apps in an org",
|
|
6677
|
+
"allowedInactiveConnectedApps": [
|
|
6678
|
+
"Ant Migration Tool",
|
|
6679
|
+
"Chatter Desktop",
|
|
6680
|
+
"Chatter Mobile for BlackBerry",
|
|
6681
|
+
"Force.com IDE",
|
|
6682
|
+
"OIQ_Integration",
|
|
6683
|
+
"Salesforce CLI",
|
|
6684
|
+
"Salesforce Files",
|
|
6685
|
+
"Salesforce Mobile Dashboards",
|
|
6686
|
+
"Salesforce Touch",
|
|
6687
|
+
"Salesforce for Outlook",
|
|
6688
|
+
"SalesforceA",
|
|
6689
|
+
"SalesforceA for Android",
|
|
6690
|
+
"SalesforceA for iOS",
|
|
6691
|
+
"SalesforceDX Namespace Registry",
|
|
6692
|
+
"SalesforceIQ"
|
|
6693
|
+
],
|
|
6744
6694
|
"requiresProject": false,
|
|
6745
6695
|
"isESM": true,
|
|
6746
6696
|
"relativePath": [
|
|
@@ -6748,43 +6698,44 @@
|
|
|
6748
6698
|
"commands",
|
|
6749
6699
|
"hardis",
|
|
6750
6700
|
"org",
|
|
6751
|
-
"
|
|
6752
|
-
"
|
|
6701
|
+
"diagnose",
|
|
6702
|
+
"unused-connected-apps.js"
|
|
6753
6703
|
],
|
|
6754
6704
|
"aliasPermutations": [],
|
|
6755
6705
|
"permutations": [
|
|
6756
|
-
"hardis:org:
|
|
6757
|
-
"org:hardis:
|
|
6758
|
-
"org:
|
|
6759
|
-
"org:
|
|
6760
|
-
"hardis:
|
|
6761
|
-
"
|
|
6762
|
-
"
|
|
6763
|
-
"
|
|
6764
|
-
"hardis:
|
|
6765
|
-
"
|
|
6766
|
-
"
|
|
6767
|
-
"
|
|
6768
|
-
"hardis:org:
|
|
6769
|
-
"org:hardis:
|
|
6770
|
-
"org:
|
|
6771
|
-
"org:
|
|
6772
|
-
"hardis:
|
|
6773
|
-
"
|
|
6774
|
-
"
|
|
6775
|
-
"
|
|
6776
|
-
"hardis:
|
|
6777
|
-
"
|
|
6778
|
-
"
|
|
6779
|
-
"
|
|
6706
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6707
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6708
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6709
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6710
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6711
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6712
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6713
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6714
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6715
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6716
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6717
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6718
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6719
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6720
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6721
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6722
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6723
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6724
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6725
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6726
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6727
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6728
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6729
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6780
6730
|
]
|
|
6781
6731
|
},
|
|
6782
|
-
"hardis:org:
|
|
6732
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6783
6733
|
"aliases": [],
|
|
6784
6734
|
"args": {},
|
|
6785
|
-
"description": "\
|
|
6735
|
+
"description": "\n## Command Behavior\n\n**Detects and suggests the deletion of unused Permission Set License Assignments in a Salesforce org.**\n\nWhen a Permission Set (PS) linked to a Permission Set License (PSL) is assigned to a user, a Permission Set License Assignment (PSLA) is automatically created. However, when that PS is unassigned from the user, the PSLA is *not* automatically deleted. This can lead to organizations being charged for unused PSLAs, representing a hidden cost and technical debt.\n\nThis command identifies such useless PSLAs and provides options to delete them, helping to optimize license usage and reduce unnecessary expenses.\n\nKey functionalities:\n\n- **PSLA Detection:** Queries the Salesforce org to find all active PSLAs.\n- **Usage Verification:** Correlates PSLAs with actual Permission Set Assignments and Permission Set Group Assignments to determine if the underlying Permission Sets are still assigned to the user.\n- **Special Case Handling:** Accounts for specific scenarios where profiles might implicitly assign PSLAs (e.g., `Salesforce API Only` profile assigning `SalesforceAPIIntegrationPsl`) and allows for always excluding certain PSLAs from the unused check.\n- **Reporting:** Generates a CSV report of all identified unused PSLAs, including the user and the associated Permission Set License.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of unused PSLAs.\n- **Interactive Deletion:** In non-CI environments, it offers an interactive prompt to bulk delete the identified unused PSLAs.\n\nMany thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command :)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-licenses/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves extensive querying of Salesforce objects and data correlation:\n\n- **SOQL Queries (Bulk API):** It uses `bulkQuery` and `bulkQueryChunksIn` to efficiently retrieve large volumes of data from `PermissionSetLicenseAssign`, `PermissionSetLicense`, `PermissionSet`, `PermissionSetGroupComponent`, and `PermissionSetAssignment` objects.\n- **Data Correlation:** It meticulously correlates data across these objects to determine if a `PermissionSetLicenseAssign` record has a corresponding active assignment to a Permission Set or Permission Set Group for the same user.\n- **Filtering Logic:** It applies complex filtering logic to exclude PSLAs that are genuinely in use or are part of predefined exceptions (e.g., `alwaysExcludeForActiveUsersPermissionSetLicenses`).\n- **Bulk Deletion:** If the user opts to delete unused PSLAs, it uses `bulkUpdate` with the `delete` operation to efficiently remove multiple records.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused PSLAs.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Interaction:** Uses `prompts` for interactive confirmation before performing deletion operations.\n</details>\n",
|
|
6786
6736
|
"examples": [
|
|
6787
|
-
"$ sf hardis:org:
|
|
6737
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6738
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6788
6739
|
],
|
|
6789
6740
|
"flags": {
|
|
6790
6741
|
"json": {
|
|
@@ -6802,21 +6753,14 @@
|
|
|
6802
6753
|
"multiple": false,
|
|
6803
6754
|
"type": "option"
|
|
6804
6755
|
},
|
|
6805
|
-
"
|
|
6806
|
-
"char": "
|
|
6807
|
-
"description": "
|
|
6808
|
-
"name": "
|
|
6756
|
+
"outputfile": {
|
|
6757
|
+
"char": "f",
|
|
6758
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6759
|
+
"name": "outputfile",
|
|
6809
6760
|
"hasDynamicHelp": false,
|
|
6810
6761
|
"multiple": false,
|
|
6811
6762
|
"type": "option"
|
|
6812
6763
|
},
|
|
6813
|
-
"overwrite": {
|
|
6814
|
-
"char": "f",
|
|
6815
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
6816
|
-
"name": "overwrite",
|
|
6817
|
-
"allowNo": false,
|
|
6818
|
-
"type": "boolean"
|
|
6819
|
-
},
|
|
6820
6764
|
"debug": {
|
|
6821
6765
|
"char": "d",
|
|
6822
6766
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6855,58 +6799,79 @@
|
|
|
6855
6799
|
},
|
|
6856
6800
|
"hasDynamicHelp": true,
|
|
6857
6801
|
"hiddenAliases": [],
|
|
6858
|
-
"id": "hardis:org:
|
|
6802
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
6859
6803
|
"pluginAlias": "sfdx-hardis",
|
|
6860
6804
|
"pluginName": "sfdx-hardis",
|
|
6861
6805
|
"pluginType": "core",
|
|
6862
6806
|
"strict": true,
|
|
6863
6807
|
"enableJsonFlag": true,
|
|
6864
|
-
"title": "
|
|
6808
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
6865
6809
|
"requiresProject": false,
|
|
6810
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6811
|
+
"Sales_User"
|
|
6812
|
+
],
|
|
6813
|
+
"permSetsPermSetLicenses": [
|
|
6814
|
+
{
|
|
6815
|
+
"permSet": "Sales_User",
|
|
6816
|
+
"permSetLicense": "SalesUserPsl"
|
|
6817
|
+
}
|
|
6818
|
+
],
|
|
6819
|
+
"profilesPermissionSetLicenses": [
|
|
6820
|
+
{
|
|
6821
|
+
"profile": "Salesforce API Only",
|
|
6822
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6823
|
+
}
|
|
6824
|
+
],
|
|
6825
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6826
|
+
"IdentityConnect"
|
|
6827
|
+
],
|
|
6866
6828
|
"isESM": true,
|
|
6867
6829
|
"relativePath": [
|
|
6868
6830
|
"lib",
|
|
6869
6831
|
"commands",
|
|
6870
6832
|
"hardis",
|
|
6871
6833
|
"org",
|
|
6872
|
-
"
|
|
6873
|
-
"
|
|
6834
|
+
"diagnose",
|
|
6835
|
+
"unusedlicenses.js"
|
|
6874
6836
|
],
|
|
6875
6837
|
"aliasPermutations": [],
|
|
6876
6838
|
"permutations": [
|
|
6877
|
-
"hardis:org:
|
|
6878
|
-
"org:hardis:
|
|
6879
|
-
"org:
|
|
6880
|
-
"org:
|
|
6881
|
-
"hardis:
|
|
6882
|
-
"
|
|
6883
|
-
"
|
|
6884
|
-
"
|
|
6885
|
-
"hardis:
|
|
6886
|
-
"
|
|
6887
|
-
"
|
|
6888
|
-
"
|
|
6889
|
-
"hardis:org:
|
|
6890
|
-
"org:hardis:
|
|
6891
|
-
"org:
|
|
6892
|
-
"org:
|
|
6893
|
-
"hardis:
|
|
6894
|
-
"
|
|
6895
|
-
"
|
|
6896
|
-
"
|
|
6897
|
-
"hardis:
|
|
6898
|
-
"
|
|
6899
|
-
"
|
|
6900
|
-
"
|
|
6839
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
6840
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
6841
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
6842
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
6843
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
6844
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
6845
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
6846
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
6847
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
6848
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
6849
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
6850
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
6851
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
6852
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
6853
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
6854
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
6855
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
6856
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
6857
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
6858
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
6859
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
6860
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
6861
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
6862
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
6901
6863
|
]
|
|
6902
6864
|
},
|
|
6903
|
-
"hardis:org:
|
|
6865
|
+
"hardis:org:diagnose:unusedusers": {
|
|
6904
6866
|
"aliases": [],
|
|
6905
6867
|
"args": {},
|
|
6906
|
-
"description": "
|
|
6868
|
+
"description": "\n## Command Behavior\n\n**Detects and reports on inactive or unused Salesforce user accounts, helping to optimize license usage and enhance security.**\n\nEfficient user management is vital in Salesforce to ensure resources are optimized and costs are controlled. However, inactive or unused user accounts can often go unnoticed, leading to wasted licenses and potential security risks. This tool addresses this challenge by enabling administrators to identify users who haven't logged in within a specified period.\n\nBy analyzing user login activity and last login timestamps, this feature highlights inactive user accounts, allowing administrators to take appropriate action. Whether it's deactivating dormant accounts, freeing up licenses, or ensuring compliance with security policies, this functionality empowers administrators to maintain a lean and secure Salesforce environment.\n\nKey functionalities:\n\n- **Inactivity Detection:** Identifies users who have not logged in for a specified number of days (`--days` flag, default 180 days in CI, 365 days otherwise).\n- **License Type Filtering:** Allows filtering users by license type using `--licensetypes` (e.g., `all-crm`, `all-paying`) or specific license identifiers using `--licenseidentifiers`.\n - `all-crm`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT` licenses.\n - `all-paying`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT`, `PID_Customer_Community`, `PID_Customer_Community_Login`, `PID_Partner_Community`, `PID_Partner_Community_Login` licenses.\n - Note: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/sfdx_cli_reference/sforce_api_objects_userlicense.htm).\n- **Active User Retrieval:** The `--returnactiveusers` flag inverts the command, allowing you to retrieve active users who *have* logged in during the specified period.\n- **CSV Report Generation:** Generates a CSV file containing details of all identified users (inactive or active), including their last login date, profile, and license information.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of inactive or active users.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-users/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query (Bulk API):** It uses `bulkQuery` to efficiently retrieve user records from the Salesforce `User` object. The SOQL query dynamically constructs its WHERE clause based on the `--days`, `--licensetypes`, `--licenseidentifiers`, and `--returnactiveusers` flags.\n- **Interactive Prompts:** Uses `prompts` to interactively ask the user for the number of inactive days and license types if not provided via flags.\n- **License Mapping:** Internally maps common license type aliases (e.g., `all-crm`) to their corresponding Salesforce `LicenseDefinitionKey` values.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of users.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides a summary of the findings in the console, indicating the number of inactive or active users found.\n</details>",
|
|
6907
6869
|
"examples": [
|
|
6908
|
-
"$ sf hardis:org:
|
|
6909
|
-
"$ sf hardis:org:
|
|
6870
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
6871
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6872
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6873
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6874
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6910
6875
|
],
|
|
6911
6876
|
"flags": {
|
|
6912
6877
|
"json": {
|
|
@@ -6924,14 +6889,49 @@
|
|
|
6924
6889
|
"multiple": false,
|
|
6925
6890
|
"type": "option"
|
|
6926
6891
|
},
|
|
6927
|
-
"
|
|
6892
|
+
"outputfile": {
|
|
6893
|
+
"char": "f",
|
|
6894
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6895
|
+
"name": "outputfile",
|
|
6896
|
+
"hasDynamicHelp": false,
|
|
6897
|
+
"multiple": false,
|
|
6898
|
+
"type": "option"
|
|
6899
|
+
},
|
|
6900
|
+
"days": {
|
|
6901
|
+
"char": "t",
|
|
6902
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6903
|
+
"name": "days",
|
|
6904
|
+
"hasDynamicHelp": false,
|
|
6905
|
+
"multiple": false,
|
|
6906
|
+
"type": "option"
|
|
6907
|
+
},
|
|
6908
|
+
"licensetypes": {
|
|
6928
6909
|
"char": "l",
|
|
6929
|
-
"description": "
|
|
6930
|
-
"name": "
|
|
6910
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6911
|
+
"name": "licensetypes",
|
|
6931
6912
|
"hasDynamicHelp": false,
|
|
6932
6913
|
"multiple": false,
|
|
6914
|
+
"options": [
|
|
6915
|
+
"all",
|
|
6916
|
+
"all-crm",
|
|
6917
|
+
"all-paying"
|
|
6918
|
+
],
|
|
6933
6919
|
"type": "option"
|
|
6934
6920
|
},
|
|
6921
|
+
"licenseidentifiers": {
|
|
6922
|
+
"char": "i",
|
|
6923
|
+
"description": "Comma-separated list of license identifiers, in case licensetypes is not used.. Identifiers available at https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm",
|
|
6924
|
+
"name": "licenseidentifiers",
|
|
6925
|
+
"hasDynamicHelp": false,
|
|
6926
|
+
"multiple": false,
|
|
6927
|
+
"type": "option"
|
|
6928
|
+
},
|
|
6929
|
+
"returnactiveusers": {
|
|
6930
|
+
"description": "Inverts the command by returning the active users",
|
|
6931
|
+
"name": "returnactiveusers",
|
|
6932
|
+
"allowNo": false,
|
|
6933
|
+
"type": "boolean"
|
|
6934
|
+
},
|
|
6935
6935
|
"debug": {
|
|
6936
6936
|
"char": "d",
|
|
6937
6937
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6970,49 +6970,49 @@
|
|
|
6970
6970
|
},
|
|
6971
6971
|
"hasDynamicHelp": true,
|
|
6972
6972
|
"hiddenAliases": [],
|
|
6973
|
-
"id": "hardis:org:
|
|
6973
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
6974
6974
|
"pluginAlias": "sfdx-hardis",
|
|
6975
6975
|
"pluginName": "sfdx-hardis",
|
|
6976
6976
|
"pluginType": "core",
|
|
6977
6977
|
"strict": true,
|
|
6978
6978
|
"enableJsonFlag": true,
|
|
6979
|
-
"title": "
|
|
6980
|
-
"requiresProject":
|
|
6979
|
+
"title": "Detect unused Users in Salesforce",
|
|
6980
|
+
"requiresProject": false,
|
|
6981
6981
|
"isESM": true,
|
|
6982
6982
|
"relativePath": [
|
|
6983
6983
|
"lib",
|
|
6984
6984
|
"commands",
|
|
6985
6985
|
"hardis",
|
|
6986
6986
|
"org",
|
|
6987
|
-
"
|
|
6988
|
-
"
|
|
6987
|
+
"diagnose",
|
|
6988
|
+
"unusedusers.js"
|
|
6989
6989
|
],
|
|
6990
6990
|
"aliasPermutations": [],
|
|
6991
6991
|
"permutations": [
|
|
6992
|
-
"hardis:org:
|
|
6993
|
-
"org:hardis:
|
|
6994
|
-
"org:
|
|
6995
|
-
"org:
|
|
6996
|
-
"hardis:
|
|
6997
|
-
"
|
|
6998
|
-
"
|
|
6999
|
-
"
|
|
7000
|
-
"hardis:
|
|
7001
|
-
"
|
|
7002
|
-
"
|
|
7003
|
-
"
|
|
7004
|
-
"hardis:org:
|
|
7005
|
-
"org:hardis:
|
|
7006
|
-
"org:
|
|
7007
|
-
"org:
|
|
7008
|
-
"hardis:
|
|
7009
|
-
"
|
|
7010
|
-
"
|
|
7011
|
-
"
|
|
7012
|
-
"hardis:
|
|
7013
|
-
"
|
|
7014
|
-
"
|
|
7015
|
-
"
|
|
6992
|
+
"hardis:org:diagnose:unusedusers",
|
|
6993
|
+
"org:hardis:diagnose:unusedusers",
|
|
6994
|
+
"org:diagnose:hardis:unusedusers",
|
|
6995
|
+
"org:diagnose:unusedusers:hardis",
|
|
6996
|
+
"hardis:diagnose:org:unusedusers",
|
|
6997
|
+
"diagnose:hardis:org:unusedusers",
|
|
6998
|
+
"diagnose:org:hardis:unusedusers",
|
|
6999
|
+
"diagnose:org:unusedusers:hardis",
|
|
7000
|
+
"hardis:diagnose:unusedusers:org",
|
|
7001
|
+
"diagnose:hardis:unusedusers:org",
|
|
7002
|
+
"diagnose:unusedusers:hardis:org",
|
|
7003
|
+
"diagnose:unusedusers:org:hardis",
|
|
7004
|
+
"hardis:org:unusedusers:diagnose",
|
|
7005
|
+
"org:hardis:unusedusers:diagnose",
|
|
7006
|
+
"org:unusedusers:hardis:diagnose",
|
|
7007
|
+
"org:unusedusers:diagnose:hardis",
|
|
7008
|
+
"hardis:unusedusers:org:diagnose",
|
|
7009
|
+
"unusedusers:hardis:org:diagnose",
|
|
7010
|
+
"unusedusers:org:hardis:diagnose",
|
|
7011
|
+
"unusedusers:org:diagnose:hardis",
|
|
7012
|
+
"hardis:unusedusers:diagnose:org",
|
|
7013
|
+
"unusedusers:hardis:diagnose:org",
|
|
7014
|
+
"unusedusers:diagnose:hardis:org",
|
|
7015
|
+
"unusedusers:diagnose:org:hardis"
|
|
7016
7016
|
]
|
|
7017
7017
|
},
|
|
7018
7018
|
"hardis:org:generate:packagexmlfull": {
|
|
@@ -9513,6 +9513,238 @@
|
|
|
9513
9513
|
"remotesites:audit:project:hardis"
|
|
9514
9514
|
]
|
|
9515
9515
|
},
|
|
9516
|
+
"hardis:project:configure:auth": {
|
|
9517
|
+
"aliases": [],
|
|
9518
|
+
"args": {},
|
|
9519
|
+
"description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
|
|
9520
|
+
"examples": [
|
|
9521
|
+
"$ sf hardis:project:configure:auth"
|
|
9522
|
+
],
|
|
9523
|
+
"flags": {
|
|
9524
|
+
"json": {
|
|
9525
|
+
"description": "Format output as json.",
|
|
9526
|
+
"helpGroup": "GLOBAL",
|
|
9527
|
+
"name": "json",
|
|
9528
|
+
"allowNo": false,
|
|
9529
|
+
"type": "boolean"
|
|
9530
|
+
},
|
|
9531
|
+
"flags-dir": {
|
|
9532
|
+
"helpGroup": "GLOBAL",
|
|
9533
|
+
"name": "flags-dir",
|
|
9534
|
+
"summary": "Import flag values from a directory.",
|
|
9535
|
+
"hasDynamicHelp": false,
|
|
9536
|
+
"multiple": false,
|
|
9537
|
+
"type": "option"
|
|
9538
|
+
},
|
|
9539
|
+
"devhub": {
|
|
9540
|
+
"char": "b",
|
|
9541
|
+
"description": "Configure project DevHub",
|
|
9542
|
+
"name": "devhub",
|
|
9543
|
+
"allowNo": false,
|
|
9544
|
+
"type": "boolean"
|
|
9545
|
+
},
|
|
9546
|
+
"debug": {
|
|
9547
|
+
"char": "d",
|
|
9548
|
+
"description": "Activate debug mode (more logs)",
|
|
9549
|
+
"name": "debug",
|
|
9550
|
+
"allowNo": false,
|
|
9551
|
+
"type": "boolean"
|
|
9552
|
+
},
|
|
9553
|
+
"websocket": {
|
|
9554
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9555
|
+
"name": "websocket",
|
|
9556
|
+
"hasDynamicHelp": false,
|
|
9557
|
+
"multiple": false,
|
|
9558
|
+
"type": "option"
|
|
9559
|
+
},
|
|
9560
|
+
"skipauth": {
|
|
9561
|
+
"description": "Skip authentication check when a default username is required",
|
|
9562
|
+
"name": "skipauth",
|
|
9563
|
+
"allowNo": false,
|
|
9564
|
+
"type": "boolean"
|
|
9565
|
+
},
|
|
9566
|
+
"target-org": {
|
|
9567
|
+
"aliases": [
|
|
9568
|
+
"targetusername",
|
|
9569
|
+
"u"
|
|
9570
|
+
],
|
|
9571
|
+
"char": "o",
|
|
9572
|
+
"deprecateAliases": true,
|
|
9573
|
+
"name": "target-org",
|
|
9574
|
+
"noCacheDefault": true,
|
|
9575
|
+
"summary": "Username or alias of the target org.",
|
|
9576
|
+
"hasDynamicHelp": true,
|
|
9577
|
+
"multiple": false,
|
|
9578
|
+
"type": "option"
|
|
9579
|
+
},
|
|
9580
|
+
"target-dev-hub": {
|
|
9581
|
+
"aliases": [
|
|
9582
|
+
"targetdevhubusername"
|
|
9583
|
+
],
|
|
9584
|
+
"char": "v",
|
|
9585
|
+
"deprecateAliases": true,
|
|
9586
|
+
"name": "target-dev-hub",
|
|
9587
|
+
"noCacheDefault": true,
|
|
9588
|
+
"required": false,
|
|
9589
|
+
"summary": "Username or alias of the Dev Hub org.",
|
|
9590
|
+
"hasDynamicHelp": true,
|
|
9591
|
+
"multiple": false,
|
|
9592
|
+
"type": "option"
|
|
9593
|
+
}
|
|
9594
|
+
},
|
|
9595
|
+
"hasDynamicHelp": true,
|
|
9596
|
+
"hiddenAliases": [],
|
|
9597
|
+
"id": "hardis:project:configure:auth",
|
|
9598
|
+
"pluginAlias": "sfdx-hardis",
|
|
9599
|
+
"pluginName": "sfdx-hardis",
|
|
9600
|
+
"pluginType": "core",
|
|
9601
|
+
"strict": true,
|
|
9602
|
+
"enableJsonFlag": true,
|
|
9603
|
+
"title": "Configure authentication",
|
|
9604
|
+
"requiresProject": false,
|
|
9605
|
+
"requiresDependencies": [
|
|
9606
|
+
"openssl"
|
|
9607
|
+
],
|
|
9608
|
+
"isESM": true,
|
|
9609
|
+
"relativePath": [
|
|
9610
|
+
"lib",
|
|
9611
|
+
"commands",
|
|
9612
|
+
"hardis",
|
|
9613
|
+
"project",
|
|
9614
|
+
"configure",
|
|
9615
|
+
"auth.js"
|
|
9616
|
+
],
|
|
9617
|
+
"aliasPermutations": [],
|
|
9618
|
+
"permutations": [
|
|
9619
|
+
"hardis:project:configure:auth",
|
|
9620
|
+
"project:hardis:configure:auth",
|
|
9621
|
+
"project:configure:hardis:auth",
|
|
9622
|
+
"project:configure:auth:hardis",
|
|
9623
|
+
"hardis:configure:project:auth",
|
|
9624
|
+
"configure:hardis:project:auth",
|
|
9625
|
+
"configure:project:hardis:auth",
|
|
9626
|
+
"configure:project:auth:hardis",
|
|
9627
|
+
"hardis:configure:auth:project",
|
|
9628
|
+
"configure:hardis:auth:project",
|
|
9629
|
+
"configure:auth:hardis:project",
|
|
9630
|
+
"configure:auth:project:hardis",
|
|
9631
|
+
"hardis:project:auth:configure",
|
|
9632
|
+
"project:hardis:auth:configure",
|
|
9633
|
+
"project:auth:hardis:configure",
|
|
9634
|
+
"project:auth:configure:hardis",
|
|
9635
|
+
"hardis:auth:project:configure",
|
|
9636
|
+
"auth:hardis:project:configure",
|
|
9637
|
+
"auth:project:hardis:configure",
|
|
9638
|
+
"auth:project:configure:hardis",
|
|
9639
|
+
"hardis:auth:configure:project",
|
|
9640
|
+
"auth:hardis:configure:project",
|
|
9641
|
+
"auth:configure:hardis:project",
|
|
9642
|
+
"auth:configure:project:hardis"
|
|
9643
|
+
]
|
|
9644
|
+
},
|
|
9645
|
+
"hardis:project:convert:profilestopermsets": {
|
|
9646
|
+
"aliases": [],
|
|
9647
|
+
"args": {},
|
|
9648
|
+
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
9649
|
+
"examples": [
|
|
9650
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
9651
|
+
],
|
|
9652
|
+
"flags": {
|
|
9653
|
+
"json": {
|
|
9654
|
+
"description": "Format output as json.",
|
|
9655
|
+
"helpGroup": "GLOBAL",
|
|
9656
|
+
"name": "json",
|
|
9657
|
+
"allowNo": false,
|
|
9658
|
+
"type": "boolean"
|
|
9659
|
+
},
|
|
9660
|
+
"flags-dir": {
|
|
9661
|
+
"helpGroup": "GLOBAL",
|
|
9662
|
+
"name": "flags-dir",
|
|
9663
|
+
"summary": "Import flag values from a directory.",
|
|
9664
|
+
"hasDynamicHelp": false,
|
|
9665
|
+
"multiple": false,
|
|
9666
|
+
"type": "option"
|
|
9667
|
+
},
|
|
9668
|
+
"except": {
|
|
9669
|
+
"char": "e",
|
|
9670
|
+
"description": "List of filters",
|
|
9671
|
+
"name": "except",
|
|
9672
|
+
"default": [],
|
|
9673
|
+
"hasDynamicHelp": false,
|
|
9674
|
+
"multiple": true,
|
|
9675
|
+
"type": "option"
|
|
9676
|
+
},
|
|
9677
|
+
"debug": {
|
|
9678
|
+
"char": "d",
|
|
9679
|
+
"description": "Activate debug mode (more logs)",
|
|
9680
|
+
"name": "debug",
|
|
9681
|
+
"allowNo": false,
|
|
9682
|
+
"type": "boolean"
|
|
9683
|
+
},
|
|
9684
|
+
"websocket": {
|
|
9685
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9686
|
+
"name": "websocket",
|
|
9687
|
+
"hasDynamicHelp": false,
|
|
9688
|
+
"multiple": false,
|
|
9689
|
+
"type": "option"
|
|
9690
|
+
},
|
|
9691
|
+
"skipauth": {
|
|
9692
|
+
"description": "Skip authentication check when a default username is required",
|
|
9693
|
+
"name": "skipauth",
|
|
9694
|
+
"allowNo": false,
|
|
9695
|
+
"type": "boolean"
|
|
9696
|
+
}
|
|
9697
|
+
},
|
|
9698
|
+
"hasDynamicHelp": false,
|
|
9699
|
+
"hiddenAliases": [],
|
|
9700
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
9701
|
+
"pluginAlias": "sfdx-hardis",
|
|
9702
|
+
"pluginName": "sfdx-hardis",
|
|
9703
|
+
"pluginType": "core",
|
|
9704
|
+
"strict": true,
|
|
9705
|
+
"enableJsonFlag": true,
|
|
9706
|
+
"title": "Convert Profiles into Permission Sets",
|
|
9707
|
+
"requiresProject": true,
|
|
9708
|
+
"requiresSfdxPlugins": [
|
|
9709
|
+
"shane-sfdx-plugins"
|
|
9710
|
+
],
|
|
9711
|
+
"isESM": true,
|
|
9712
|
+
"relativePath": [
|
|
9713
|
+
"lib",
|
|
9714
|
+
"commands",
|
|
9715
|
+
"hardis",
|
|
9716
|
+
"project",
|
|
9717
|
+
"convert",
|
|
9718
|
+
"profilestopermsets.js"
|
|
9719
|
+
],
|
|
9720
|
+
"aliasPermutations": [],
|
|
9721
|
+
"permutations": [
|
|
9722
|
+
"hardis:project:convert:profilestopermsets",
|
|
9723
|
+
"project:hardis:convert:profilestopermsets",
|
|
9724
|
+
"project:convert:hardis:profilestopermsets",
|
|
9725
|
+
"project:convert:profilestopermsets:hardis",
|
|
9726
|
+
"hardis:convert:project:profilestopermsets",
|
|
9727
|
+
"convert:hardis:project:profilestopermsets",
|
|
9728
|
+
"convert:project:hardis:profilestopermsets",
|
|
9729
|
+
"convert:project:profilestopermsets:hardis",
|
|
9730
|
+
"hardis:convert:profilestopermsets:project",
|
|
9731
|
+
"convert:hardis:profilestopermsets:project",
|
|
9732
|
+
"convert:profilestopermsets:hardis:project",
|
|
9733
|
+
"convert:profilestopermsets:project:hardis",
|
|
9734
|
+
"hardis:project:profilestopermsets:convert",
|
|
9735
|
+
"project:hardis:profilestopermsets:convert",
|
|
9736
|
+
"project:profilestopermsets:hardis:convert",
|
|
9737
|
+
"project:profilestopermsets:convert:hardis",
|
|
9738
|
+
"hardis:profilestopermsets:project:convert",
|
|
9739
|
+
"profilestopermsets:hardis:project:convert",
|
|
9740
|
+
"profilestopermsets:project:hardis:convert",
|
|
9741
|
+
"profilestopermsets:project:convert:hardis",
|
|
9742
|
+
"hardis:profilestopermsets:convert:project",
|
|
9743
|
+
"profilestopermsets:hardis:convert:project",
|
|
9744
|
+
"profilestopermsets:convert:hardis:project",
|
|
9745
|
+
"profilestopermsets:convert:project:hardis"
|
|
9746
|
+
]
|
|
9747
|
+
},
|
|
9516
9748
|
"hardis:project:clean:emptyitems": {
|
|
9517
9749
|
"aliases": [],
|
|
9518
9750
|
"args": {},
|
|
@@ -10998,238 +11230,6 @@
|
|
|
10998
11230
|
"xml:clean:project:hardis"
|
|
10999
11231
|
]
|
|
11000
11232
|
},
|
|
11001
|
-
"hardis:project:configure:auth": {
|
|
11002
|
-
"aliases": [],
|
|
11003
|
-
"args": {},
|
|
11004
|
-
"description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
|
|
11005
|
-
"examples": [
|
|
11006
|
-
"$ sf hardis:project:configure:auth"
|
|
11007
|
-
],
|
|
11008
|
-
"flags": {
|
|
11009
|
-
"json": {
|
|
11010
|
-
"description": "Format output as json.",
|
|
11011
|
-
"helpGroup": "GLOBAL",
|
|
11012
|
-
"name": "json",
|
|
11013
|
-
"allowNo": false,
|
|
11014
|
-
"type": "boolean"
|
|
11015
|
-
},
|
|
11016
|
-
"flags-dir": {
|
|
11017
|
-
"helpGroup": "GLOBAL",
|
|
11018
|
-
"name": "flags-dir",
|
|
11019
|
-
"summary": "Import flag values from a directory.",
|
|
11020
|
-
"hasDynamicHelp": false,
|
|
11021
|
-
"multiple": false,
|
|
11022
|
-
"type": "option"
|
|
11023
|
-
},
|
|
11024
|
-
"devhub": {
|
|
11025
|
-
"char": "b",
|
|
11026
|
-
"description": "Configure project DevHub",
|
|
11027
|
-
"name": "devhub",
|
|
11028
|
-
"allowNo": false,
|
|
11029
|
-
"type": "boolean"
|
|
11030
|
-
},
|
|
11031
|
-
"debug": {
|
|
11032
|
-
"char": "d",
|
|
11033
|
-
"description": "Activate debug mode (more logs)",
|
|
11034
|
-
"name": "debug",
|
|
11035
|
-
"allowNo": false,
|
|
11036
|
-
"type": "boolean"
|
|
11037
|
-
},
|
|
11038
|
-
"websocket": {
|
|
11039
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11040
|
-
"name": "websocket",
|
|
11041
|
-
"hasDynamicHelp": false,
|
|
11042
|
-
"multiple": false,
|
|
11043
|
-
"type": "option"
|
|
11044
|
-
},
|
|
11045
|
-
"skipauth": {
|
|
11046
|
-
"description": "Skip authentication check when a default username is required",
|
|
11047
|
-
"name": "skipauth",
|
|
11048
|
-
"allowNo": false,
|
|
11049
|
-
"type": "boolean"
|
|
11050
|
-
},
|
|
11051
|
-
"target-org": {
|
|
11052
|
-
"aliases": [
|
|
11053
|
-
"targetusername",
|
|
11054
|
-
"u"
|
|
11055
|
-
],
|
|
11056
|
-
"char": "o",
|
|
11057
|
-
"deprecateAliases": true,
|
|
11058
|
-
"name": "target-org",
|
|
11059
|
-
"noCacheDefault": true,
|
|
11060
|
-
"summary": "Username or alias of the target org.",
|
|
11061
|
-
"hasDynamicHelp": true,
|
|
11062
|
-
"multiple": false,
|
|
11063
|
-
"type": "option"
|
|
11064
|
-
},
|
|
11065
|
-
"target-dev-hub": {
|
|
11066
|
-
"aliases": [
|
|
11067
|
-
"targetdevhubusername"
|
|
11068
|
-
],
|
|
11069
|
-
"char": "v",
|
|
11070
|
-
"deprecateAliases": true,
|
|
11071
|
-
"name": "target-dev-hub",
|
|
11072
|
-
"noCacheDefault": true,
|
|
11073
|
-
"required": false,
|
|
11074
|
-
"summary": "Username or alias of the Dev Hub org.",
|
|
11075
|
-
"hasDynamicHelp": true,
|
|
11076
|
-
"multiple": false,
|
|
11077
|
-
"type": "option"
|
|
11078
|
-
}
|
|
11079
|
-
},
|
|
11080
|
-
"hasDynamicHelp": true,
|
|
11081
|
-
"hiddenAliases": [],
|
|
11082
|
-
"id": "hardis:project:configure:auth",
|
|
11083
|
-
"pluginAlias": "sfdx-hardis",
|
|
11084
|
-
"pluginName": "sfdx-hardis",
|
|
11085
|
-
"pluginType": "core",
|
|
11086
|
-
"strict": true,
|
|
11087
|
-
"enableJsonFlag": true,
|
|
11088
|
-
"title": "Configure authentication",
|
|
11089
|
-
"requiresProject": false,
|
|
11090
|
-
"requiresDependencies": [
|
|
11091
|
-
"openssl"
|
|
11092
|
-
],
|
|
11093
|
-
"isESM": true,
|
|
11094
|
-
"relativePath": [
|
|
11095
|
-
"lib",
|
|
11096
|
-
"commands",
|
|
11097
|
-
"hardis",
|
|
11098
|
-
"project",
|
|
11099
|
-
"configure",
|
|
11100
|
-
"auth.js"
|
|
11101
|
-
],
|
|
11102
|
-
"aliasPermutations": [],
|
|
11103
|
-
"permutations": [
|
|
11104
|
-
"hardis:project:configure:auth",
|
|
11105
|
-
"project:hardis:configure:auth",
|
|
11106
|
-
"project:configure:hardis:auth",
|
|
11107
|
-
"project:configure:auth:hardis",
|
|
11108
|
-
"hardis:configure:project:auth",
|
|
11109
|
-
"configure:hardis:project:auth",
|
|
11110
|
-
"configure:project:hardis:auth",
|
|
11111
|
-
"configure:project:auth:hardis",
|
|
11112
|
-
"hardis:configure:auth:project",
|
|
11113
|
-
"configure:hardis:auth:project",
|
|
11114
|
-
"configure:auth:hardis:project",
|
|
11115
|
-
"configure:auth:project:hardis",
|
|
11116
|
-
"hardis:project:auth:configure",
|
|
11117
|
-
"project:hardis:auth:configure",
|
|
11118
|
-
"project:auth:hardis:configure",
|
|
11119
|
-
"project:auth:configure:hardis",
|
|
11120
|
-
"hardis:auth:project:configure",
|
|
11121
|
-
"auth:hardis:project:configure",
|
|
11122
|
-
"auth:project:hardis:configure",
|
|
11123
|
-
"auth:project:configure:hardis",
|
|
11124
|
-
"hardis:auth:configure:project",
|
|
11125
|
-
"auth:hardis:configure:project",
|
|
11126
|
-
"auth:configure:hardis:project",
|
|
11127
|
-
"auth:configure:project:hardis"
|
|
11128
|
-
]
|
|
11129
|
-
},
|
|
11130
|
-
"hardis:project:convert:profilestopermsets": {
|
|
11131
|
-
"aliases": [],
|
|
11132
|
-
"args": {},
|
|
11133
|
-
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
11134
|
-
"examples": [
|
|
11135
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
11136
|
-
],
|
|
11137
|
-
"flags": {
|
|
11138
|
-
"json": {
|
|
11139
|
-
"description": "Format output as json.",
|
|
11140
|
-
"helpGroup": "GLOBAL",
|
|
11141
|
-
"name": "json",
|
|
11142
|
-
"allowNo": false,
|
|
11143
|
-
"type": "boolean"
|
|
11144
|
-
},
|
|
11145
|
-
"flags-dir": {
|
|
11146
|
-
"helpGroup": "GLOBAL",
|
|
11147
|
-
"name": "flags-dir",
|
|
11148
|
-
"summary": "Import flag values from a directory.",
|
|
11149
|
-
"hasDynamicHelp": false,
|
|
11150
|
-
"multiple": false,
|
|
11151
|
-
"type": "option"
|
|
11152
|
-
},
|
|
11153
|
-
"except": {
|
|
11154
|
-
"char": "e",
|
|
11155
|
-
"description": "List of filters",
|
|
11156
|
-
"name": "except",
|
|
11157
|
-
"default": [],
|
|
11158
|
-
"hasDynamicHelp": false,
|
|
11159
|
-
"multiple": true,
|
|
11160
|
-
"type": "option"
|
|
11161
|
-
},
|
|
11162
|
-
"debug": {
|
|
11163
|
-
"char": "d",
|
|
11164
|
-
"description": "Activate debug mode (more logs)",
|
|
11165
|
-
"name": "debug",
|
|
11166
|
-
"allowNo": false,
|
|
11167
|
-
"type": "boolean"
|
|
11168
|
-
},
|
|
11169
|
-
"websocket": {
|
|
11170
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11171
|
-
"name": "websocket",
|
|
11172
|
-
"hasDynamicHelp": false,
|
|
11173
|
-
"multiple": false,
|
|
11174
|
-
"type": "option"
|
|
11175
|
-
},
|
|
11176
|
-
"skipauth": {
|
|
11177
|
-
"description": "Skip authentication check when a default username is required",
|
|
11178
|
-
"name": "skipauth",
|
|
11179
|
-
"allowNo": false,
|
|
11180
|
-
"type": "boolean"
|
|
11181
|
-
}
|
|
11182
|
-
},
|
|
11183
|
-
"hasDynamicHelp": false,
|
|
11184
|
-
"hiddenAliases": [],
|
|
11185
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
11186
|
-
"pluginAlias": "sfdx-hardis",
|
|
11187
|
-
"pluginName": "sfdx-hardis",
|
|
11188
|
-
"pluginType": "core",
|
|
11189
|
-
"strict": true,
|
|
11190
|
-
"enableJsonFlag": true,
|
|
11191
|
-
"title": "Convert Profiles into Permission Sets",
|
|
11192
|
-
"requiresProject": true,
|
|
11193
|
-
"requiresSfdxPlugins": [
|
|
11194
|
-
"shane-sfdx-plugins"
|
|
11195
|
-
],
|
|
11196
|
-
"isESM": true,
|
|
11197
|
-
"relativePath": [
|
|
11198
|
-
"lib",
|
|
11199
|
-
"commands",
|
|
11200
|
-
"hardis",
|
|
11201
|
-
"project",
|
|
11202
|
-
"convert",
|
|
11203
|
-
"profilestopermsets.js"
|
|
11204
|
-
],
|
|
11205
|
-
"aliasPermutations": [],
|
|
11206
|
-
"permutations": [
|
|
11207
|
-
"hardis:project:convert:profilestopermsets",
|
|
11208
|
-
"project:hardis:convert:profilestopermsets",
|
|
11209
|
-
"project:convert:hardis:profilestopermsets",
|
|
11210
|
-
"project:convert:profilestopermsets:hardis",
|
|
11211
|
-
"hardis:convert:project:profilestopermsets",
|
|
11212
|
-
"convert:hardis:project:profilestopermsets",
|
|
11213
|
-
"convert:project:hardis:profilestopermsets",
|
|
11214
|
-
"convert:project:profilestopermsets:hardis",
|
|
11215
|
-
"hardis:convert:profilestopermsets:project",
|
|
11216
|
-
"convert:hardis:profilestopermsets:project",
|
|
11217
|
-
"convert:profilestopermsets:hardis:project",
|
|
11218
|
-
"convert:profilestopermsets:project:hardis",
|
|
11219
|
-
"hardis:project:profilestopermsets:convert",
|
|
11220
|
-
"project:hardis:profilestopermsets:convert",
|
|
11221
|
-
"project:profilestopermsets:hardis:convert",
|
|
11222
|
-
"project:profilestopermsets:convert:hardis",
|
|
11223
|
-
"hardis:profilestopermsets:project:convert",
|
|
11224
|
-
"profilestopermsets:hardis:project:convert",
|
|
11225
|
-
"profilestopermsets:project:hardis:convert",
|
|
11226
|
-
"profilestopermsets:project:convert:hardis",
|
|
11227
|
-
"hardis:profilestopermsets:convert:project",
|
|
11228
|
-
"profilestopermsets:hardis:convert:project",
|
|
11229
|
-
"profilestopermsets:convert:hardis:project",
|
|
11230
|
-
"profilestopermsets:convert:project:hardis"
|
|
11231
|
-
]
|
|
11232
|
-
},
|
|
11233
11233
|
"hardis:project:deploy:notify": {
|
|
11234
11234
|
"aliases": [],
|
|
11235
11235
|
"args": {},
|
|
@@ -15102,5 +15102,5 @@
|
|
|
15102
15102
|
]
|
|
15103
15103
|
}
|
|
15104
15104
|
},
|
|
15105
|
-
"version": "6.1.0"
|
|
15105
|
+
"version": "6.1.1-beta202508240003.0"
|
|
15106
15106
|
}
|