sfdx-hardis 6.5.1 → 6.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/lib/common/utils/orgUtils.js +4 -1
- package/lib/common/utils/orgUtils.js.map +1 -1
- package/oclif.manifest.json +1005 -1005
- 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": {
|
|
@@ -5152,15 +5152,12 @@
|
|
|
5152
5152
|
"monitoring:configure:org:hardis"
|
|
5153
5153
|
]
|
|
5154
5154
|
},
|
|
5155
|
-
"hardis:org:
|
|
5155
|
+
"hardis:org:data:delete": {
|
|
5156
5156
|
"aliases": [],
|
|
5157
5157
|
"args": {},
|
|
5158
|
-
"description": "
|
|
5158
|
+
"description": "\n## Command Behavior\n\n**Deletes records in multiple Salesforce objects using an SFDMU (Salesforce Data Migration Utility) workspace.**\n\nThis command provides a powerful and controlled way to remove data from your Salesforce orgs based on configurations defined in an SFDMU workspace. It's particularly useful for:\n\n- **Data Cleanup:** Removing test data, obsolete records, or sensitive information.\n- **Environment Reset:** Preparing sandboxes for new development cycles by clearing specific data sets.\n- **Compliance:** Deleting data to meet regulatory requirements.\n\n**Important Considerations for Production Environments:**\n\nIf you intend to run this command in a production environment, you must:\n\n- Set `runnableInProduction` to `true` in your `export.json` file within the SFDMU workspace.\n- Define `sfdmuCanModify: YOUR_INSTANCE_URL` in your branch-specific configuration file (e.g., `config/branches/.sfdx-hardis.YOUR_BRANCH.yml`) to explicitly authorize data modification for that instance.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation relies heavily on the SFDMU plugin:\n\n- **SFDMU Integration:** It leverages the `sfdmu` plugin to perform the actual data deletion operations. The command acts as a wrapper, providing an assisted interface for SFDMU execution.\n- **Workspace Selection:** If the SFDMU workspace path is not provided via the `--path` flag, it interactively prompts the user to select a data workspace using `selectDataWorkspace`.\n- **Org Selection:** It ensures that a target Salesforce org is selected (either via the `--target-org` flag or through an interactive prompt using `promptOrgUsernameDefault`) to specify where the data deletion will occur.\n- **`deleteData` Utility:** The core logic for executing the SFDMU deletion process is encapsulated within the `deleteData` utility function, which takes the SFDMU workspace path and the target username as arguments.\n- **Environment Awareness:** It checks the `isCI` flag to determine whether to run in an interactive mode (prompting for user input) or a non-interactive mode (relying solely on command-line flags).\n- **Required Plugin:** It explicitly lists `sfdmu` as a required plugin, ensuring that the necessary dependency is in place before execution.\n</details>\n",
|
|
5159
5159
|
"examples": [
|
|
5160
|
-
"$ sf hardis:org:
|
|
5161
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5162
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5163
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5160
|
+
"$ sf hardis:org:data:delete"
|
|
5164
5161
|
],
|
|
5165
5162
|
"flags": {
|
|
5166
5163
|
"json": {
|
|
@@ -5178,26 +5175,10 @@
|
|
|
5178
5175
|
"multiple": false,
|
|
5179
5176
|
"type": "option"
|
|
5180
5177
|
},
|
|
5181
|
-
"
|
|
5182
|
-
"char": "
|
|
5183
|
-
"description": "
|
|
5184
|
-
"name": "
|
|
5185
|
-
"hasDynamicHelp": false,
|
|
5186
|
-
"multiple": false,
|
|
5187
|
-
"type": "option"
|
|
5188
|
-
},
|
|
5189
|
-
"lastndays": {
|
|
5190
|
-
"char": "t",
|
|
5191
|
-
"description": "Number of days to extract from today (included)",
|
|
5192
|
-
"name": "lastndays",
|
|
5193
|
-
"hasDynamicHelp": false,
|
|
5194
|
-
"multiple": false,
|
|
5195
|
-
"type": "option"
|
|
5196
|
-
},
|
|
5197
|
-
"outputfile": {
|
|
5198
|
-
"char": "f",
|
|
5199
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5200
|
-
"name": "outputfile",
|
|
5178
|
+
"path": {
|
|
5179
|
+
"char": "p",
|
|
5180
|
+
"description": "Path to the sfdmu workspace folder",
|
|
5181
|
+
"name": "path",
|
|
5201
5182
|
"hasDynamicHelp": false,
|
|
5202
5183
|
"multiple": false,
|
|
5203
5184
|
"type": "option"
|
|
@@ -5240,57 +5221,62 @@
|
|
|
5240
5221
|
},
|
|
5241
5222
|
"hasDynamicHelp": true,
|
|
5242
5223
|
"hiddenAliases": [],
|
|
5243
|
-
"id": "hardis:org:
|
|
5224
|
+
"id": "hardis:org:data:delete",
|
|
5244
5225
|
"pluginAlias": "sfdx-hardis",
|
|
5245
5226
|
"pluginName": "sfdx-hardis",
|
|
5246
5227
|
"pluginType": "core",
|
|
5247
5228
|
"strict": true,
|
|
5248
5229
|
"enableJsonFlag": true,
|
|
5249
|
-
"title": "
|
|
5230
|
+
"title": "Delete data",
|
|
5250
5231
|
"requiresProject": false,
|
|
5232
|
+
"requiresSfdxPlugins": [
|
|
5233
|
+
"sfdmu"
|
|
5234
|
+
],
|
|
5251
5235
|
"isESM": true,
|
|
5252
5236
|
"relativePath": [
|
|
5253
5237
|
"lib",
|
|
5254
5238
|
"commands",
|
|
5255
5239
|
"hardis",
|
|
5256
5240
|
"org",
|
|
5257
|
-
"
|
|
5258
|
-
"
|
|
5241
|
+
"data",
|
|
5242
|
+
"delete.js"
|
|
5259
5243
|
],
|
|
5260
5244
|
"aliasPermutations": [],
|
|
5261
5245
|
"permutations": [
|
|
5262
|
-
"hardis:org:
|
|
5263
|
-
"org:hardis:
|
|
5264
|
-
"org:
|
|
5265
|
-
"org:
|
|
5266
|
-
"hardis:
|
|
5267
|
-
"
|
|
5268
|
-
"
|
|
5269
|
-
"
|
|
5270
|
-
"hardis:
|
|
5271
|
-
"
|
|
5272
|
-
"
|
|
5273
|
-
"
|
|
5274
|
-
"hardis:org:
|
|
5275
|
-
"org:hardis:
|
|
5276
|
-
"org:
|
|
5277
|
-
"org:
|
|
5278
|
-
"hardis:
|
|
5279
|
-
"
|
|
5280
|
-
"
|
|
5281
|
-
"
|
|
5282
|
-
"hardis:
|
|
5283
|
-
"
|
|
5284
|
-
"
|
|
5285
|
-
"
|
|
5246
|
+
"hardis:org:data:delete",
|
|
5247
|
+
"org:hardis:data:delete",
|
|
5248
|
+
"org:data:hardis:delete",
|
|
5249
|
+
"org:data:delete:hardis",
|
|
5250
|
+
"hardis:data:org:delete",
|
|
5251
|
+
"data:hardis:org:delete",
|
|
5252
|
+
"data:org:hardis:delete",
|
|
5253
|
+
"data:org:delete:hardis",
|
|
5254
|
+
"hardis:data:delete:org",
|
|
5255
|
+
"data:hardis:delete:org",
|
|
5256
|
+
"data:delete:hardis:org",
|
|
5257
|
+
"data:delete:org:hardis",
|
|
5258
|
+
"hardis:org:delete:data",
|
|
5259
|
+
"org:hardis:delete:data",
|
|
5260
|
+
"org:delete:hardis:data",
|
|
5261
|
+
"org:delete:data:hardis",
|
|
5262
|
+
"hardis:delete:org:data",
|
|
5263
|
+
"delete:hardis:org:data",
|
|
5264
|
+
"delete:org:hardis:data",
|
|
5265
|
+
"delete:org:data:hardis",
|
|
5266
|
+
"hardis:delete:data:org",
|
|
5267
|
+
"delete:hardis:data:org",
|
|
5268
|
+
"delete:data:hardis:org",
|
|
5269
|
+
"delete:data:org:hardis"
|
|
5286
5270
|
]
|
|
5287
5271
|
},
|
|
5288
|
-
"hardis:org:
|
|
5272
|
+
"hardis:org:data:export": {
|
|
5289
5273
|
"aliases": [],
|
|
5290
5274
|
"args": {},
|
|
5291
|
-
"description": "\n## Command Behavior\n\n**
|
|
5275
|
+
"description": "\n## Command Behavior\n\n**Exports data from a Salesforce org using an SFDMU (Salesforce Data Migration Utility) project.**\n\nThis command facilitates the extraction of data from your Salesforce environments based on configurations defined in an SFDMU workspace. It's a powerful tool for various data-related tasks, including:\n\n- **Data Backup:** Creating snapshots of your Salesforce data.\n- **Data Migration:** Extracting data for transfer to another Salesforce org or external system.\n- **Reporting and Analysis:** Exporting specific datasets for detailed analysis outside of Salesforce.\n- **Data Seeding:** Preparing data for import into other environments.\n\nKey functionalities:\n\n- **SFDMU Workspace Integration:** Leverages an existing SFDMU workspace (defined by an `export.json` file) to determine which objects and records to export, along with any filtering or transformation rules.\n- **Interactive Workspace Selection:** If the SFDMU workspace path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Org Selection:** Ensures that a target Salesforce org is selected (either via the `--target-org` flag or through an interactive prompt) to specify the source of the data export.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-detect-bad-words-in-salesforce-records-using-sfdx-data-loader-and-sfdx-hardis-171db40a9bac)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation relies heavily on the SFDMU plugin:\n\n- **SFDMU Integration:** It acts as a wrapper around the `sfdmu` plugin, which performs the actual data export operations. The command provides an assisted interface for SFDMU execution.\n- **`exportData` Utility:** The core logic for executing the SFDMU export process is encapsulated within the `exportData` utility function, which takes the SFDMU workspace path and the source username as arguments.\n- **Interactive Prompts:** Uses `selectDataWorkspace` to allow the user to choose an SFDMU project and `promptOrgUsernameDefault` for selecting the source Salesforce org when not running in a CI environment.\n- **Environment Awareness:** Checks the `isCI` flag to determine whether to run in an interactive mode (prompting for user input) or a non-interactive mode (relying solely on command-line flags).\n- **Required Plugin:** It explicitly lists `sfdmu` as a required plugin, ensuring that the necessary dependency is in place before execution.\n</details>\n",
|
|
5292
5276
|
"examples": [
|
|
5293
|
-
"$ sf hardis:org:
|
|
5277
|
+
"$ sf hardis:org:data:export",
|
|
5278
|
+
"$ sf hardis:org:data:export --project-name MyDataProject --target-org my-org@example.com",
|
|
5279
|
+
"$ sf hardis:org:data:export --path ./scripts/data/MyDataProject --no-prompt --target-org my-org@example.com"
|
|
5294
5280
|
],
|
|
5295
5281
|
"flags": {
|
|
5296
5282
|
"json": {
|
|
@@ -5308,12 +5294,35 @@
|
|
|
5308
5294
|
"multiple": false,
|
|
5309
5295
|
"type": "option"
|
|
5310
5296
|
},
|
|
5311
|
-
"
|
|
5312
|
-
"char": "
|
|
5313
|
-
"description": "
|
|
5314
|
-
"name": "
|
|
5315
|
-
"
|
|
5316
|
-
"
|
|
5297
|
+
"project-name": {
|
|
5298
|
+
"char": "n",
|
|
5299
|
+
"description": "Name of the sfdmu project to use (if not defined, you will be prompted to select one)",
|
|
5300
|
+
"name": "project-name",
|
|
5301
|
+
"hasDynamicHelp": false,
|
|
5302
|
+
"multiple": false,
|
|
5303
|
+
"type": "option"
|
|
5304
|
+
},
|
|
5305
|
+
"path": {
|
|
5306
|
+
"char": "p",
|
|
5307
|
+
"description": "Path to the sfdmu workspace folder",
|
|
5308
|
+
"name": "path",
|
|
5309
|
+
"hasDynamicHelp": false,
|
|
5310
|
+
"multiple": false,
|
|
5311
|
+
"type": "option"
|
|
5312
|
+
},
|
|
5313
|
+
"no-prompt": {
|
|
5314
|
+
"char": "r",
|
|
5315
|
+
"description": "Do not prompt for Org, use default org",
|
|
5316
|
+
"name": "no-prompt",
|
|
5317
|
+
"allowNo": false,
|
|
5318
|
+
"type": "boolean"
|
|
5319
|
+
},
|
|
5320
|
+
"debug": {
|
|
5321
|
+
"char": "d",
|
|
5322
|
+
"description": "Activate debug mode (more logs)",
|
|
5323
|
+
"name": "debug",
|
|
5324
|
+
"allowNo": false,
|
|
5325
|
+
"type": "boolean"
|
|
5317
5326
|
},
|
|
5318
5327
|
"websocket": {
|
|
5319
5328
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
@@ -5346,60 +5355,63 @@
|
|
|
5346
5355
|
},
|
|
5347
5356
|
"hasDynamicHelp": true,
|
|
5348
5357
|
"hiddenAliases": [],
|
|
5349
|
-
"id": "hardis:org:
|
|
5358
|
+
"id": "hardis:org:data:export",
|
|
5350
5359
|
"pluginAlias": "sfdx-hardis",
|
|
5351
5360
|
"pluginName": "sfdx-hardis",
|
|
5352
5361
|
"pluginType": "core",
|
|
5353
5362
|
"strict": true,
|
|
5354
5363
|
"enableJsonFlag": true,
|
|
5355
|
-
"title": "
|
|
5364
|
+
"title": "Export data",
|
|
5356
5365
|
"requiresProject": false,
|
|
5366
|
+
"requiresSfdxPlugins": [
|
|
5367
|
+
"sfdmu"
|
|
5368
|
+
],
|
|
5357
5369
|
"isESM": true,
|
|
5358
5370
|
"relativePath": [
|
|
5359
5371
|
"lib",
|
|
5360
5372
|
"commands",
|
|
5361
5373
|
"hardis",
|
|
5362
5374
|
"org",
|
|
5363
|
-
"
|
|
5364
|
-
"
|
|
5375
|
+
"data",
|
|
5376
|
+
"export.js"
|
|
5365
5377
|
],
|
|
5366
5378
|
"aliasPermutations": [],
|
|
5367
5379
|
"permutations": [
|
|
5368
|
-
"hardis:org:
|
|
5369
|
-
"org:hardis:
|
|
5370
|
-
"org:
|
|
5371
|
-
"org:
|
|
5372
|
-
"hardis:
|
|
5373
|
-
"
|
|
5374
|
-
"
|
|
5375
|
-
"
|
|
5376
|
-
"hardis:
|
|
5377
|
-
"
|
|
5378
|
-
"
|
|
5379
|
-
"
|
|
5380
|
-
"hardis:org:
|
|
5381
|
-
"org:hardis:
|
|
5382
|
-
"org:
|
|
5383
|
-
"org:
|
|
5384
|
-
"hardis:
|
|
5385
|
-
"
|
|
5386
|
-
"
|
|
5387
|
-
"
|
|
5388
|
-
"hardis:
|
|
5389
|
-
"
|
|
5390
|
-
"
|
|
5391
|
-
"
|
|
5380
|
+
"hardis:org:data:export",
|
|
5381
|
+
"org:hardis:data:export",
|
|
5382
|
+
"org:data:hardis:export",
|
|
5383
|
+
"org:data:export:hardis",
|
|
5384
|
+
"hardis:data:org:export",
|
|
5385
|
+
"data:hardis:org:export",
|
|
5386
|
+
"data:org:hardis:export",
|
|
5387
|
+
"data:org:export:hardis",
|
|
5388
|
+
"hardis:data:export:org",
|
|
5389
|
+
"data:hardis:export:org",
|
|
5390
|
+
"data:export:hardis:org",
|
|
5391
|
+
"data:export:org:hardis",
|
|
5392
|
+
"hardis:org:export:data",
|
|
5393
|
+
"org:hardis:export:data",
|
|
5394
|
+
"org:export:hardis:data",
|
|
5395
|
+
"org:export:data:hardis",
|
|
5396
|
+
"hardis:export:org:data",
|
|
5397
|
+
"export:hardis:org:data",
|
|
5398
|
+
"export:org:hardis:data",
|
|
5399
|
+
"export:org:data:hardis",
|
|
5400
|
+
"hardis:export:data:org",
|
|
5401
|
+
"export:hardis:data:org",
|
|
5402
|
+
"export:data:hardis:org",
|
|
5403
|
+
"export:data:org:hardis"
|
|
5392
5404
|
]
|
|
5393
5405
|
},
|
|
5394
|
-
"hardis:org:
|
|
5406
|
+
"hardis:org:data:import": {
|
|
5395
5407
|
"aliases": [],
|
|
5396
5408
|
"args": {},
|
|
5397
|
-
"description": "
|
|
5409
|
+
"description": "Import/Load data in an org using a [SFDX Data Loader](https://help.sfdmu.com/) Project\n\nIf you need to run this command in a production org, you need to either:\n\n- Define **sfdmuCanModify** in your .sfdx-hardis.yml config file. (Example: `sfdmuCanModify: prod-instance.my.salesforce.com`)\n- Define an environment variable SFDMU_CAN_MODIFY. (Example: `SFDMU_CAN_MODIFY=prod-instance.my.salesforce.com`)\n\nSee article:\n\n[](https://nicolas.vuillamy.fr/how-to-detect-bad-words-in-salesforce-records-using-sfdx-data-loader-and-sfdx-hardis-171db40a9bac)\n",
|
|
5398
5410
|
"examples": [
|
|
5399
|
-
"$ sf hardis:org:
|
|
5400
|
-
"$ sf hardis:org:
|
|
5401
|
-
"$ sf hardis:org:
|
|
5402
|
-
"$ sf hardis:org:
|
|
5411
|
+
"$ sf hardis:org:data:import",
|
|
5412
|
+
"$ sf hardis:org:data:import --project-name MyDataProject --target-org my-org@example.com",
|
|
5413
|
+
"$ sf hardis:org:data:import --path ./scripts/data/MyDataProject --no-prompt --target-org my-org@example.com",
|
|
5414
|
+
"$ SFDMU_CAN_MODIFY=prod-instance.my.salesforce.com sf hardis:org:data:import --project-name MyDataProject --target-org prod@example.com"
|
|
5403
5415
|
],
|
|
5404
5416
|
"flags": {
|
|
5405
5417
|
"json": {
|
|
@@ -5417,31 +5429,28 @@
|
|
|
5417
5429
|
"multiple": false,
|
|
5418
5430
|
"type": "option"
|
|
5419
5431
|
},
|
|
5420
|
-
"
|
|
5421
|
-
"char": "
|
|
5422
|
-
"description": "
|
|
5423
|
-
"name": "
|
|
5424
|
-
"default": "ApiTotalUsage",
|
|
5432
|
+
"project-name": {
|
|
5433
|
+
"char": "n",
|
|
5434
|
+
"description": "Name of the sfdmu project to use (if not defined, you will be prompted to select one)",
|
|
5435
|
+
"name": "project-name",
|
|
5425
5436
|
"hasDynamicHelp": false,
|
|
5426
5437
|
"multiple": false,
|
|
5427
5438
|
"type": "option"
|
|
5428
5439
|
},
|
|
5429
|
-
"
|
|
5430
|
-
"char": "
|
|
5431
|
-
"description": "
|
|
5432
|
-
"name": "
|
|
5433
|
-
"default": 999,
|
|
5440
|
+
"path": {
|
|
5441
|
+
"char": "p",
|
|
5442
|
+
"description": "Path to the sfdmu workspace folder",
|
|
5443
|
+
"name": "path",
|
|
5434
5444
|
"hasDynamicHelp": false,
|
|
5435
5445
|
"multiple": false,
|
|
5436
5446
|
"type": "option"
|
|
5437
5447
|
},
|
|
5438
|
-
"
|
|
5439
|
-
"char": "
|
|
5440
|
-
"description": "
|
|
5441
|
-
"name": "
|
|
5442
|
-
"
|
|
5443
|
-
"
|
|
5444
|
-
"type": "option"
|
|
5448
|
+
"no-prompt": {
|
|
5449
|
+
"char": "r",
|
|
5450
|
+
"description": "Do not prompt for Org, use default org",
|
|
5451
|
+
"name": "no-prompt",
|
|
5452
|
+
"allowNo": false,
|
|
5453
|
+
"type": "boolean"
|
|
5445
5454
|
},
|
|
5446
5455
|
"debug": {
|
|
5447
5456
|
"char": "d",
|
|
@@ -5481,57 +5490,60 @@
|
|
|
5481
5490
|
},
|
|
5482
5491
|
"hasDynamicHelp": true,
|
|
5483
5492
|
"hiddenAliases": [],
|
|
5484
|
-
"id": "hardis:org:
|
|
5493
|
+
"id": "hardis:org:data:import",
|
|
5485
5494
|
"pluginAlias": "sfdx-hardis",
|
|
5486
5495
|
"pluginName": "sfdx-hardis",
|
|
5487
5496
|
"pluginType": "core",
|
|
5488
5497
|
"strict": true,
|
|
5489
5498
|
"enableJsonFlag": true,
|
|
5490
|
-
"title": "
|
|
5499
|
+
"title": "Import data",
|
|
5491
5500
|
"requiresProject": false,
|
|
5501
|
+
"requiresSfdxPlugins": [
|
|
5502
|
+
"sfdmu"
|
|
5503
|
+
],
|
|
5492
5504
|
"isESM": true,
|
|
5493
5505
|
"relativePath": [
|
|
5494
5506
|
"lib",
|
|
5495
5507
|
"commands",
|
|
5496
5508
|
"hardis",
|
|
5497
5509
|
"org",
|
|
5498
|
-
"
|
|
5499
|
-
"
|
|
5510
|
+
"data",
|
|
5511
|
+
"import.js"
|
|
5500
5512
|
],
|
|
5501
5513
|
"aliasPermutations": [],
|
|
5502
5514
|
"permutations": [
|
|
5503
|
-
"hardis:org:
|
|
5504
|
-
"org:hardis:
|
|
5505
|
-
"org:
|
|
5506
|
-
"org:
|
|
5507
|
-
"hardis:
|
|
5508
|
-
"
|
|
5509
|
-
"
|
|
5510
|
-
"
|
|
5511
|
-
"hardis:
|
|
5512
|
-
"
|
|
5513
|
-
"
|
|
5514
|
-
"
|
|
5515
|
-
"hardis:org:
|
|
5516
|
-
"org:hardis:
|
|
5517
|
-
"org:
|
|
5518
|
-
"org:
|
|
5519
|
-
"hardis:
|
|
5520
|
-
"
|
|
5521
|
-
"
|
|
5522
|
-
"
|
|
5523
|
-
"hardis:
|
|
5524
|
-
"
|
|
5525
|
-
"
|
|
5526
|
-
"
|
|
5515
|
+
"hardis:org:data:import",
|
|
5516
|
+
"org:hardis:data:import",
|
|
5517
|
+
"org:data:hardis:import",
|
|
5518
|
+
"org:data:import:hardis",
|
|
5519
|
+
"hardis:data:org:import",
|
|
5520
|
+
"data:hardis:org:import",
|
|
5521
|
+
"data:org:hardis:import",
|
|
5522
|
+
"data:org:import:hardis",
|
|
5523
|
+
"hardis:data:import:org",
|
|
5524
|
+
"data:hardis:import:org",
|
|
5525
|
+
"data:import:hardis:org",
|
|
5526
|
+
"data:import:org:hardis",
|
|
5527
|
+
"hardis:org:import:data",
|
|
5528
|
+
"org:hardis:import:data",
|
|
5529
|
+
"org:import:hardis:data",
|
|
5530
|
+
"org:import:data:hardis",
|
|
5531
|
+
"hardis:import:org:data",
|
|
5532
|
+
"import:hardis:org:data",
|
|
5533
|
+
"import:org:hardis:data",
|
|
5534
|
+
"import:org:data:hardis",
|
|
5535
|
+
"hardis:import:data:org",
|
|
5536
|
+
"import:hardis:data:org",
|
|
5537
|
+
"import:data:hardis:org",
|
|
5538
|
+
"import:data:org:hardis"
|
|
5527
5539
|
]
|
|
5528
5540
|
},
|
|
5529
|
-
"hardis:org:
|
|
5541
|
+
"hardis:org:files:export": {
|
|
5530
5542
|
"aliases": [],
|
|
5531
5543
|
"args": {},
|
|
5532
|
-
"description": "\n
|
|
5544
|
+
"description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
|
|
5533
5545
|
"examples": [
|
|
5534
|
-
"$ sf hardis:org:
|
|
5546
|
+
"$ sf hardis:org:files:export"
|
|
5535
5547
|
],
|
|
5536
5548
|
"flags": {
|
|
5537
5549
|
"json": {
|
|
@@ -5549,18 +5561,45 @@
|
|
|
5549
5561
|
"multiple": false,
|
|
5550
5562
|
"type": "option"
|
|
5551
5563
|
},
|
|
5552
|
-
"
|
|
5553
|
-
"char": "
|
|
5554
|
-
"description": "
|
|
5555
|
-
"name": "
|
|
5564
|
+
"path": {
|
|
5565
|
+
"char": "p",
|
|
5566
|
+
"description": "Path to the file export project",
|
|
5567
|
+
"name": "path",
|
|
5556
5568
|
"hasDynamicHelp": false,
|
|
5557
5569
|
"multiple": false,
|
|
5558
5570
|
"type": "option"
|
|
5559
5571
|
},
|
|
5560
|
-
"
|
|
5561
|
-
"char": "
|
|
5562
|
-
"description": "
|
|
5563
|
-
"name": "
|
|
5572
|
+
"chunksize": {
|
|
5573
|
+
"char": "c",
|
|
5574
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
5575
|
+
"name": "chunksize",
|
|
5576
|
+
"default": 1000,
|
|
5577
|
+
"hasDynamicHelp": false,
|
|
5578
|
+
"multiple": false,
|
|
5579
|
+
"type": "option"
|
|
5580
|
+
},
|
|
5581
|
+
"polltimeout": {
|
|
5582
|
+
"char": "t",
|
|
5583
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
5584
|
+
"name": "polltimeout",
|
|
5585
|
+
"default": 300000,
|
|
5586
|
+
"hasDynamicHelp": false,
|
|
5587
|
+
"multiple": false,
|
|
5588
|
+
"type": "option"
|
|
5589
|
+
},
|
|
5590
|
+
"startchunknumber": {
|
|
5591
|
+
"char": "s",
|
|
5592
|
+
"description": "Chunk number to start from",
|
|
5593
|
+
"name": "startchunknumber",
|
|
5594
|
+
"default": 0,
|
|
5595
|
+
"hasDynamicHelp": false,
|
|
5596
|
+
"multiple": false,
|
|
5597
|
+
"type": "option"
|
|
5598
|
+
},
|
|
5599
|
+
"resume": {
|
|
5600
|
+
"char": "r",
|
|
5601
|
+
"description": "Resume previous export by checking existing files (default in CI)",
|
|
5602
|
+
"name": "resume",
|
|
5564
5603
|
"allowNo": false,
|
|
5565
5604
|
"type": "boolean"
|
|
5566
5605
|
},
|
|
@@ -5602,13 +5641,13 @@
|
|
|
5602
5641
|
},
|
|
5603
5642
|
"hasDynamicHelp": true,
|
|
5604
5643
|
"hiddenAliases": [],
|
|
5605
|
-
"id": "hardis:org:
|
|
5644
|
+
"id": "hardis:org:files:export",
|
|
5606
5645
|
"pluginAlias": "sfdx-hardis",
|
|
5607
5646
|
"pluginName": "sfdx-hardis",
|
|
5608
5647
|
"pluginType": "core",
|
|
5609
5648
|
"strict": true,
|
|
5610
5649
|
"enableJsonFlag": true,
|
|
5611
|
-
"title": "
|
|
5650
|
+
"title": "Export files",
|
|
5612
5651
|
"requiresProject": false,
|
|
5613
5652
|
"isESM": true,
|
|
5614
5653
|
"relativePath": [
|
|
@@ -5616,43 +5655,43 @@
|
|
|
5616
5655
|
"commands",
|
|
5617
5656
|
"hardis",
|
|
5618
5657
|
"org",
|
|
5619
|
-
"
|
|
5620
|
-
"
|
|
5658
|
+
"files",
|
|
5659
|
+
"export.js"
|
|
5621
5660
|
],
|
|
5622
5661
|
"aliasPermutations": [],
|
|
5623
5662
|
"permutations": [
|
|
5624
|
-
"hardis:org:
|
|
5625
|
-
"org:hardis:
|
|
5626
|
-
"org:
|
|
5627
|
-
"org:
|
|
5628
|
-
"hardis:
|
|
5629
|
-
"
|
|
5630
|
-
"
|
|
5631
|
-
"
|
|
5632
|
-
"hardis:
|
|
5633
|
-
"
|
|
5634
|
-
"
|
|
5635
|
-
"
|
|
5636
|
-
"hardis:org:
|
|
5637
|
-
"org:hardis:
|
|
5638
|
-
"org:
|
|
5639
|
-
"org:
|
|
5640
|
-
"hardis:
|
|
5641
|
-
"
|
|
5642
|
-
"
|
|
5643
|
-
"
|
|
5644
|
-
"hardis:
|
|
5645
|
-
"
|
|
5646
|
-
"
|
|
5647
|
-
"
|
|
5663
|
+
"hardis:org:files:export",
|
|
5664
|
+
"org:hardis:files:export",
|
|
5665
|
+
"org:files:hardis:export",
|
|
5666
|
+
"org:files:export:hardis",
|
|
5667
|
+
"hardis:files:org:export",
|
|
5668
|
+
"files:hardis:org:export",
|
|
5669
|
+
"files:org:hardis:export",
|
|
5670
|
+
"files:org:export:hardis",
|
|
5671
|
+
"hardis:files:export:org",
|
|
5672
|
+
"files:hardis:export:org",
|
|
5673
|
+
"files:export:hardis:org",
|
|
5674
|
+
"files:export:org:hardis",
|
|
5675
|
+
"hardis:org:export:files",
|
|
5676
|
+
"org:hardis:export:files",
|
|
5677
|
+
"org:export:hardis:files",
|
|
5678
|
+
"org:export:files:hardis",
|
|
5679
|
+
"hardis:export:org:files",
|
|
5680
|
+
"export:hardis:org:files",
|
|
5681
|
+
"export:org:hardis:files",
|
|
5682
|
+
"export:org:files:hardis",
|
|
5683
|
+
"hardis:export:files:org",
|
|
5684
|
+
"export:hardis:files:org",
|
|
5685
|
+
"export:files:hardis:org",
|
|
5686
|
+
"export:files:org:hardis"
|
|
5648
5687
|
]
|
|
5649
5688
|
},
|
|
5650
|
-
"hardis:org:
|
|
5689
|
+
"hardis:org:files:import": {
|
|
5651
5690
|
"aliases": [],
|
|
5652
5691
|
"args": {},
|
|
5653
|
-
"description": "
|
|
5692
|
+
"description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
|
|
5654
5693
|
"examples": [
|
|
5655
|
-
"$ sf hardis:org:
|
|
5694
|
+
"$ sf hardis:org:files:import"
|
|
5656
5695
|
],
|
|
5657
5696
|
"flags": {
|
|
5658
5697
|
"json": {
|
|
@@ -5670,14 +5709,21 @@
|
|
|
5670
5709
|
"multiple": false,
|
|
5671
5710
|
"type": "option"
|
|
5672
5711
|
},
|
|
5673
|
-
"
|
|
5674
|
-
"char": "
|
|
5675
|
-
"description": "
|
|
5676
|
-
"name": "
|
|
5712
|
+
"path": {
|
|
5713
|
+
"char": "p",
|
|
5714
|
+
"description": "Path to the file export project",
|
|
5715
|
+
"name": "path",
|
|
5677
5716
|
"hasDynamicHelp": false,
|
|
5678
5717
|
"multiple": false,
|
|
5679
5718
|
"type": "option"
|
|
5680
5719
|
},
|
|
5720
|
+
"overwrite": {
|
|
5721
|
+
"char": "f",
|
|
5722
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
5723
|
+
"name": "overwrite",
|
|
5724
|
+
"allowNo": false,
|
|
5725
|
+
"type": "boolean"
|
|
5726
|
+
},
|
|
5681
5727
|
"debug": {
|
|
5682
5728
|
"char": "d",
|
|
5683
5729
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5716,13 +5762,13 @@
|
|
|
5716
5762
|
},
|
|
5717
5763
|
"hasDynamicHelp": true,
|
|
5718
5764
|
"hiddenAliases": [],
|
|
5719
|
-
"id": "hardis:org:
|
|
5765
|
+
"id": "hardis:org:files:import",
|
|
5720
5766
|
"pluginAlias": "sfdx-hardis",
|
|
5721
5767
|
"pluginName": "sfdx-hardis",
|
|
5722
5768
|
"pluginType": "core",
|
|
5723
5769
|
"strict": true,
|
|
5724
5770
|
"enableJsonFlag": true,
|
|
5725
|
-
"title": "
|
|
5771
|
+
"title": "Import files",
|
|
5726
5772
|
"requiresProject": false,
|
|
5727
5773
|
"isESM": true,
|
|
5728
5774
|
"relativePath": [
|
|
@@ -5730,43 +5776,46 @@
|
|
|
5730
5776
|
"commands",
|
|
5731
5777
|
"hardis",
|
|
5732
5778
|
"org",
|
|
5733
|
-
"
|
|
5734
|
-
"
|
|
5779
|
+
"files",
|
|
5780
|
+
"import.js"
|
|
5735
5781
|
],
|
|
5736
5782
|
"aliasPermutations": [],
|
|
5737
5783
|
"permutations": [
|
|
5738
|
-
"hardis:org:
|
|
5739
|
-
"org:hardis:
|
|
5740
|
-
"org:
|
|
5741
|
-
"org:
|
|
5742
|
-
"hardis:
|
|
5743
|
-
"
|
|
5744
|
-
"
|
|
5745
|
-
"
|
|
5746
|
-
"hardis:
|
|
5747
|
-
"
|
|
5748
|
-
"
|
|
5749
|
-
"
|
|
5750
|
-
"hardis:org:
|
|
5751
|
-
"org:hardis:
|
|
5752
|
-
"org:
|
|
5753
|
-
"org:
|
|
5754
|
-
"hardis:
|
|
5755
|
-
"
|
|
5756
|
-
"
|
|
5757
|
-
"
|
|
5758
|
-
"hardis:
|
|
5759
|
-
"
|
|
5760
|
-
"
|
|
5761
|
-
"
|
|
5784
|
+
"hardis:org:files:import",
|
|
5785
|
+
"org:hardis:files:import",
|
|
5786
|
+
"org:files:hardis:import",
|
|
5787
|
+
"org:files:import:hardis",
|
|
5788
|
+
"hardis:files:org:import",
|
|
5789
|
+
"files:hardis:org:import",
|
|
5790
|
+
"files:org:hardis:import",
|
|
5791
|
+
"files:org:import:hardis",
|
|
5792
|
+
"hardis:files:import:org",
|
|
5793
|
+
"files:hardis:import:org",
|
|
5794
|
+
"files:import:hardis:org",
|
|
5795
|
+
"files:import:org:hardis",
|
|
5796
|
+
"hardis:org:import:files",
|
|
5797
|
+
"org:hardis:import:files",
|
|
5798
|
+
"org:import:hardis:files",
|
|
5799
|
+
"org:import:files:hardis",
|
|
5800
|
+
"hardis:import:org:files",
|
|
5801
|
+
"import:hardis:org:files",
|
|
5802
|
+
"import:org:hardis:files",
|
|
5803
|
+
"import:org:files:hardis",
|
|
5804
|
+
"hardis:import:files:org",
|
|
5805
|
+
"import:hardis:files:org",
|
|
5806
|
+
"import:files:hardis:org",
|
|
5807
|
+
"import:files:org:hardis"
|
|
5762
5808
|
]
|
|
5763
5809
|
},
|
|
5764
|
-
"hardis:org:diagnose:
|
|
5810
|
+
"hardis:org:diagnose:audittrail": {
|
|
5765
5811
|
"aliases": [],
|
|
5766
5812
|
"args": {},
|
|
5767
|
-
"description": "
|
|
5813
|
+
"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",
|
|
5768
5814
|
"examples": [
|
|
5769
|
-
"$ sf hardis:org:diagnose:
|
|
5815
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5816
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5817
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5818
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5770
5819
|
],
|
|
5771
5820
|
"flags": {
|
|
5772
5821
|
"json": {
|
|
@@ -5784,6 +5833,22 @@
|
|
|
5784
5833
|
"multiple": false,
|
|
5785
5834
|
"type": "option"
|
|
5786
5835
|
},
|
|
5836
|
+
"excludeusers": {
|
|
5837
|
+
"char": "e",
|
|
5838
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5839
|
+
"name": "excludeusers",
|
|
5840
|
+
"hasDynamicHelp": false,
|
|
5841
|
+
"multiple": false,
|
|
5842
|
+
"type": "option"
|
|
5843
|
+
},
|
|
5844
|
+
"lastndays": {
|
|
5845
|
+
"char": "t",
|
|
5846
|
+
"description": "Number of days to extract from today (included)",
|
|
5847
|
+
"name": "lastndays",
|
|
5848
|
+
"hasDynamicHelp": false,
|
|
5849
|
+
"multiple": false,
|
|
5850
|
+
"type": "option"
|
|
5851
|
+
},
|
|
5787
5852
|
"outputfile": {
|
|
5788
5853
|
"char": "f",
|
|
5789
5854
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -5830,13 +5895,13 @@
|
|
|
5830
5895
|
},
|
|
5831
5896
|
"hasDynamicHelp": true,
|
|
5832
5897
|
"hiddenAliases": [],
|
|
5833
|
-
"id": "hardis:org:diagnose:
|
|
5898
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5834
5899
|
"pluginAlias": "sfdx-hardis",
|
|
5835
5900
|
"pluginName": "sfdx-hardis",
|
|
5836
5901
|
"pluginType": "core",
|
|
5837
5902
|
"strict": true,
|
|
5838
5903
|
"enableJsonFlag": true,
|
|
5839
|
-
"title": "
|
|
5904
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5840
5905
|
"requiresProject": false,
|
|
5841
5906
|
"isESM": true,
|
|
5842
5907
|
"relativePath": [
|
|
@@ -5845,43 +5910,42 @@
|
|
|
5845
5910
|
"hardis",
|
|
5846
5911
|
"org",
|
|
5847
5912
|
"diagnose",
|
|
5848
|
-
"
|
|
5913
|
+
"audittrail.js"
|
|
5849
5914
|
],
|
|
5850
5915
|
"aliasPermutations": [],
|
|
5851
5916
|
"permutations": [
|
|
5852
|
-
"hardis:org:diagnose:
|
|
5853
|
-
"org:hardis:diagnose:
|
|
5854
|
-
"org:diagnose:hardis:
|
|
5855
|
-
"org:diagnose:
|
|
5856
|
-
"hardis:diagnose:org:
|
|
5857
|
-
"diagnose:hardis:org:
|
|
5858
|
-
"diagnose:org:hardis:
|
|
5859
|
-
"diagnose:org:
|
|
5860
|
-
"hardis:diagnose:
|
|
5861
|
-
"diagnose:hardis:
|
|
5862
|
-
"diagnose:
|
|
5863
|
-
"diagnose:
|
|
5864
|
-
"hardis:org:
|
|
5865
|
-
"org:hardis:
|
|
5866
|
-
"org:
|
|
5867
|
-
"org:
|
|
5868
|
-
"hardis:
|
|
5869
|
-
"
|
|
5870
|
-
"
|
|
5871
|
-
"
|
|
5872
|
-
"hardis:
|
|
5873
|
-
"
|
|
5874
|
-
"
|
|
5875
|
-
"
|
|
5917
|
+
"hardis:org:diagnose:audittrail",
|
|
5918
|
+
"org:hardis:diagnose:audittrail",
|
|
5919
|
+
"org:diagnose:hardis:audittrail",
|
|
5920
|
+
"org:diagnose:audittrail:hardis",
|
|
5921
|
+
"hardis:diagnose:org:audittrail",
|
|
5922
|
+
"diagnose:hardis:org:audittrail",
|
|
5923
|
+
"diagnose:org:hardis:audittrail",
|
|
5924
|
+
"diagnose:org:audittrail:hardis",
|
|
5925
|
+
"hardis:diagnose:audittrail:org",
|
|
5926
|
+
"diagnose:hardis:audittrail:org",
|
|
5927
|
+
"diagnose:audittrail:hardis:org",
|
|
5928
|
+
"diagnose:audittrail:org:hardis",
|
|
5929
|
+
"hardis:org:audittrail:diagnose",
|
|
5930
|
+
"org:hardis:audittrail:diagnose",
|
|
5931
|
+
"org:audittrail:hardis:diagnose",
|
|
5932
|
+
"org:audittrail:diagnose:hardis",
|
|
5933
|
+
"hardis:audittrail:org:diagnose",
|
|
5934
|
+
"audittrail:hardis:org:diagnose",
|
|
5935
|
+
"audittrail:org:hardis:diagnose",
|
|
5936
|
+
"audittrail:org:diagnose:hardis",
|
|
5937
|
+
"hardis:audittrail:diagnose:org",
|
|
5938
|
+
"audittrail:hardis:diagnose:org",
|
|
5939
|
+
"audittrail:diagnose:hardis:org",
|
|
5940
|
+
"audittrail:diagnose:org:hardis"
|
|
5876
5941
|
]
|
|
5877
5942
|
},
|
|
5878
|
-
"hardis:org:diagnose:
|
|
5943
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5879
5944
|
"aliases": [],
|
|
5880
5945
|
"args": {},
|
|
5881
|
-
"description": "
|
|
5946
|
+
"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",
|
|
5882
5947
|
"examples": [
|
|
5883
|
-
"$ sf hardis:org:diagnose:
|
|
5884
|
-
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
5948
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5885
5949
|
],
|
|
5886
5950
|
"flags": {
|
|
5887
5951
|
"json": {
|
|
@@ -5899,22 +5963,6 @@
|
|
|
5899
5963
|
"multiple": false,
|
|
5900
5964
|
"type": "option"
|
|
5901
5965
|
},
|
|
5902
|
-
"outputfile": {
|
|
5903
|
-
"char": "f",
|
|
5904
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5905
|
-
"name": "outputfile",
|
|
5906
|
-
"hasDynamicHelp": false,
|
|
5907
|
-
"multiple": false,
|
|
5908
|
-
"type": "option"
|
|
5909
|
-
},
|
|
5910
|
-
"days": {
|
|
5911
|
-
"char": "t",
|
|
5912
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
5913
|
-
"name": "days",
|
|
5914
|
-
"hasDynamicHelp": false,
|
|
5915
|
-
"multiple": false,
|
|
5916
|
-
"type": "option"
|
|
5917
|
-
},
|
|
5918
5966
|
"debug": {
|
|
5919
5967
|
"char": "d",
|
|
5920
5968
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5953,13 +6001,13 @@
|
|
|
5953
6001
|
},
|
|
5954
6002
|
"hasDynamicHelp": true,
|
|
5955
6003
|
"hiddenAliases": [],
|
|
5956
|
-
"id": "hardis:org:diagnose:
|
|
6004
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
5957
6005
|
"pluginAlias": "sfdx-hardis",
|
|
5958
6006
|
"pluginName": "sfdx-hardis",
|
|
5959
6007
|
"pluginType": "core",
|
|
5960
6008
|
"strict": true,
|
|
5961
6009
|
"enableJsonFlag": true,
|
|
5962
|
-
"title": "
|
|
6010
|
+
"title": "Get Instance Upgrade date",
|
|
5963
6011
|
"requiresProject": false,
|
|
5964
6012
|
"isESM": true,
|
|
5965
6013
|
"relativePath": [
|
|
@@ -5968,42 +6016,45 @@
|
|
|
5968
6016
|
"hardis",
|
|
5969
6017
|
"org",
|
|
5970
6018
|
"diagnose",
|
|
5971
|
-
"
|
|
6019
|
+
"instanceupgrade.js"
|
|
5972
6020
|
],
|
|
5973
6021
|
"aliasPermutations": [],
|
|
5974
6022
|
"permutations": [
|
|
5975
|
-
"hardis:org:diagnose:
|
|
5976
|
-
"org:hardis:diagnose:
|
|
5977
|
-
"org:diagnose:hardis:
|
|
5978
|
-
"org:diagnose:
|
|
5979
|
-
"hardis:diagnose:org:
|
|
5980
|
-
"diagnose:hardis:org:
|
|
5981
|
-
"diagnose:org:hardis:
|
|
5982
|
-
"diagnose:org:
|
|
5983
|
-
"hardis:diagnose:
|
|
5984
|
-
"diagnose:hardis:
|
|
5985
|
-
"diagnose:
|
|
5986
|
-
"diagnose:
|
|
5987
|
-
"hardis:org:
|
|
5988
|
-
"org:hardis:
|
|
5989
|
-
"org:
|
|
5990
|
-
"org:
|
|
5991
|
-
"hardis:
|
|
5992
|
-
"
|
|
5993
|
-
"
|
|
5994
|
-
"
|
|
5995
|
-
"hardis:
|
|
5996
|
-
"
|
|
5997
|
-
"
|
|
5998
|
-
"
|
|
5999
|
-
]
|
|
6000
|
-
},
|
|
6001
|
-
"hardis:org:diagnose:
|
|
6002
|
-
"aliases": [],
|
|
6003
|
-
"args": {},
|
|
6004
|
-
"description": "
|
|
6005
|
-
"examples": [
|
|
6006
|
-
"$ sf hardis:org:diagnose:
|
|
6023
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
6024
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
6025
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
6026
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
6027
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
6028
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
6029
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
6030
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
6031
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
6032
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
6033
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
6034
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
6035
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
6036
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
6037
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
6038
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
6039
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
6040
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
6041
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
6042
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
6043
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
6044
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
6045
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
6046
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
6047
|
+
]
|
|
6048
|
+
},
|
|
6049
|
+
"hardis:org:diagnose:legacyapi": {
|
|
6050
|
+
"aliases": [],
|
|
6051
|
+
"args": {},
|
|
6052
|
+
"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",
|
|
6053
|
+
"examples": [
|
|
6054
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
6055
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6056
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6057
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6007
6058
|
],
|
|
6008
6059
|
"flags": {
|
|
6009
6060
|
"json": {
|
|
@@ -6021,6 +6072,24 @@
|
|
|
6021
6072
|
"multiple": false,
|
|
6022
6073
|
"type": "option"
|
|
6023
6074
|
},
|
|
6075
|
+
"eventtype": {
|
|
6076
|
+
"char": "e",
|
|
6077
|
+
"description": "Type of EventLogFile event to analyze",
|
|
6078
|
+
"name": "eventtype",
|
|
6079
|
+
"default": "ApiTotalUsage",
|
|
6080
|
+
"hasDynamicHelp": false,
|
|
6081
|
+
"multiple": false,
|
|
6082
|
+
"type": "option"
|
|
6083
|
+
},
|
|
6084
|
+
"limit": {
|
|
6085
|
+
"char": "l",
|
|
6086
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
6087
|
+
"name": "limit",
|
|
6088
|
+
"default": 999,
|
|
6089
|
+
"hasDynamicHelp": false,
|
|
6090
|
+
"multiple": false,
|
|
6091
|
+
"type": "option"
|
|
6092
|
+
},
|
|
6024
6093
|
"outputfile": {
|
|
6025
6094
|
"char": "f",
|
|
6026
6095
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6067,30 +6136,13 @@
|
|
|
6067
6136
|
},
|
|
6068
6137
|
"hasDynamicHelp": true,
|
|
6069
6138
|
"hiddenAliases": [],
|
|
6070
|
-
"id": "hardis:org:diagnose:
|
|
6139
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
6071
6140
|
"pluginAlias": "sfdx-hardis",
|
|
6072
6141
|
"pluginName": "sfdx-hardis",
|
|
6073
6142
|
"pluginType": "core",
|
|
6074
6143
|
"strict": true,
|
|
6075
6144
|
"enableJsonFlag": true,
|
|
6076
|
-
"title": "
|
|
6077
|
-
"allowedInactiveConnectedApps": [
|
|
6078
|
-
"Ant Migration Tool",
|
|
6079
|
-
"Chatter Desktop",
|
|
6080
|
-
"Chatter Mobile for BlackBerry",
|
|
6081
|
-
"Force.com IDE",
|
|
6082
|
-
"OIQ_Integration",
|
|
6083
|
-
"Salesforce CLI",
|
|
6084
|
-
"Salesforce Files",
|
|
6085
|
-
"Salesforce Mobile Dashboards",
|
|
6086
|
-
"Salesforce Touch",
|
|
6087
|
-
"Salesforce for Outlook",
|
|
6088
|
-
"SalesforceA",
|
|
6089
|
-
"SalesforceA for Android",
|
|
6090
|
-
"SalesforceA for iOS",
|
|
6091
|
-
"SalesforceDX Namespace Registry",
|
|
6092
|
-
"SalesforceIQ"
|
|
6093
|
-
],
|
|
6145
|
+
"title": "Check for legacy API use",
|
|
6094
6146
|
"requiresProject": false,
|
|
6095
6147
|
"isESM": true,
|
|
6096
6148
|
"relativePath": [
|
|
@@ -6099,43 +6151,42 @@
|
|
|
6099
6151
|
"hardis",
|
|
6100
6152
|
"org",
|
|
6101
6153
|
"diagnose",
|
|
6102
|
-
"
|
|
6154
|
+
"legacyapi.js"
|
|
6103
6155
|
],
|
|
6104
6156
|
"aliasPermutations": [],
|
|
6105
6157
|
"permutations": [
|
|
6106
|
-
"hardis:org:diagnose:
|
|
6107
|
-
"org:hardis:diagnose:
|
|
6108
|
-
"org:diagnose:hardis:
|
|
6109
|
-
"org:diagnose:
|
|
6110
|
-
"hardis:diagnose:org:
|
|
6111
|
-
"diagnose:hardis:org:
|
|
6112
|
-
"diagnose:org:hardis:
|
|
6113
|
-
"diagnose:org:
|
|
6114
|
-
"hardis:diagnose:
|
|
6115
|
-
"diagnose:hardis:
|
|
6116
|
-
"diagnose:
|
|
6117
|
-
"diagnose:
|
|
6118
|
-
"hardis:org:
|
|
6119
|
-
"org:hardis:
|
|
6120
|
-
"org:
|
|
6121
|
-
"org:
|
|
6122
|
-
"hardis:
|
|
6123
|
-
"
|
|
6124
|
-
"
|
|
6125
|
-
"
|
|
6126
|
-
"hardis:
|
|
6127
|
-
"
|
|
6128
|
-
"
|
|
6129
|
-
"
|
|
6158
|
+
"hardis:org:diagnose:legacyapi",
|
|
6159
|
+
"org:hardis:diagnose:legacyapi",
|
|
6160
|
+
"org:diagnose:hardis:legacyapi",
|
|
6161
|
+
"org:diagnose:legacyapi:hardis",
|
|
6162
|
+
"hardis:diagnose:org:legacyapi",
|
|
6163
|
+
"diagnose:hardis:org:legacyapi",
|
|
6164
|
+
"diagnose:org:hardis:legacyapi",
|
|
6165
|
+
"diagnose:org:legacyapi:hardis",
|
|
6166
|
+
"hardis:diagnose:legacyapi:org",
|
|
6167
|
+
"diagnose:hardis:legacyapi:org",
|
|
6168
|
+
"diagnose:legacyapi:hardis:org",
|
|
6169
|
+
"diagnose:legacyapi:org:hardis",
|
|
6170
|
+
"hardis:org:legacyapi:diagnose",
|
|
6171
|
+
"org:hardis:legacyapi:diagnose",
|
|
6172
|
+
"org:legacyapi:hardis:diagnose",
|
|
6173
|
+
"org:legacyapi:diagnose:hardis",
|
|
6174
|
+
"hardis:legacyapi:org:diagnose",
|
|
6175
|
+
"legacyapi:hardis:org:diagnose",
|
|
6176
|
+
"legacyapi:org:hardis:diagnose",
|
|
6177
|
+
"legacyapi:org:diagnose:hardis",
|
|
6178
|
+
"hardis:legacyapi:diagnose:org",
|
|
6179
|
+
"legacyapi:hardis:diagnose:org",
|
|
6180
|
+
"legacyapi:diagnose:hardis:org",
|
|
6181
|
+
"legacyapi:diagnose:org:hardis"
|
|
6130
6182
|
]
|
|
6131
6183
|
},
|
|
6132
|
-
"hardis:org:diagnose:
|
|
6184
|
+
"hardis:org:diagnose:licenses": {
|
|
6133
6185
|
"aliases": [],
|
|
6134
6186
|
"args": {},
|
|
6135
|
-
"description": "\n
|
|
6187
|
+
"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",
|
|
6136
6188
|
"examples": [
|
|
6137
|
-
"$ sf hardis:org:diagnose:
|
|
6138
|
-
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6189
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
6139
6190
|
],
|
|
6140
6191
|
"flags": {
|
|
6141
6192
|
"json": {
|
|
@@ -6161,6 +6212,13 @@
|
|
|
6161
6212
|
"multiple": false,
|
|
6162
6213
|
"type": "option"
|
|
6163
6214
|
},
|
|
6215
|
+
"usedonly": {
|
|
6216
|
+
"char": "u",
|
|
6217
|
+
"description": "Filter to have only used licenses",
|
|
6218
|
+
"name": "usedonly",
|
|
6219
|
+
"allowNo": false,
|
|
6220
|
+
"type": "boolean"
|
|
6221
|
+
},
|
|
6164
6222
|
"debug": {
|
|
6165
6223
|
"char": "d",
|
|
6166
6224
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6199,32 +6257,14 @@
|
|
|
6199
6257
|
},
|
|
6200
6258
|
"hasDynamicHelp": true,
|
|
6201
6259
|
"hiddenAliases": [],
|
|
6202
|
-
"id": "hardis:org:diagnose:
|
|
6260
|
+
"id": "hardis:org:diagnose:licenses",
|
|
6203
6261
|
"pluginAlias": "sfdx-hardis",
|
|
6204
6262
|
"pluginName": "sfdx-hardis",
|
|
6205
6263
|
"pluginType": "core",
|
|
6206
6264
|
"strict": true,
|
|
6207
6265
|
"enableJsonFlag": true,
|
|
6208
|
-
"title": "
|
|
6266
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6209
6267
|
"requiresProject": false,
|
|
6210
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
6211
|
-
"Sales_User"
|
|
6212
|
-
],
|
|
6213
|
-
"permSetsPermSetLicenses": [
|
|
6214
|
-
{
|
|
6215
|
-
"permSet": "Sales_User",
|
|
6216
|
-
"permSetLicense": "SalesUserPsl"
|
|
6217
|
-
}
|
|
6218
|
-
],
|
|
6219
|
-
"profilesPermissionSetLicenses": [
|
|
6220
|
-
{
|
|
6221
|
-
"profile": "Salesforce API Only",
|
|
6222
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6223
|
-
}
|
|
6224
|
-
],
|
|
6225
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6226
|
-
"IdentityConnect"
|
|
6227
|
-
],
|
|
6228
6268
|
"isESM": true,
|
|
6229
6269
|
"relativePath": [
|
|
6230
6270
|
"lib",
|
|
@@ -6232,46 +6272,42 @@
|
|
|
6232
6272
|
"hardis",
|
|
6233
6273
|
"org",
|
|
6234
6274
|
"diagnose",
|
|
6235
|
-
"
|
|
6275
|
+
"licenses.js"
|
|
6236
6276
|
],
|
|
6237
6277
|
"aliasPermutations": [],
|
|
6238
6278
|
"permutations": [
|
|
6239
|
-
"hardis:org:diagnose:
|
|
6240
|
-
"org:hardis:diagnose:
|
|
6241
|
-
"org:diagnose:hardis:
|
|
6242
|
-
"org:diagnose:
|
|
6243
|
-
"hardis:diagnose:org:
|
|
6244
|
-
"diagnose:hardis:org:
|
|
6245
|
-
"diagnose:org:hardis:
|
|
6246
|
-
"diagnose:org:
|
|
6247
|
-
"hardis:diagnose:
|
|
6248
|
-
"diagnose:hardis:
|
|
6249
|
-
"diagnose:
|
|
6250
|
-
"diagnose:
|
|
6251
|
-
"hardis:org:
|
|
6252
|
-
"org:hardis:
|
|
6253
|
-
"org:
|
|
6254
|
-
"org:
|
|
6255
|
-
"hardis:
|
|
6256
|
-
"
|
|
6257
|
-
"
|
|
6258
|
-
"
|
|
6259
|
-
"hardis:
|
|
6260
|
-
"
|
|
6261
|
-
"
|
|
6262
|
-
"
|
|
6279
|
+
"hardis:org:diagnose:licenses",
|
|
6280
|
+
"org:hardis:diagnose:licenses",
|
|
6281
|
+
"org:diagnose:hardis:licenses",
|
|
6282
|
+
"org:diagnose:licenses:hardis",
|
|
6283
|
+
"hardis:diagnose:org:licenses",
|
|
6284
|
+
"diagnose:hardis:org:licenses",
|
|
6285
|
+
"diagnose:org:hardis:licenses",
|
|
6286
|
+
"diagnose:org:licenses:hardis",
|
|
6287
|
+
"hardis:diagnose:licenses:org",
|
|
6288
|
+
"diagnose:hardis:licenses:org",
|
|
6289
|
+
"diagnose:licenses:hardis:org",
|
|
6290
|
+
"diagnose:licenses:org:hardis",
|
|
6291
|
+
"hardis:org:licenses:diagnose",
|
|
6292
|
+
"org:hardis:licenses:diagnose",
|
|
6293
|
+
"org:licenses:hardis:diagnose",
|
|
6294
|
+
"org:licenses:diagnose:hardis",
|
|
6295
|
+
"hardis:licenses:org:diagnose",
|
|
6296
|
+
"licenses:hardis:org:diagnose",
|
|
6297
|
+
"licenses:org:hardis:diagnose",
|
|
6298
|
+
"licenses:org:diagnose:hardis",
|
|
6299
|
+
"hardis:licenses:diagnose:org",
|
|
6300
|
+
"licenses:hardis:diagnose:org",
|
|
6301
|
+
"licenses:diagnose:hardis:org",
|
|
6302
|
+
"licenses:diagnose:org:hardis"
|
|
6263
6303
|
]
|
|
6264
6304
|
},
|
|
6265
|
-
"hardis:org:diagnose:
|
|
6305
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6266
6306
|
"aliases": [],
|
|
6267
6307
|
"args": {},
|
|
6268
|
-
"description": "
|
|
6308
|
+
"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",
|
|
6269
6309
|
"examples": [
|
|
6270
|
-
"$ sf hardis:org:diagnose:
|
|
6271
|
-
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6272
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6273
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6274
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6310
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6275
6311
|
],
|
|
6276
6312
|
"flags": {
|
|
6277
6313
|
"json": {
|
|
@@ -6297,41 +6333,6 @@
|
|
|
6297
6333
|
"multiple": false,
|
|
6298
6334
|
"type": "option"
|
|
6299
6335
|
},
|
|
6300
|
-
"days": {
|
|
6301
|
-
"char": "t",
|
|
6302
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6303
|
-
"name": "days",
|
|
6304
|
-
"hasDynamicHelp": false,
|
|
6305
|
-
"multiple": false,
|
|
6306
|
-
"type": "option"
|
|
6307
|
-
},
|
|
6308
|
-
"licensetypes": {
|
|
6309
|
-
"char": "l",
|
|
6310
|
-
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6311
|
-
"name": "licensetypes",
|
|
6312
|
-
"hasDynamicHelp": false,
|
|
6313
|
-
"multiple": false,
|
|
6314
|
-
"options": [
|
|
6315
|
-
"all",
|
|
6316
|
-
"all-crm",
|
|
6317
|
-
"all-paying"
|
|
6318
|
-
],
|
|
6319
|
-
"type": "option"
|
|
6320
|
-
},
|
|
6321
|
-
"licenseidentifiers": {
|
|
6322
|
-
"char": "i",
|
|
6323
|
-
"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",
|
|
6324
|
-
"name": "licenseidentifiers",
|
|
6325
|
-
"hasDynamicHelp": false,
|
|
6326
|
-
"multiple": false,
|
|
6327
|
-
"type": "option"
|
|
6328
|
-
},
|
|
6329
|
-
"returnactiveusers": {
|
|
6330
|
-
"description": "Inverts the command by returning the active users",
|
|
6331
|
-
"name": "returnactiveusers",
|
|
6332
|
-
"allowNo": false,
|
|
6333
|
-
"type": "boolean"
|
|
6334
|
-
},
|
|
6335
6336
|
"debug": {
|
|
6336
6337
|
"char": "d",
|
|
6337
6338
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6370,13 +6371,13 @@
|
|
|
6370
6371
|
},
|
|
6371
6372
|
"hasDynamicHelp": true,
|
|
6372
6373
|
"hiddenAliases": [],
|
|
6373
|
-
"id": "hardis:org:diagnose:
|
|
6374
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6374
6375
|
"pluginAlias": "sfdx-hardis",
|
|
6375
6376
|
"pluginName": "sfdx-hardis",
|
|
6376
6377
|
"pluginType": "core",
|
|
6377
6378
|
"strict": true,
|
|
6378
6379
|
"enableJsonFlag": true,
|
|
6379
|
-
"title": "
|
|
6380
|
+
"title": "Check Release Updates of an org",
|
|
6380
6381
|
"requiresProject": false,
|
|
6381
6382
|
"isESM": true,
|
|
6382
6383
|
"relativePath": [
|
|
@@ -6385,42 +6386,42 @@
|
|
|
6385
6386
|
"hardis",
|
|
6386
6387
|
"org",
|
|
6387
6388
|
"diagnose",
|
|
6388
|
-
"
|
|
6389
|
+
"releaseupdates.js"
|
|
6389
6390
|
],
|
|
6390
6391
|
"aliasPermutations": [],
|
|
6391
6392
|
"permutations": [
|
|
6392
|
-
"hardis:org:diagnose:
|
|
6393
|
-
"org:hardis:diagnose:
|
|
6394
|
-
"org:diagnose:hardis:
|
|
6395
|
-
"org:diagnose:
|
|
6396
|
-
"hardis:diagnose:org:
|
|
6397
|
-
"diagnose:hardis:org:
|
|
6398
|
-
"diagnose:org:hardis:
|
|
6399
|
-
"diagnose:org:
|
|
6400
|
-
"hardis:diagnose:
|
|
6401
|
-
"diagnose:hardis:
|
|
6402
|
-
"diagnose:
|
|
6403
|
-
"diagnose:
|
|
6404
|
-
"hardis:org:
|
|
6405
|
-
"org:hardis:
|
|
6406
|
-
"org:
|
|
6407
|
-
"org:
|
|
6408
|
-
"hardis:
|
|
6409
|
-
"
|
|
6410
|
-
"
|
|
6411
|
-
"
|
|
6412
|
-
"hardis:
|
|
6413
|
-
"
|
|
6414
|
-
"
|
|
6415
|
-
"
|
|
6393
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6394
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6395
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6396
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6397
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6398
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6399
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6400
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6401
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6402
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6403
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6404
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6405
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6406
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6407
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6408
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6409
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6410
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6411
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6412
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6413
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6414
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6415
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6416
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6416
6417
|
]
|
|
6417
6418
|
},
|
|
6418
|
-
"hardis:org:
|
|
6419
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
6419
6420
|
"aliases": [],
|
|
6420
6421
|
"args": {},
|
|
6421
|
-
"description": "\n## Command Behavior\n\n**
|
|
6422
|
+
"description": "\n## Command Behavior\n\n**Detects unsecured Connected Apps in a Salesforce org and generates detailed reports for security analysis.**\n\nThis command is a critical security diagnostic tool that helps administrators identify Connected Apps that may pose security risks due to improper configuration. It provides comprehensive analysis of OAuth tokens and Connected App security settings to ensure proper access control.\n\nKey functionalities:\n\n- **OAuth Token Analysis:** Queries all OAuth tokens in the org using SOQL to retrieve comprehensive token information including app names, users, authorization status, and usage statistics.\n- **Security Status Assessment:** Evaluates each Connected App's security configuration by checking the `IsUsingAdminAuthorization` flag to determine if admin pre-approval is required.\n- **Unsecured App Detection:** Identifies Connected Apps that allow users to authorize themselves without admin approval, which can pose security risks.\n- **Detailed Reporting:** Generates two comprehensive CSV reports:\n - **OAuth Tokens Report:** Lists all OAuth tokens with security status, user information, and usage data\n - **Connected Apps Summary:** Aggregates unsecured Connected Apps with counts of associated OAuth tokens\n- **Visual Indicators:** Uses status icons (❌ for unsecured, ✅ for secured) to provide immediate visual feedback on security status.\n- **Security Recommendations:** Provides actionable guidance on how to secure Connected Apps through proper configuration.\n- **Notifications:** Sends alerts to configured channels (Grafana, Slack, MS Teams) with security findings and attached reports.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-security/) and can output Grafana, Slack and MsTeams Notifications.\n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/jHv8yrSK8Dg\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query Execution:** Executes a comprehensive SOQL query on the `OauthToken` object, joining with `AppMenuItem` and `User` objects to gather complete security context.\n- **Security Analysis Logic:** Analyzes the `AppMenuItem.IsUsingAdminAuthorization` field to determine if a Connected App requires admin pre-approval for user authorization.\n- **Data Transformation:** Processes raw SOQL results to add security status indicators and reorganize data for optimal reporting and analysis.\n- **Aggregation Processing:** Groups OAuth tokens by Connected App name to provide summary statistics and identify the most problematic applications.\n- **Report Generation:** Uses `generateCsvFile` to create structured CSV reports with proper formatting and metadata for easy analysis and sharing.\n- **Notification Integration:** Integrates with the `NotifProvider` to send security alerts with detailed metrics, including the number of unsecured Connected Apps and associated OAuth tokens.\n- **File Management:** Generates multiple output formats (CSV, XLSX) and manages file paths using `generateReportPath` for consistent report organization.\n- **Connection Management:** Uses `setConnectionVariables` to ensure proper authentication context for notification providers that require org connection details.\n</details>\n",
|
|
6422
6423
|
"examples": [
|
|
6423
|
-
"$ sf hardis:org:
|
|
6424
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
6424
6425
|
],
|
|
6425
6426
|
"flags": {
|
|
6426
6427
|
"json": {
|
|
@@ -6438,48 +6439,14 @@
|
|
|
6438
6439
|
"multiple": false,
|
|
6439
6440
|
"type": "option"
|
|
6440
6441
|
},
|
|
6441
|
-
"
|
|
6442
|
-
"char": "
|
|
6443
|
-
"description": "
|
|
6444
|
-
"name": "
|
|
6445
|
-
"hasDynamicHelp": false,
|
|
6446
|
-
"multiple": false,
|
|
6447
|
-
"type": "option"
|
|
6448
|
-
},
|
|
6449
|
-
"chunksize": {
|
|
6450
|
-
"char": "c",
|
|
6451
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
6452
|
-
"name": "chunksize",
|
|
6453
|
-
"default": 1000,
|
|
6454
|
-
"hasDynamicHelp": false,
|
|
6455
|
-
"multiple": false,
|
|
6456
|
-
"type": "option"
|
|
6457
|
-
},
|
|
6458
|
-
"polltimeout": {
|
|
6459
|
-
"char": "t",
|
|
6460
|
-
"description": "Timeout in MS for Bulk API calls",
|
|
6461
|
-
"name": "polltimeout",
|
|
6462
|
-
"default": 300000,
|
|
6463
|
-
"hasDynamicHelp": false,
|
|
6464
|
-
"multiple": false,
|
|
6465
|
-
"type": "option"
|
|
6466
|
-
},
|
|
6467
|
-
"startchunknumber": {
|
|
6468
|
-
"char": "s",
|
|
6469
|
-
"description": "Chunk number to start from",
|
|
6470
|
-
"name": "startchunknumber",
|
|
6471
|
-
"default": 0,
|
|
6442
|
+
"outputfile": {
|
|
6443
|
+
"char": "f",
|
|
6444
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6445
|
+
"name": "outputfile",
|
|
6472
6446
|
"hasDynamicHelp": false,
|
|
6473
6447
|
"multiple": false,
|
|
6474
6448
|
"type": "option"
|
|
6475
6449
|
},
|
|
6476
|
-
"resume": {
|
|
6477
|
-
"char": "r",
|
|
6478
|
-
"description": "Resume previous export by checking existing files (default in CI)",
|
|
6479
|
-
"name": "resume",
|
|
6480
|
-
"allowNo": false,
|
|
6481
|
-
"type": "boolean"
|
|
6482
|
-
},
|
|
6483
6450
|
"debug": {
|
|
6484
6451
|
"char": "d",
|
|
6485
6452
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6518,13 +6485,13 @@
|
|
|
6518
6485
|
},
|
|
6519
6486
|
"hasDynamicHelp": true,
|
|
6520
6487
|
"hiddenAliases": [],
|
|
6521
|
-
"id": "hardis:org:
|
|
6488
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
6522
6489
|
"pluginAlias": "sfdx-hardis",
|
|
6523
6490
|
"pluginName": "sfdx-hardis",
|
|
6524
6491
|
"pluginType": "core",
|
|
6525
6492
|
"strict": true,
|
|
6526
6493
|
"enableJsonFlag": true,
|
|
6527
|
-
"title": "
|
|
6494
|
+
"title": "Detect Unsecured Connected Apps",
|
|
6528
6495
|
"requiresProject": false,
|
|
6529
6496
|
"isESM": true,
|
|
6530
6497
|
"relativePath": [
|
|
@@ -6532,43 +6499,44 @@
|
|
|
6532
6499
|
"commands",
|
|
6533
6500
|
"hardis",
|
|
6534
6501
|
"org",
|
|
6535
|
-
"
|
|
6536
|
-
"
|
|
6502
|
+
"diagnose",
|
|
6503
|
+
"unsecure-connected-apps.js"
|
|
6537
6504
|
],
|
|
6538
6505
|
"aliasPermutations": [],
|
|
6539
6506
|
"permutations": [
|
|
6540
|
-
"hardis:org:
|
|
6541
|
-
"org:hardis:
|
|
6542
|
-
"org:
|
|
6543
|
-
"org:
|
|
6544
|
-
"hardis:
|
|
6545
|
-
"
|
|
6546
|
-
"
|
|
6547
|
-
"
|
|
6548
|
-
"hardis:
|
|
6549
|
-
"
|
|
6550
|
-
"
|
|
6551
|
-
"
|
|
6552
|
-
"hardis:org:
|
|
6553
|
-
"org:hardis:
|
|
6554
|
-
"org:
|
|
6555
|
-
"org:
|
|
6556
|
-
"hardis:
|
|
6557
|
-
"
|
|
6558
|
-
"
|
|
6559
|
-
"
|
|
6560
|
-
"hardis:
|
|
6561
|
-
"
|
|
6562
|
-
"
|
|
6563
|
-
"
|
|
6507
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
6508
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
6509
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
6510
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
6511
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
6512
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
6513
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
6514
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
6515
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
6516
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
6517
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
6518
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
6519
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
6520
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
6521
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
6522
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
6523
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
6524
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
6525
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
6526
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
6527
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
6528
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
6529
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
6530
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
6564
6531
|
]
|
|
6565
6532
|
},
|
|
6566
|
-
"hardis:org:
|
|
6533
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6567
6534
|
"aliases": [],
|
|
6568
6535
|
"args": {},
|
|
6569
|
-
"description": "
|
|
6536
|
+
"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",
|
|
6570
6537
|
"examples": [
|
|
6571
|
-
"$ sf hardis:org:
|
|
6538
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6539
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6572
6540
|
],
|
|
6573
6541
|
"flags": {
|
|
6574
6542
|
"json": {
|
|
@@ -6586,20 +6554,21 @@
|
|
|
6586
6554
|
"multiple": false,
|
|
6587
6555
|
"type": "option"
|
|
6588
6556
|
},
|
|
6589
|
-
"
|
|
6590
|
-
"char": "
|
|
6591
|
-
"description": "
|
|
6592
|
-
"name": "
|
|
6557
|
+
"outputfile": {
|
|
6558
|
+
"char": "f",
|
|
6559
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6560
|
+
"name": "outputfile",
|
|
6593
6561
|
"hasDynamicHelp": false,
|
|
6594
6562
|
"multiple": false,
|
|
6595
6563
|
"type": "option"
|
|
6596
6564
|
},
|
|
6597
|
-
"
|
|
6598
|
-
"char": "
|
|
6599
|
-
"description": "
|
|
6600
|
-
"name": "
|
|
6601
|
-
"
|
|
6602
|
-
"
|
|
6565
|
+
"days": {
|
|
6566
|
+
"char": "t",
|
|
6567
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6568
|
+
"name": "days",
|
|
6569
|
+
"hasDynamicHelp": false,
|
|
6570
|
+
"multiple": false,
|
|
6571
|
+
"type": "option"
|
|
6603
6572
|
},
|
|
6604
6573
|
"debug": {
|
|
6605
6574
|
"char": "d",
|
|
@@ -6639,13 +6608,13 @@
|
|
|
6639
6608
|
},
|
|
6640
6609
|
"hasDynamicHelp": true,
|
|
6641
6610
|
"hiddenAliases": [],
|
|
6642
|
-
"id": "hardis:org:
|
|
6611
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6643
6612
|
"pluginAlias": "sfdx-hardis",
|
|
6644
6613
|
"pluginName": "sfdx-hardis",
|
|
6645
6614
|
"pluginType": "core",
|
|
6646
6615
|
"strict": true,
|
|
6647
6616
|
"enableJsonFlag": true,
|
|
6648
|
-
"title": "
|
|
6617
|
+
"title": "Detect unused Apex classes in an org",
|
|
6649
6618
|
"requiresProject": false,
|
|
6650
6619
|
"isESM": true,
|
|
6651
6620
|
"relativePath": [
|
|
@@ -6653,43 +6622,43 @@
|
|
|
6653
6622
|
"commands",
|
|
6654
6623
|
"hardis",
|
|
6655
6624
|
"org",
|
|
6656
|
-
"
|
|
6657
|
-
"
|
|
6625
|
+
"diagnose",
|
|
6626
|
+
"unused-apex-classes.js"
|
|
6658
6627
|
],
|
|
6659
6628
|
"aliasPermutations": [],
|
|
6660
6629
|
"permutations": [
|
|
6661
|
-
"hardis:org:
|
|
6662
|
-
"org:hardis:
|
|
6663
|
-
"org:
|
|
6664
|
-
"org:
|
|
6665
|
-
"hardis:
|
|
6666
|
-
"
|
|
6667
|
-
"
|
|
6668
|
-
"
|
|
6669
|
-
"hardis:
|
|
6670
|
-
"
|
|
6671
|
-
"
|
|
6672
|
-
"
|
|
6673
|
-
"hardis:org:
|
|
6674
|
-
"org:hardis:
|
|
6675
|
-
"org:
|
|
6676
|
-
"org:
|
|
6677
|
-
"hardis:
|
|
6678
|
-
"
|
|
6679
|
-
"
|
|
6680
|
-
"
|
|
6681
|
-
"hardis:
|
|
6682
|
-
"
|
|
6683
|
-
"
|
|
6684
|
-
"
|
|
6630
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6631
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6632
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6633
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6634
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6635
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6636
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6637
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6638
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6639
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6640
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6641
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6642
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6643
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6644
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6645
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6646
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6647
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6648
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6649
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6650
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6651
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6652
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6653
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6685
6654
|
]
|
|
6686
6655
|
},
|
|
6687
|
-
"hardis:org:
|
|
6656
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6688
6657
|
"aliases": [],
|
|
6689
6658
|
"args": {},
|
|
6690
|
-
"description": "\n## Command Behavior\n\n**
|
|
6659
|
+
"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",
|
|
6691
6660
|
"examples": [
|
|
6692
|
-
"$ sf hardis:org:
|
|
6661
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6693
6662
|
],
|
|
6694
6663
|
"flags": {
|
|
6695
6664
|
"json": {
|
|
@@ -6707,10 +6676,10 @@
|
|
|
6707
6676
|
"multiple": false,
|
|
6708
6677
|
"type": "option"
|
|
6709
6678
|
},
|
|
6710
|
-
"
|
|
6711
|
-
"char": "
|
|
6712
|
-
"description": "
|
|
6713
|
-
"name": "
|
|
6679
|
+
"outputfile": {
|
|
6680
|
+
"char": "f",
|
|
6681
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6682
|
+
"name": "outputfile",
|
|
6714
6683
|
"hasDynamicHelp": false,
|
|
6715
6684
|
"multiple": false,
|
|
6716
6685
|
"type": "option"
|
|
@@ -6753,62 +6722,75 @@
|
|
|
6753
6722
|
},
|
|
6754
6723
|
"hasDynamicHelp": true,
|
|
6755
6724
|
"hiddenAliases": [],
|
|
6756
|
-
"id": "hardis:org:
|
|
6725
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6757
6726
|
"pluginAlias": "sfdx-hardis",
|
|
6758
6727
|
"pluginName": "sfdx-hardis",
|
|
6759
6728
|
"pluginType": "core",
|
|
6760
6729
|
"strict": true,
|
|
6761
6730
|
"enableJsonFlag": true,
|
|
6762
|
-
"title": "
|
|
6763
|
-
"
|
|
6764
|
-
|
|
6765
|
-
"
|
|
6731
|
+
"title": "Unused Connected Apps in an org",
|
|
6732
|
+
"allowedInactiveConnectedApps": [
|
|
6733
|
+
"Ant Migration Tool",
|
|
6734
|
+
"Chatter Desktop",
|
|
6735
|
+
"Chatter Mobile for BlackBerry",
|
|
6736
|
+
"Force.com IDE",
|
|
6737
|
+
"OIQ_Integration",
|
|
6738
|
+
"Salesforce CLI",
|
|
6739
|
+
"Salesforce Files",
|
|
6740
|
+
"Salesforce Mobile Dashboards",
|
|
6741
|
+
"Salesforce Touch",
|
|
6742
|
+
"Salesforce for Outlook",
|
|
6743
|
+
"SalesforceA",
|
|
6744
|
+
"SalesforceA for Android",
|
|
6745
|
+
"SalesforceA for iOS",
|
|
6746
|
+
"SalesforceDX Namespace Registry",
|
|
6747
|
+
"SalesforceIQ"
|
|
6766
6748
|
],
|
|
6749
|
+
"requiresProject": false,
|
|
6767
6750
|
"isESM": true,
|
|
6768
6751
|
"relativePath": [
|
|
6769
6752
|
"lib",
|
|
6770
6753
|
"commands",
|
|
6771
6754
|
"hardis",
|
|
6772
6755
|
"org",
|
|
6773
|
-
"
|
|
6774
|
-
"
|
|
6756
|
+
"diagnose",
|
|
6757
|
+
"unused-connected-apps.js"
|
|
6775
6758
|
],
|
|
6776
6759
|
"aliasPermutations": [],
|
|
6777
6760
|
"permutations": [
|
|
6778
|
-
"hardis:org:
|
|
6779
|
-
"org:hardis:
|
|
6780
|
-
"org:
|
|
6781
|
-
"org:
|
|
6782
|
-
"hardis:
|
|
6783
|
-
"
|
|
6784
|
-
"
|
|
6785
|
-
"
|
|
6786
|
-
"hardis:
|
|
6787
|
-
"
|
|
6788
|
-
"
|
|
6789
|
-
"
|
|
6790
|
-
"hardis:org:
|
|
6791
|
-
"org:hardis:
|
|
6792
|
-
"org:
|
|
6793
|
-
"org:
|
|
6794
|
-
"hardis:
|
|
6795
|
-
"
|
|
6796
|
-
"
|
|
6797
|
-
"
|
|
6798
|
-
"hardis:
|
|
6799
|
-
"
|
|
6800
|
-
"
|
|
6801
|
-
"
|
|
6761
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6762
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6763
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6764
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6765
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6766
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6767
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6768
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6769
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6770
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6771
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6772
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6773
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6774
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6775
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6776
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6777
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6778
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6779
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6780
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6781
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6782
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6783
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6784
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6802
6785
|
]
|
|
6803
6786
|
},
|
|
6804
|
-
"hardis:org:
|
|
6787
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6805
6788
|
"aliases": [],
|
|
6806
6789
|
"args": {},
|
|
6807
|
-
"description": "\n## Command Behavior\n\n**
|
|
6790
|
+
"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",
|
|
6808
6791
|
"examples": [
|
|
6809
|
-
"$ sf hardis:org:
|
|
6810
|
-
"$ sf hardis:org:
|
|
6811
|
-
"$ sf hardis:org:data:export --path ./scripts/data/MyDataProject --no-prompt --target-org my-org@example.com"
|
|
6792
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6793
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6812
6794
|
],
|
|
6813
6795
|
"flags": {
|
|
6814
6796
|
"json": {
|
|
@@ -6826,29 +6808,14 @@
|
|
|
6826
6808
|
"multiple": false,
|
|
6827
6809
|
"type": "option"
|
|
6828
6810
|
},
|
|
6829
|
-
"
|
|
6830
|
-
"char": "
|
|
6831
|
-
"description": "
|
|
6832
|
-
"name": "
|
|
6833
|
-
"hasDynamicHelp": false,
|
|
6834
|
-
"multiple": false,
|
|
6835
|
-
"type": "option"
|
|
6836
|
-
},
|
|
6837
|
-
"path": {
|
|
6838
|
-
"char": "p",
|
|
6839
|
-
"description": "Path to the sfdmu workspace folder",
|
|
6840
|
-
"name": "path",
|
|
6811
|
+
"outputfile": {
|
|
6812
|
+
"char": "f",
|
|
6813
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6814
|
+
"name": "outputfile",
|
|
6841
6815
|
"hasDynamicHelp": false,
|
|
6842
6816
|
"multiple": false,
|
|
6843
6817
|
"type": "option"
|
|
6844
6818
|
},
|
|
6845
|
-
"no-prompt": {
|
|
6846
|
-
"char": "r",
|
|
6847
|
-
"description": "Do not prompt for Org, use default org",
|
|
6848
|
-
"name": "no-prompt",
|
|
6849
|
-
"allowNo": false,
|
|
6850
|
-
"type": "boolean"
|
|
6851
|
-
},
|
|
6852
6819
|
"debug": {
|
|
6853
6820
|
"char": "d",
|
|
6854
6821
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6887,16 +6854,31 @@
|
|
|
6887
6854
|
},
|
|
6888
6855
|
"hasDynamicHelp": true,
|
|
6889
6856
|
"hiddenAliases": [],
|
|
6890
|
-
"id": "hardis:org:
|
|
6857
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
6891
6858
|
"pluginAlias": "sfdx-hardis",
|
|
6892
6859
|
"pluginName": "sfdx-hardis",
|
|
6893
6860
|
"pluginType": "core",
|
|
6894
6861
|
"strict": true,
|
|
6895
6862
|
"enableJsonFlag": true,
|
|
6896
|
-
"title": "
|
|
6863
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
6897
6864
|
"requiresProject": false,
|
|
6898
|
-
"
|
|
6899
|
-
"
|
|
6865
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6866
|
+
"Sales_User"
|
|
6867
|
+
],
|
|
6868
|
+
"permSetsPermSetLicenses": [
|
|
6869
|
+
{
|
|
6870
|
+
"permSet": "Sales_User",
|
|
6871
|
+
"permSetLicense": "SalesUserPsl"
|
|
6872
|
+
}
|
|
6873
|
+
],
|
|
6874
|
+
"profilesPermissionSetLicenses": [
|
|
6875
|
+
{
|
|
6876
|
+
"profile": "Salesforce API Only",
|
|
6877
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6878
|
+
}
|
|
6879
|
+
],
|
|
6880
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6881
|
+
"IdentityConnect"
|
|
6900
6882
|
],
|
|
6901
6883
|
"isESM": true,
|
|
6902
6884
|
"relativePath": [
|
|
@@ -6904,46 +6886,47 @@
|
|
|
6904
6886
|
"commands",
|
|
6905
6887
|
"hardis",
|
|
6906
6888
|
"org",
|
|
6907
|
-
"
|
|
6908
|
-
"
|
|
6889
|
+
"diagnose",
|
|
6890
|
+
"unusedlicenses.js"
|
|
6909
6891
|
],
|
|
6910
6892
|
"aliasPermutations": [],
|
|
6911
6893
|
"permutations": [
|
|
6912
|
-
"hardis:org:
|
|
6913
|
-
"org:hardis:
|
|
6914
|
-
"org:
|
|
6915
|
-
"org:
|
|
6916
|
-
"hardis:
|
|
6917
|
-
"
|
|
6918
|
-
"
|
|
6919
|
-
"
|
|
6920
|
-
"hardis:
|
|
6921
|
-
"
|
|
6922
|
-
"
|
|
6923
|
-
"
|
|
6924
|
-
"hardis:org:
|
|
6925
|
-
"org:hardis:
|
|
6926
|
-
"org:
|
|
6927
|
-
"org:
|
|
6928
|
-
"hardis:
|
|
6929
|
-
"
|
|
6930
|
-
"
|
|
6931
|
-
"
|
|
6932
|
-
"hardis:
|
|
6933
|
-
"
|
|
6934
|
-
"
|
|
6935
|
-
"
|
|
6894
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
6895
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
6896
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
6897
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
6898
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
6899
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
6900
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
6901
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
6902
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
6903
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
6904
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
6905
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
6906
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
6907
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
6908
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
6909
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
6910
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
6911
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
6912
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
6913
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
6914
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
6915
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
6916
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
6917
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
6936
6918
|
]
|
|
6937
6919
|
},
|
|
6938
|
-
"hardis:org:
|
|
6920
|
+
"hardis:org:diagnose:unusedusers": {
|
|
6939
6921
|
"aliases": [],
|
|
6940
6922
|
"args": {},
|
|
6941
|
-
"description": "
|
|
6923
|
+
"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>",
|
|
6942
6924
|
"examples": [
|
|
6943
|
-
"$ sf hardis:org:
|
|
6944
|
-
"$ sf hardis:org:
|
|
6945
|
-
"$ sf hardis:org:
|
|
6946
|
-
"$
|
|
6925
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
6926
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6927
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6928
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6929
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6947
6930
|
],
|
|
6948
6931
|
"flags": {
|
|
6949
6932
|
"json": {
|
|
@@ -6961,26 +6944,46 @@
|
|
|
6961
6944
|
"multiple": false,
|
|
6962
6945
|
"type": "option"
|
|
6963
6946
|
},
|
|
6964
|
-
"
|
|
6965
|
-
"char": "
|
|
6966
|
-
"description": "
|
|
6967
|
-
"name": "
|
|
6947
|
+
"outputfile": {
|
|
6948
|
+
"char": "f",
|
|
6949
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6950
|
+
"name": "outputfile",
|
|
6951
|
+
"hasDynamicHelp": false,
|
|
6952
|
+
"multiple": false,
|
|
6953
|
+
"type": "option"
|
|
6954
|
+
},
|
|
6955
|
+
"days": {
|
|
6956
|
+
"char": "t",
|
|
6957
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6958
|
+
"name": "days",
|
|
6959
|
+
"hasDynamicHelp": false,
|
|
6960
|
+
"multiple": false,
|
|
6961
|
+
"type": "option"
|
|
6962
|
+
},
|
|
6963
|
+
"licensetypes": {
|
|
6964
|
+
"char": "l",
|
|
6965
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6966
|
+
"name": "licensetypes",
|
|
6968
6967
|
"hasDynamicHelp": false,
|
|
6969
6968
|
"multiple": false,
|
|
6969
|
+
"options": [
|
|
6970
|
+
"all",
|
|
6971
|
+
"all-crm",
|
|
6972
|
+
"all-paying"
|
|
6973
|
+
],
|
|
6970
6974
|
"type": "option"
|
|
6971
6975
|
},
|
|
6972
|
-
"
|
|
6973
|
-
"char": "
|
|
6974
|
-
"description": "
|
|
6975
|
-
"name": "
|
|
6976
|
+
"licenseidentifiers": {
|
|
6977
|
+
"char": "i",
|
|
6978
|
+
"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",
|
|
6979
|
+
"name": "licenseidentifiers",
|
|
6976
6980
|
"hasDynamicHelp": false,
|
|
6977
6981
|
"multiple": false,
|
|
6978
6982
|
"type": "option"
|
|
6979
6983
|
},
|
|
6980
|
-
"
|
|
6981
|
-
"
|
|
6982
|
-
"
|
|
6983
|
-
"name": "no-prompt",
|
|
6984
|
+
"returnactiveusers": {
|
|
6985
|
+
"description": "Inverts the command by returning the active users",
|
|
6986
|
+
"name": "returnactiveusers",
|
|
6984
6987
|
"allowNo": false,
|
|
6985
6988
|
"type": "boolean"
|
|
6986
6989
|
},
|
|
@@ -7022,52 +7025,49 @@
|
|
|
7022
7025
|
},
|
|
7023
7026
|
"hasDynamicHelp": true,
|
|
7024
7027
|
"hiddenAliases": [],
|
|
7025
|
-
"id": "hardis:org:
|
|
7028
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
7026
7029
|
"pluginAlias": "sfdx-hardis",
|
|
7027
7030
|
"pluginName": "sfdx-hardis",
|
|
7028
7031
|
"pluginType": "core",
|
|
7029
7032
|
"strict": true,
|
|
7030
7033
|
"enableJsonFlag": true,
|
|
7031
|
-
"title": "
|
|
7034
|
+
"title": "Detect unused Users in Salesforce",
|
|
7032
7035
|
"requiresProject": false,
|
|
7033
|
-
"requiresSfdxPlugins": [
|
|
7034
|
-
"sfdmu"
|
|
7035
|
-
],
|
|
7036
7036
|
"isESM": true,
|
|
7037
7037
|
"relativePath": [
|
|
7038
7038
|
"lib",
|
|
7039
7039
|
"commands",
|
|
7040
7040
|
"hardis",
|
|
7041
7041
|
"org",
|
|
7042
|
-
"
|
|
7043
|
-
"
|
|
7042
|
+
"diagnose",
|
|
7043
|
+
"unusedusers.js"
|
|
7044
7044
|
],
|
|
7045
7045
|
"aliasPermutations": [],
|
|
7046
7046
|
"permutations": [
|
|
7047
|
-
"hardis:org:
|
|
7048
|
-
"org:hardis:
|
|
7049
|
-
"org:
|
|
7050
|
-
"org:
|
|
7051
|
-
"hardis:
|
|
7052
|
-
"
|
|
7053
|
-
"
|
|
7054
|
-
"
|
|
7055
|
-
"hardis:
|
|
7056
|
-
"
|
|
7057
|
-
"
|
|
7058
|
-
"
|
|
7059
|
-
"hardis:org:
|
|
7060
|
-
"org:hardis:
|
|
7061
|
-
"org:
|
|
7062
|
-
"org:
|
|
7063
|
-
"hardis:
|
|
7064
|
-
"
|
|
7065
|
-
"
|
|
7066
|
-
"
|
|
7067
|
-
"hardis:
|
|
7068
|
-
"
|
|
7069
|
-
"
|
|
7070
|
-
"
|
|
7047
|
+
"hardis:org:diagnose:unusedusers",
|
|
7048
|
+
"org:hardis:diagnose:unusedusers",
|
|
7049
|
+
"org:diagnose:hardis:unusedusers",
|
|
7050
|
+
"org:diagnose:unusedusers:hardis",
|
|
7051
|
+
"hardis:diagnose:org:unusedusers",
|
|
7052
|
+
"diagnose:hardis:org:unusedusers",
|
|
7053
|
+
"diagnose:org:hardis:unusedusers",
|
|
7054
|
+
"diagnose:org:unusedusers:hardis",
|
|
7055
|
+
"hardis:diagnose:unusedusers:org",
|
|
7056
|
+
"diagnose:hardis:unusedusers:org",
|
|
7057
|
+
"diagnose:unusedusers:hardis:org",
|
|
7058
|
+
"diagnose:unusedusers:org:hardis",
|
|
7059
|
+
"hardis:org:unusedusers:diagnose",
|
|
7060
|
+
"org:hardis:unusedusers:diagnose",
|
|
7061
|
+
"org:unusedusers:hardis:diagnose",
|
|
7062
|
+
"org:unusedusers:diagnose:hardis",
|
|
7063
|
+
"hardis:unusedusers:org:diagnose",
|
|
7064
|
+
"unusedusers:hardis:org:diagnose",
|
|
7065
|
+
"unusedusers:org:hardis:diagnose",
|
|
7066
|
+
"unusedusers:org:diagnose:hardis",
|
|
7067
|
+
"hardis:unusedusers:diagnose:org",
|
|
7068
|
+
"unusedusers:hardis:diagnose:org",
|
|
7069
|
+
"unusedusers:diagnose:hardis:org",
|
|
7070
|
+
"unusedusers:diagnose:org:hardis"
|
|
7071
7071
|
]
|
|
7072
7072
|
},
|
|
7073
7073
|
"hardis:org:fix:listviewmine": {
|
|
@@ -12581,6 +12581,221 @@
|
|
|
12581
12581
|
"validate:deploy:project:hardis"
|
|
12582
12582
|
]
|
|
12583
12583
|
},
|
|
12584
|
+
"hardis:project:fix:profiletabs": {
|
|
12585
|
+
"aliases": [],
|
|
12586
|
+
"args": {},
|
|
12587
|
+
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
|
|
12588
|
+
"examples": [
|
|
12589
|
+
"$ sf hardis:project:fix:profiletabs"
|
|
12590
|
+
],
|
|
12591
|
+
"flags": {
|
|
12592
|
+
"json": {
|
|
12593
|
+
"description": "Format output as json.",
|
|
12594
|
+
"helpGroup": "GLOBAL",
|
|
12595
|
+
"name": "json",
|
|
12596
|
+
"allowNo": false,
|
|
12597
|
+
"type": "boolean"
|
|
12598
|
+
},
|
|
12599
|
+
"flags-dir": {
|
|
12600
|
+
"helpGroup": "GLOBAL",
|
|
12601
|
+
"name": "flags-dir",
|
|
12602
|
+
"summary": "Import flag values from a directory.",
|
|
12603
|
+
"hasDynamicHelp": false,
|
|
12604
|
+
"multiple": false,
|
|
12605
|
+
"type": "option"
|
|
12606
|
+
},
|
|
12607
|
+
"path": {
|
|
12608
|
+
"char": "p",
|
|
12609
|
+
"description": "Root folder",
|
|
12610
|
+
"name": "path",
|
|
12611
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12612
|
+
"hasDynamicHelp": false,
|
|
12613
|
+
"multiple": false,
|
|
12614
|
+
"type": "option"
|
|
12615
|
+
},
|
|
12616
|
+
"debug": {
|
|
12617
|
+
"char": "d",
|
|
12618
|
+
"description": "Activate debug mode (more logs)",
|
|
12619
|
+
"name": "debug",
|
|
12620
|
+
"allowNo": false,
|
|
12621
|
+
"type": "boolean"
|
|
12622
|
+
},
|
|
12623
|
+
"websocket": {
|
|
12624
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12625
|
+
"name": "websocket",
|
|
12626
|
+
"hasDynamicHelp": false,
|
|
12627
|
+
"multiple": false,
|
|
12628
|
+
"type": "option"
|
|
12629
|
+
},
|
|
12630
|
+
"skipauth": {
|
|
12631
|
+
"description": "Skip authentication check when a default username is required",
|
|
12632
|
+
"name": "skipauth",
|
|
12633
|
+
"allowNo": false,
|
|
12634
|
+
"type": "boolean"
|
|
12635
|
+
},
|
|
12636
|
+
"target-org": {
|
|
12637
|
+
"aliases": [
|
|
12638
|
+
"targetusername",
|
|
12639
|
+
"u"
|
|
12640
|
+
],
|
|
12641
|
+
"char": "o",
|
|
12642
|
+
"deprecateAliases": true,
|
|
12643
|
+
"name": "target-org",
|
|
12644
|
+
"noCacheDefault": true,
|
|
12645
|
+
"required": true,
|
|
12646
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
12647
|
+
"hasDynamicHelp": true,
|
|
12648
|
+
"multiple": false,
|
|
12649
|
+
"type": "option"
|
|
12650
|
+
}
|
|
12651
|
+
},
|
|
12652
|
+
"hasDynamicHelp": true,
|
|
12653
|
+
"hiddenAliases": [],
|
|
12654
|
+
"id": "hardis:project:fix:profiletabs",
|
|
12655
|
+
"pluginAlias": "sfdx-hardis",
|
|
12656
|
+
"pluginName": "sfdx-hardis",
|
|
12657
|
+
"pluginType": "core",
|
|
12658
|
+
"strict": true,
|
|
12659
|
+
"enableJsonFlag": true,
|
|
12660
|
+
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
12661
|
+
"requiresProject": true,
|
|
12662
|
+
"isESM": true,
|
|
12663
|
+
"relativePath": [
|
|
12664
|
+
"lib",
|
|
12665
|
+
"commands",
|
|
12666
|
+
"hardis",
|
|
12667
|
+
"project",
|
|
12668
|
+
"fix",
|
|
12669
|
+
"profiletabs.js"
|
|
12670
|
+
],
|
|
12671
|
+
"aliasPermutations": [],
|
|
12672
|
+
"permutations": [
|
|
12673
|
+
"hardis:project:fix:profiletabs",
|
|
12674
|
+
"project:hardis:fix:profiletabs",
|
|
12675
|
+
"project:fix:hardis:profiletabs",
|
|
12676
|
+
"project:fix:profiletabs:hardis",
|
|
12677
|
+
"hardis:fix:project:profiletabs",
|
|
12678
|
+
"fix:hardis:project:profiletabs",
|
|
12679
|
+
"fix:project:hardis:profiletabs",
|
|
12680
|
+
"fix:project:profiletabs:hardis",
|
|
12681
|
+
"hardis:fix:profiletabs:project",
|
|
12682
|
+
"fix:hardis:profiletabs:project",
|
|
12683
|
+
"fix:profiletabs:hardis:project",
|
|
12684
|
+
"fix:profiletabs:project:hardis",
|
|
12685
|
+
"hardis:project:profiletabs:fix",
|
|
12686
|
+
"project:hardis:profiletabs:fix",
|
|
12687
|
+
"project:profiletabs:hardis:fix",
|
|
12688
|
+
"project:profiletabs:fix:hardis",
|
|
12689
|
+
"hardis:profiletabs:project:fix",
|
|
12690
|
+
"profiletabs:hardis:project:fix",
|
|
12691
|
+
"profiletabs:project:hardis:fix",
|
|
12692
|
+
"profiletabs:project:fix:hardis",
|
|
12693
|
+
"hardis:profiletabs:fix:project",
|
|
12694
|
+
"profiletabs:hardis:fix:project",
|
|
12695
|
+
"profiletabs:fix:hardis:project",
|
|
12696
|
+
"profiletabs:fix:project:hardis"
|
|
12697
|
+
]
|
|
12698
|
+
},
|
|
12699
|
+
"hardis:project:fix:v53flexipages": {
|
|
12700
|
+
"aliases": [],
|
|
12701
|
+
"args": {},
|
|
12702
|
+
"description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n</details>\n",
|
|
12703
|
+
"examples": [
|
|
12704
|
+
"$ sf hardis:project:fix:v53flexipages"
|
|
12705
|
+
],
|
|
12706
|
+
"flags": {
|
|
12707
|
+
"json": {
|
|
12708
|
+
"description": "Format output as json.",
|
|
12709
|
+
"helpGroup": "GLOBAL",
|
|
12710
|
+
"name": "json",
|
|
12711
|
+
"allowNo": false,
|
|
12712
|
+
"type": "boolean"
|
|
12713
|
+
},
|
|
12714
|
+
"flags-dir": {
|
|
12715
|
+
"helpGroup": "GLOBAL",
|
|
12716
|
+
"name": "flags-dir",
|
|
12717
|
+
"summary": "Import flag values from a directory.",
|
|
12718
|
+
"hasDynamicHelp": false,
|
|
12719
|
+
"multiple": false,
|
|
12720
|
+
"type": "option"
|
|
12721
|
+
},
|
|
12722
|
+
"path": {
|
|
12723
|
+
"char": "p",
|
|
12724
|
+
"description": "Root folder",
|
|
12725
|
+
"name": "path",
|
|
12726
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12727
|
+
"hasDynamicHelp": false,
|
|
12728
|
+
"multiple": false,
|
|
12729
|
+
"type": "option"
|
|
12730
|
+
},
|
|
12731
|
+
"debug": {
|
|
12732
|
+
"char": "d",
|
|
12733
|
+
"description": "Activate debug mode (more logs)",
|
|
12734
|
+
"name": "debug",
|
|
12735
|
+
"allowNo": false,
|
|
12736
|
+
"type": "boolean"
|
|
12737
|
+
},
|
|
12738
|
+
"websocket": {
|
|
12739
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12740
|
+
"name": "websocket",
|
|
12741
|
+
"hasDynamicHelp": false,
|
|
12742
|
+
"multiple": false,
|
|
12743
|
+
"type": "option"
|
|
12744
|
+
},
|
|
12745
|
+
"skipauth": {
|
|
12746
|
+
"description": "Skip authentication check when a default username is required",
|
|
12747
|
+
"name": "skipauth",
|
|
12748
|
+
"allowNo": false,
|
|
12749
|
+
"type": "boolean"
|
|
12750
|
+
}
|
|
12751
|
+
},
|
|
12752
|
+
"hasDynamicHelp": false,
|
|
12753
|
+
"hiddenAliases": [],
|
|
12754
|
+
"id": "hardis:project:fix:v53flexipages",
|
|
12755
|
+
"pluginAlias": "sfdx-hardis",
|
|
12756
|
+
"pluginName": "sfdx-hardis",
|
|
12757
|
+
"pluginType": "core",
|
|
12758
|
+
"strict": true,
|
|
12759
|
+
"enableJsonFlag": true,
|
|
12760
|
+
"title": "Fix flexipages for v53",
|
|
12761
|
+
"requiresProject": true,
|
|
12762
|
+
"isESM": true,
|
|
12763
|
+
"relativePath": [
|
|
12764
|
+
"lib",
|
|
12765
|
+
"commands",
|
|
12766
|
+
"hardis",
|
|
12767
|
+
"project",
|
|
12768
|
+
"fix",
|
|
12769
|
+
"v53flexipages.js"
|
|
12770
|
+
],
|
|
12771
|
+
"aliasPermutations": [],
|
|
12772
|
+
"permutations": [
|
|
12773
|
+
"hardis:project:fix:v53flexipages",
|
|
12774
|
+
"project:hardis:fix:v53flexipages",
|
|
12775
|
+
"project:fix:hardis:v53flexipages",
|
|
12776
|
+
"project:fix:v53flexipages:hardis",
|
|
12777
|
+
"hardis:fix:project:v53flexipages",
|
|
12778
|
+
"fix:hardis:project:v53flexipages",
|
|
12779
|
+
"fix:project:hardis:v53flexipages",
|
|
12780
|
+
"fix:project:v53flexipages:hardis",
|
|
12781
|
+
"hardis:fix:v53flexipages:project",
|
|
12782
|
+
"fix:hardis:v53flexipages:project",
|
|
12783
|
+
"fix:v53flexipages:hardis:project",
|
|
12784
|
+
"fix:v53flexipages:project:hardis",
|
|
12785
|
+
"hardis:project:v53flexipages:fix",
|
|
12786
|
+
"project:hardis:v53flexipages:fix",
|
|
12787
|
+
"project:v53flexipages:hardis:fix",
|
|
12788
|
+
"project:v53flexipages:fix:hardis",
|
|
12789
|
+
"hardis:v53flexipages:project:fix",
|
|
12790
|
+
"v53flexipages:hardis:project:fix",
|
|
12791
|
+
"v53flexipages:project:hardis:fix",
|
|
12792
|
+
"v53flexipages:project:fix:hardis",
|
|
12793
|
+
"hardis:v53flexipages:fix:project",
|
|
12794
|
+
"v53flexipages:hardis:fix:project",
|
|
12795
|
+
"v53flexipages:fix:hardis:project",
|
|
12796
|
+
"v53flexipages:fix:project:hardis"
|
|
12797
|
+
]
|
|
12798
|
+
},
|
|
12584
12799
|
"hardis:project:generate:bypass": {
|
|
12585
12800
|
"aliases": [],
|
|
12586
12801
|
"args": {},
|
|
@@ -12976,221 +13191,6 @@
|
|
|
12976
13191
|
"gitdelta:generate:project:hardis"
|
|
12977
13192
|
]
|
|
12978
13193
|
},
|
|
12979
|
-
"hardis:project:fix:profiletabs": {
|
|
12980
|
-
"aliases": [],
|
|
12981
|
-
"args": {},
|
|
12982
|
-
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
|
|
12983
|
-
"examples": [
|
|
12984
|
-
"$ sf hardis:project:fix:profiletabs"
|
|
12985
|
-
],
|
|
12986
|
-
"flags": {
|
|
12987
|
-
"json": {
|
|
12988
|
-
"description": "Format output as json.",
|
|
12989
|
-
"helpGroup": "GLOBAL",
|
|
12990
|
-
"name": "json",
|
|
12991
|
-
"allowNo": false,
|
|
12992
|
-
"type": "boolean"
|
|
12993
|
-
},
|
|
12994
|
-
"flags-dir": {
|
|
12995
|
-
"helpGroup": "GLOBAL",
|
|
12996
|
-
"name": "flags-dir",
|
|
12997
|
-
"summary": "Import flag values from a directory.",
|
|
12998
|
-
"hasDynamicHelp": false,
|
|
12999
|
-
"multiple": false,
|
|
13000
|
-
"type": "option"
|
|
13001
|
-
},
|
|
13002
|
-
"path": {
|
|
13003
|
-
"char": "p",
|
|
13004
|
-
"description": "Root folder",
|
|
13005
|
-
"name": "path",
|
|
13006
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
13007
|
-
"hasDynamicHelp": false,
|
|
13008
|
-
"multiple": false,
|
|
13009
|
-
"type": "option"
|
|
13010
|
-
},
|
|
13011
|
-
"debug": {
|
|
13012
|
-
"char": "d",
|
|
13013
|
-
"description": "Activate debug mode (more logs)",
|
|
13014
|
-
"name": "debug",
|
|
13015
|
-
"allowNo": false,
|
|
13016
|
-
"type": "boolean"
|
|
13017
|
-
},
|
|
13018
|
-
"websocket": {
|
|
13019
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
13020
|
-
"name": "websocket",
|
|
13021
|
-
"hasDynamicHelp": false,
|
|
13022
|
-
"multiple": false,
|
|
13023
|
-
"type": "option"
|
|
13024
|
-
},
|
|
13025
|
-
"skipauth": {
|
|
13026
|
-
"description": "Skip authentication check when a default username is required",
|
|
13027
|
-
"name": "skipauth",
|
|
13028
|
-
"allowNo": false,
|
|
13029
|
-
"type": "boolean"
|
|
13030
|
-
},
|
|
13031
|
-
"target-org": {
|
|
13032
|
-
"aliases": [
|
|
13033
|
-
"targetusername",
|
|
13034
|
-
"u"
|
|
13035
|
-
],
|
|
13036
|
-
"char": "o",
|
|
13037
|
-
"deprecateAliases": true,
|
|
13038
|
-
"name": "target-org",
|
|
13039
|
-
"noCacheDefault": true,
|
|
13040
|
-
"required": true,
|
|
13041
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
13042
|
-
"hasDynamicHelp": true,
|
|
13043
|
-
"multiple": false,
|
|
13044
|
-
"type": "option"
|
|
13045
|
-
}
|
|
13046
|
-
},
|
|
13047
|
-
"hasDynamicHelp": true,
|
|
13048
|
-
"hiddenAliases": [],
|
|
13049
|
-
"id": "hardis:project:fix:profiletabs",
|
|
13050
|
-
"pluginAlias": "sfdx-hardis",
|
|
13051
|
-
"pluginName": "sfdx-hardis",
|
|
13052
|
-
"pluginType": "core",
|
|
13053
|
-
"strict": true,
|
|
13054
|
-
"enableJsonFlag": true,
|
|
13055
|
-
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
13056
|
-
"requiresProject": true,
|
|
13057
|
-
"isESM": true,
|
|
13058
|
-
"relativePath": [
|
|
13059
|
-
"lib",
|
|
13060
|
-
"commands",
|
|
13061
|
-
"hardis",
|
|
13062
|
-
"project",
|
|
13063
|
-
"fix",
|
|
13064
|
-
"profiletabs.js"
|
|
13065
|
-
],
|
|
13066
|
-
"aliasPermutations": [],
|
|
13067
|
-
"permutations": [
|
|
13068
|
-
"hardis:project:fix:profiletabs",
|
|
13069
|
-
"project:hardis:fix:profiletabs",
|
|
13070
|
-
"project:fix:hardis:profiletabs",
|
|
13071
|
-
"project:fix:profiletabs:hardis",
|
|
13072
|
-
"hardis:fix:project:profiletabs",
|
|
13073
|
-
"fix:hardis:project:profiletabs",
|
|
13074
|
-
"fix:project:hardis:profiletabs",
|
|
13075
|
-
"fix:project:profiletabs:hardis",
|
|
13076
|
-
"hardis:fix:profiletabs:project",
|
|
13077
|
-
"fix:hardis:profiletabs:project",
|
|
13078
|
-
"fix:profiletabs:hardis:project",
|
|
13079
|
-
"fix:profiletabs:project:hardis",
|
|
13080
|
-
"hardis:project:profiletabs:fix",
|
|
13081
|
-
"project:hardis:profiletabs:fix",
|
|
13082
|
-
"project:profiletabs:hardis:fix",
|
|
13083
|
-
"project:profiletabs:fix:hardis",
|
|
13084
|
-
"hardis:profiletabs:project:fix",
|
|
13085
|
-
"profiletabs:hardis:project:fix",
|
|
13086
|
-
"profiletabs:project:hardis:fix",
|
|
13087
|
-
"profiletabs:project:fix:hardis",
|
|
13088
|
-
"hardis:profiletabs:fix:project",
|
|
13089
|
-
"profiletabs:hardis:fix:project",
|
|
13090
|
-
"profiletabs:fix:hardis:project",
|
|
13091
|
-
"profiletabs:fix:project:hardis"
|
|
13092
|
-
]
|
|
13093
|
-
},
|
|
13094
|
-
"hardis:project:fix:v53flexipages": {
|
|
13095
|
-
"aliases": [],
|
|
13096
|
-
"args": {},
|
|
13097
|
-
"description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n</details>\n",
|
|
13098
|
-
"examples": [
|
|
13099
|
-
"$ sf hardis:project:fix:v53flexipages"
|
|
13100
|
-
],
|
|
13101
|
-
"flags": {
|
|
13102
|
-
"json": {
|
|
13103
|
-
"description": "Format output as json.",
|
|
13104
|
-
"helpGroup": "GLOBAL",
|
|
13105
|
-
"name": "json",
|
|
13106
|
-
"allowNo": false,
|
|
13107
|
-
"type": "boolean"
|
|
13108
|
-
},
|
|
13109
|
-
"flags-dir": {
|
|
13110
|
-
"helpGroup": "GLOBAL",
|
|
13111
|
-
"name": "flags-dir",
|
|
13112
|
-
"summary": "Import flag values from a directory.",
|
|
13113
|
-
"hasDynamicHelp": false,
|
|
13114
|
-
"multiple": false,
|
|
13115
|
-
"type": "option"
|
|
13116
|
-
},
|
|
13117
|
-
"path": {
|
|
13118
|
-
"char": "p",
|
|
13119
|
-
"description": "Root folder",
|
|
13120
|
-
"name": "path",
|
|
13121
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
13122
|
-
"hasDynamicHelp": false,
|
|
13123
|
-
"multiple": false,
|
|
13124
|
-
"type": "option"
|
|
13125
|
-
},
|
|
13126
|
-
"debug": {
|
|
13127
|
-
"char": "d",
|
|
13128
|
-
"description": "Activate debug mode (more logs)",
|
|
13129
|
-
"name": "debug",
|
|
13130
|
-
"allowNo": false,
|
|
13131
|
-
"type": "boolean"
|
|
13132
|
-
},
|
|
13133
|
-
"websocket": {
|
|
13134
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
13135
|
-
"name": "websocket",
|
|
13136
|
-
"hasDynamicHelp": false,
|
|
13137
|
-
"multiple": false,
|
|
13138
|
-
"type": "option"
|
|
13139
|
-
},
|
|
13140
|
-
"skipauth": {
|
|
13141
|
-
"description": "Skip authentication check when a default username is required",
|
|
13142
|
-
"name": "skipauth",
|
|
13143
|
-
"allowNo": false,
|
|
13144
|
-
"type": "boolean"
|
|
13145
|
-
}
|
|
13146
|
-
},
|
|
13147
|
-
"hasDynamicHelp": false,
|
|
13148
|
-
"hiddenAliases": [],
|
|
13149
|
-
"id": "hardis:project:fix:v53flexipages",
|
|
13150
|
-
"pluginAlias": "sfdx-hardis",
|
|
13151
|
-
"pluginName": "sfdx-hardis",
|
|
13152
|
-
"pluginType": "core",
|
|
13153
|
-
"strict": true,
|
|
13154
|
-
"enableJsonFlag": true,
|
|
13155
|
-
"title": "Fix flexipages for v53",
|
|
13156
|
-
"requiresProject": true,
|
|
13157
|
-
"isESM": true,
|
|
13158
|
-
"relativePath": [
|
|
13159
|
-
"lib",
|
|
13160
|
-
"commands",
|
|
13161
|
-
"hardis",
|
|
13162
|
-
"project",
|
|
13163
|
-
"fix",
|
|
13164
|
-
"v53flexipages.js"
|
|
13165
|
-
],
|
|
13166
|
-
"aliasPermutations": [],
|
|
13167
|
-
"permutations": [
|
|
13168
|
-
"hardis:project:fix:v53flexipages",
|
|
13169
|
-
"project:hardis:fix:v53flexipages",
|
|
13170
|
-
"project:fix:hardis:v53flexipages",
|
|
13171
|
-
"project:fix:v53flexipages:hardis",
|
|
13172
|
-
"hardis:fix:project:v53flexipages",
|
|
13173
|
-
"fix:hardis:project:v53flexipages",
|
|
13174
|
-
"fix:project:hardis:v53flexipages",
|
|
13175
|
-
"fix:project:v53flexipages:hardis",
|
|
13176
|
-
"hardis:fix:v53flexipages:project",
|
|
13177
|
-
"fix:hardis:v53flexipages:project",
|
|
13178
|
-
"fix:v53flexipages:hardis:project",
|
|
13179
|
-
"fix:v53flexipages:project:hardis",
|
|
13180
|
-
"hardis:project:v53flexipages:fix",
|
|
13181
|
-
"project:hardis:v53flexipages:fix",
|
|
13182
|
-
"project:v53flexipages:hardis:fix",
|
|
13183
|
-
"project:v53flexipages:fix:hardis",
|
|
13184
|
-
"hardis:v53flexipages:project:fix",
|
|
13185
|
-
"v53flexipages:hardis:project:fix",
|
|
13186
|
-
"v53flexipages:project:hardis:fix",
|
|
13187
|
-
"v53flexipages:project:fix:hardis",
|
|
13188
|
-
"hardis:v53flexipages:fix:project",
|
|
13189
|
-
"v53flexipages:hardis:fix:project",
|
|
13190
|
-
"v53flexipages:fix:hardis:project",
|
|
13191
|
-
"v53flexipages:fix:project:hardis"
|
|
13192
|
-
]
|
|
13193
|
-
},
|
|
13194
13194
|
"hardis:project:metadata:findduplicates": {
|
|
13195
13195
|
"aliases": [],
|
|
13196
13196
|
"args": {},
|
|
@@ -15278,5 +15278,5 @@
|
|
|
15278
15278
|
]
|
|
15279
15279
|
}
|
|
15280
15280
|
},
|
|
15281
|
-
"version": "6.5.
|
|
15281
|
+
"version": "6.5.2"
|
|
15282
15282
|
}
|