sfdx-hardis 6.1.5-beta202508282306.0 → 6.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/commands/hardis/org/select.js +53 -6
- package/lib/commands/hardis/org/select.js.map +1 -1
- package/lib/commands/hardis/work/save.js +7 -8
- package/lib/commands/hardis/work/save.js.map +1 -1
- package/lib/common/gitProvider/index.js +1 -1
- package/lib/common/gitProvider/index.js.map +1 -1
- package/lib/common/metadata-utils/index.js +2 -2
- package/lib/common/metadata-utils/index.js.map +1 -1
- package/lib/common/utils/orgUtils.js +3 -3
- package/lib/common/utils/orgUtils.js.map +1 -1
- package/oclif.lock +18 -18
- package/oclif.manifest.json +676 -661
- package/package.json +5 -5
package/oclif.manifest.json
CHANGED
|
@@ -57,12 +57,13 @@
|
|
|
57
57
|
"world:hello"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
|
-
"hardis:
|
|
60
|
+
"hardis:auth:login": {
|
|
61
61
|
"aliases": [],
|
|
62
62
|
"args": {},
|
|
63
|
-
"description": "\n## Command Behavior\n\n**
|
|
63
|
+
"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",
|
|
64
64
|
"examples": [
|
|
65
|
-
"$ sf hardis:
|
|
65
|
+
"$ sf hardis:auth:login",
|
|
66
|
+
"CI=true sf hardis:auth:login"
|
|
66
67
|
],
|
|
67
68
|
"flags": {
|
|
68
69
|
"json": {
|
|
@@ -80,6 +81,28 @@
|
|
|
80
81
|
"multiple": false,
|
|
81
82
|
"type": "option"
|
|
82
83
|
},
|
|
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
|
+
},
|
|
83
106
|
"debug": {
|
|
84
107
|
"char": "d",
|
|
85
108
|
"description": "Activate debug mode (more logs)",
|
|
@@ -103,41 +126,38 @@
|
|
|
103
126
|
},
|
|
104
127
|
"hasDynamicHelp": false,
|
|
105
128
|
"hiddenAliases": [],
|
|
106
|
-
"id": "hardis:
|
|
129
|
+
"id": "hardis:auth:login",
|
|
107
130
|
"pluginAlias": "sfdx-hardis",
|
|
108
131
|
"pluginName": "sfdx-hardis",
|
|
109
132
|
"pluginType": "core",
|
|
110
133
|
"strict": true,
|
|
111
134
|
"enableJsonFlag": true,
|
|
112
|
-
"title": "
|
|
113
|
-
"uiConfig": {
|
|
114
|
-
"hide": true
|
|
115
|
-
},
|
|
135
|
+
"title": "Login",
|
|
116
136
|
"requiresProject": false,
|
|
117
137
|
"isESM": true,
|
|
118
138
|
"relativePath": [
|
|
119
139
|
"lib",
|
|
120
140
|
"commands",
|
|
121
141
|
"hardis",
|
|
122
|
-
"
|
|
123
|
-
"
|
|
142
|
+
"auth",
|
|
143
|
+
"login.js"
|
|
124
144
|
],
|
|
125
145
|
"aliasPermutations": [],
|
|
126
146
|
"permutations": [
|
|
127
|
-
"hardis:
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"hardis:
|
|
131
|
-
"
|
|
132
|
-
"
|
|
147
|
+
"hardis:auth:login",
|
|
148
|
+
"auth:hardis:login",
|
|
149
|
+
"auth:login:hardis",
|
|
150
|
+
"hardis:login:auth",
|
|
151
|
+
"login:hardis:auth",
|
|
152
|
+
"login:auth:hardis"
|
|
133
153
|
]
|
|
134
154
|
},
|
|
135
|
-
"hardis:
|
|
155
|
+
"hardis:cache:clear": {
|
|
136
156
|
"aliases": [],
|
|
137
157
|
"args": {},
|
|
138
|
-
"description": "\n## Command Behavior\n\n**
|
|
158
|
+
"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",
|
|
139
159
|
"examples": [
|
|
140
|
-
"$ sf hardis:
|
|
160
|
+
"$ sf hardis:cache:clear"
|
|
141
161
|
],
|
|
142
162
|
"flags": {
|
|
143
163
|
"json": {
|
|
@@ -155,20 +175,6 @@
|
|
|
155
175
|
"multiple": false,
|
|
156
176
|
"type": "option"
|
|
157
177
|
},
|
|
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
|
-
},
|
|
172
178
|
"debug": {
|
|
173
179
|
"char": "d",
|
|
174
180
|
"description": "Activate debug mode (more logs)",
|
|
@@ -192,39 +198,41 @@
|
|
|
192
198
|
},
|
|
193
199
|
"hasDynamicHelp": false,
|
|
194
200
|
"hiddenAliases": [],
|
|
195
|
-
"id": "hardis:
|
|
201
|
+
"id": "hardis:cache:clear",
|
|
196
202
|
"pluginAlias": "sfdx-hardis",
|
|
197
203
|
"pluginName": "sfdx-hardis",
|
|
198
204
|
"pluginType": "core",
|
|
199
205
|
"strict": true,
|
|
200
206
|
"enableJsonFlag": true,
|
|
201
|
-
"title": "
|
|
207
|
+
"title": "Clear sfdx-hardis cache",
|
|
208
|
+
"uiConfig": {
|
|
209
|
+
"hide": true
|
|
210
|
+
},
|
|
202
211
|
"requiresProject": false,
|
|
203
212
|
"isESM": true,
|
|
204
213
|
"relativePath": [
|
|
205
214
|
"lib",
|
|
206
215
|
"commands",
|
|
207
216
|
"hardis",
|
|
208
|
-
"
|
|
209
|
-
"
|
|
217
|
+
"cache",
|
|
218
|
+
"clear.js"
|
|
210
219
|
],
|
|
211
220
|
"aliasPermutations": [],
|
|
212
221
|
"permutations": [
|
|
213
|
-
"hardis:
|
|
214
|
-
"
|
|
215
|
-
"
|
|
216
|
-
"hardis:
|
|
217
|
-
"
|
|
218
|
-
"
|
|
222
|
+
"hardis:cache:clear",
|
|
223
|
+
"cache:hardis:clear",
|
|
224
|
+
"cache:clear:hardis",
|
|
225
|
+
"hardis:clear:cache",
|
|
226
|
+
"clear:hardis:cache",
|
|
227
|
+
"clear:cache:hardis"
|
|
219
228
|
]
|
|
220
229
|
},
|
|
221
|
-
"hardis:
|
|
230
|
+
"hardis:config:get": {
|
|
222
231
|
"aliases": [],
|
|
223
232
|
"args": {},
|
|
224
|
-
"description": "\n## Command Behavior\n\n**
|
|
233
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the sfdx-hardis configuration for a specified level.**\n\nThis command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.\n\n- **Configuration levels:** It can retrieve configuration from three different levels:\n - **Project:** The configuration defined in the project's `.sfdx-hardis.yml` file.\n - **Branch:** The configuration defined in a branch-specific configuration file (e.g., `.sfdx-hardis.production.yml`).\n - **User:** The global user-level configuration.\n\n## Technical explanations\n\nThe command's logic is straightforward:\n\n- **`getConfig` function:** It calls the `getConfig` utility function, passing the desired configuration level as an argument.\n- **Configuration loading:** The `getConfig` function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON.\n- **Output:** The retrieved configuration is then displayed to the user as a JSON string.\n",
|
|
225
234
|
"examples": [
|
|
226
|
-
"$ sf hardis:
|
|
227
|
-
"CI=true sf hardis:auth:login"
|
|
235
|
+
"$ sf hardis:project:deploy:sources:metadata"
|
|
228
236
|
],
|
|
229
237
|
"flags": {
|
|
230
238
|
"json": {
|
|
@@ -242,28 +250,20 @@
|
|
|
242
250
|
"multiple": false,
|
|
243
251
|
"type": "option"
|
|
244
252
|
},
|
|
245
|
-
"
|
|
246
|
-
"char": "
|
|
247
|
-
"description": "
|
|
248
|
-
"name": "
|
|
253
|
+
"level": {
|
|
254
|
+
"char": "l",
|
|
255
|
+
"description": "project,branch or user",
|
|
256
|
+
"name": "level",
|
|
257
|
+
"default": "project",
|
|
249
258
|
"hasDynamicHelp": false,
|
|
250
259
|
"multiple": false,
|
|
260
|
+
"options": [
|
|
261
|
+
"project",
|
|
262
|
+
"branch",
|
|
263
|
+
"user"
|
|
264
|
+
],
|
|
251
265
|
"type": "option"
|
|
252
266
|
},
|
|
253
|
-
"devhub": {
|
|
254
|
-
"char": "h",
|
|
255
|
-
"description": "Also connect associated DevHub",
|
|
256
|
-
"name": "devhub",
|
|
257
|
-
"allowNo": false,
|
|
258
|
-
"type": "boolean"
|
|
259
|
-
},
|
|
260
|
-
"scratchorg": {
|
|
261
|
-
"char": "s",
|
|
262
|
-
"description": "Scratch org",
|
|
263
|
-
"name": "scratchorg",
|
|
264
|
-
"allowNo": false,
|
|
265
|
-
"type": "boolean"
|
|
266
|
-
},
|
|
267
267
|
"debug": {
|
|
268
268
|
"char": "d",
|
|
269
269
|
"description": "Activate debug mode (more logs)",
|
|
@@ -287,30 +287,30 @@
|
|
|
287
287
|
},
|
|
288
288
|
"hasDynamicHelp": false,
|
|
289
289
|
"hiddenAliases": [],
|
|
290
|
-
"id": "hardis:
|
|
290
|
+
"id": "hardis:config:get",
|
|
291
291
|
"pluginAlias": "sfdx-hardis",
|
|
292
292
|
"pluginName": "sfdx-hardis",
|
|
293
293
|
"pluginType": "core",
|
|
294
294
|
"strict": true,
|
|
295
295
|
"enableJsonFlag": true,
|
|
296
|
-
"title": "
|
|
296
|
+
"title": "Deploy metadata sources to org",
|
|
297
297
|
"requiresProject": false,
|
|
298
298
|
"isESM": true,
|
|
299
299
|
"relativePath": [
|
|
300
300
|
"lib",
|
|
301
301
|
"commands",
|
|
302
302
|
"hardis",
|
|
303
|
-
"
|
|
304
|
-
"
|
|
303
|
+
"config",
|
|
304
|
+
"get.js"
|
|
305
305
|
],
|
|
306
306
|
"aliasPermutations": [],
|
|
307
307
|
"permutations": [
|
|
308
|
-
"hardis:
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"hardis:
|
|
312
|
-
"
|
|
313
|
-
"
|
|
308
|
+
"hardis:config:get",
|
|
309
|
+
"config:hardis:get",
|
|
310
|
+
"config:get:hardis",
|
|
311
|
+
"hardis:get:config",
|
|
312
|
+
"get:hardis:config",
|
|
313
|
+
"get:config:hardis"
|
|
314
314
|
]
|
|
315
315
|
},
|
|
316
316
|
"hardis:doc:fieldusage": {
|
|
@@ -2331,6 +2331,21 @@
|
|
|
2331
2331
|
"allowNo": false,
|
|
2332
2332
|
"type": "boolean"
|
|
2333
2333
|
},
|
|
2334
|
+
"username": {
|
|
2335
|
+
"char": "t",
|
|
2336
|
+
"description": "Username of the org you want to authenticate (overrides the interactive prompt)",
|
|
2337
|
+
"name": "username",
|
|
2338
|
+
"hasDynamicHelp": false,
|
|
2339
|
+
"multiple": false,
|
|
2340
|
+
"type": "option"
|
|
2341
|
+
},
|
|
2342
|
+
"prompt-default": {
|
|
2343
|
+
"char": "e",
|
|
2344
|
+
"description": "Prompt to set the selected org as default",
|
|
2345
|
+
"name": "prompt-default",
|
|
2346
|
+
"allowNo": false,
|
|
2347
|
+
"type": "boolean"
|
|
2348
|
+
},
|
|
2334
2349
|
"debug": {
|
|
2335
2350
|
"char": "d",
|
|
2336
2351
|
"description": "Activate debug mode (more logs)",
|
|
@@ -4406,13 +4421,12 @@
|
|
|
4406
4421
|
"ws:work:hardis"
|
|
4407
4422
|
]
|
|
4408
4423
|
},
|
|
4409
|
-
"hardis:
|
|
4424
|
+
"hardis:doc:extract:permsetgroups": {
|
|
4410
4425
|
"aliases": [],
|
|
4411
4426
|
"args": {},
|
|
4412
|
-
"description": "\n## Command Behavior\n\n**Extracts
|
|
4427
|
+
"description": "\n## Command Behavior\n\n**Extracts and documents Salesforce Permission Set Groups and their assigned Permission Sets.**\n\nThis command generates two types of output: a CSV file and a Markdown file, providing a clear overview of how Permission Set Groups are structured and what Permission Sets they contain within your Salesforce project. This is particularly useful for:\n\n- **Documentation:** Creating human-readable documentation of your permission architecture.\n- **Auditing:** Understanding the composition of permission sets for security and compliance checks.\n- **Analysis:** Gaining insights into how permissions are bundled and assigned in your Salesforce environment.\n\nThe generated CSV file provides a structured, machine-readable format, while the Markdown file offers a more descriptive, human-friendly view, including the group's name, label, description, and a list of its constituent permission sets.\n\n## Technical explanations\n\nThe command performs the following technical steps:\n\n- **File Discovery:** It uses `glob` to find all `.permissionsetgroup-meta.xml` files within the current working directory, respecting `.gitignore` patterns.\n- **XML Parsing:** For each discovered Permission Set Group XML file, it parses the XML content using `parseXmlFile` to extract relevant information such as the group's name, label, description, and the names of the Permission Sets it contains.\n- **Data Structuring:** The extracted data is then structured into a list of objects, making it easy to process.\n- **CSV Generation:** It constructs a CSV file with two columns: 'Permission set group' and 'Permission sets'. The 'Permission sets' column lists all assigned permission sets for each group, enclosed in quotes and separated by commas. The CSV file is saved to a temporary directory or a user-specified path.\n- **Markdown Generation:** It generates a Markdown file (`docs/permission-set-groups.md`) that includes a title, a table of contents, and detailed sections for each Permission Set Group. Each section lists the group's name, label, description, and a bulleted list of its assigned Permission Sets.\n- **File System Operations:** It uses `fs-extra` to ensure output directories exist and to write the generated CSV and Markdown files.\n- **VS Code Integration:** It uses `WebSocketClient.requestOpenFile` to automatically open the generated CSV and Markdown files in VS Code, enhancing the user experience.\n",
|
|
4413
4428
|
"examples": [
|
|
4414
|
-
"$ sf hardis:
|
|
4415
|
-
"$ sf hardis:git:pull-requests:extract --target-branch main --status merged"
|
|
4429
|
+
"$ sf hardis:doc:extract:permsetgroups"
|
|
4416
4430
|
],
|
|
4417
4431
|
"flags": {
|
|
4418
4432
|
"json": {
|
|
@@ -4430,35 +4444,6 @@
|
|
|
4430
4444
|
"multiple": false,
|
|
4431
4445
|
"type": "option"
|
|
4432
4446
|
},
|
|
4433
|
-
"target-branch": {
|
|
4434
|
-
"char": "t",
|
|
4435
|
-
"description": "Target branch of PRs",
|
|
4436
|
-
"name": "target-branch",
|
|
4437
|
-
"hasDynamicHelp": false,
|
|
4438
|
-
"multiple": false,
|
|
4439
|
-
"type": "option"
|
|
4440
|
-
},
|
|
4441
|
-
"status": {
|
|
4442
|
-
"char": "x",
|
|
4443
|
-
"description": "Status of the PR",
|
|
4444
|
-
"name": "status",
|
|
4445
|
-
"hasDynamicHelp": false,
|
|
4446
|
-
"multiple": false,
|
|
4447
|
-
"options": [
|
|
4448
|
-
"open",
|
|
4449
|
-
"merged",
|
|
4450
|
-
"abandoned"
|
|
4451
|
-
],
|
|
4452
|
-
"type": "option"
|
|
4453
|
-
},
|
|
4454
|
-
"min-date": {
|
|
4455
|
-
"char": "m",
|
|
4456
|
-
"description": "Minimum date for PR",
|
|
4457
|
-
"name": "min-date",
|
|
4458
|
-
"hasDynamicHelp": false,
|
|
4459
|
-
"multiple": false,
|
|
4460
|
-
"type": "option"
|
|
4461
|
-
},
|
|
4462
4447
|
"outputfile": {
|
|
4463
4448
|
"char": "f",
|
|
4464
4449
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -4490,57 +4475,57 @@
|
|
|
4490
4475
|
},
|
|
4491
4476
|
"hasDynamicHelp": false,
|
|
4492
4477
|
"hiddenAliases": [],
|
|
4493
|
-
"id": "hardis:
|
|
4478
|
+
"id": "hardis:doc:extract:permsetgroups",
|
|
4494
4479
|
"pluginAlias": "sfdx-hardis",
|
|
4495
4480
|
"pluginName": "sfdx-hardis",
|
|
4496
4481
|
"pluginType": "core",
|
|
4497
4482
|
"strict": true,
|
|
4498
4483
|
"enableJsonFlag": true,
|
|
4499
|
-
"title": "
|
|
4484
|
+
"title": "Generate project documentation",
|
|
4500
4485
|
"requiresProject": true,
|
|
4501
4486
|
"isESM": true,
|
|
4502
4487
|
"relativePath": [
|
|
4503
4488
|
"lib",
|
|
4504
4489
|
"commands",
|
|
4505
4490
|
"hardis",
|
|
4506
|
-
"
|
|
4507
|
-
"
|
|
4508
|
-
"
|
|
4491
|
+
"doc",
|
|
4492
|
+
"extract",
|
|
4493
|
+
"permsetgroups.js"
|
|
4509
4494
|
],
|
|
4510
4495
|
"aliasPermutations": [],
|
|
4511
4496
|
"permutations": [
|
|
4512
|
-
"hardis:
|
|
4513
|
-
"
|
|
4514
|
-
"
|
|
4515
|
-
"
|
|
4516
|
-
"hardis:
|
|
4517
|
-
"
|
|
4518
|
-
"
|
|
4519
|
-
"
|
|
4520
|
-
"hardis:
|
|
4521
|
-
"
|
|
4522
|
-
"
|
|
4523
|
-
"
|
|
4524
|
-
"hardis:
|
|
4525
|
-
"
|
|
4526
|
-
"
|
|
4527
|
-
"
|
|
4528
|
-
"hardis:
|
|
4529
|
-
"
|
|
4530
|
-
"
|
|
4531
|
-
"
|
|
4532
|
-
"hardis:extract:
|
|
4533
|
-
"
|
|
4534
|
-
"extract:
|
|
4535
|
-
"extract:
|
|
4497
|
+
"hardis:doc:extract:permsetgroups",
|
|
4498
|
+
"doc:hardis:extract:permsetgroups",
|
|
4499
|
+
"doc:extract:hardis:permsetgroups",
|
|
4500
|
+
"doc:extract:permsetgroups:hardis",
|
|
4501
|
+
"hardis:extract:doc:permsetgroups",
|
|
4502
|
+
"extract:hardis:doc:permsetgroups",
|
|
4503
|
+
"extract:doc:hardis:permsetgroups",
|
|
4504
|
+
"extract:doc:permsetgroups:hardis",
|
|
4505
|
+
"hardis:extract:permsetgroups:doc",
|
|
4506
|
+
"extract:hardis:permsetgroups:doc",
|
|
4507
|
+
"extract:permsetgroups:hardis:doc",
|
|
4508
|
+
"extract:permsetgroups:doc:hardis",
|
|
4509
|
+
"hardis:doc:permsetgroups:extract",
|
|
4510
|
+
"doc:hardis:permsetgroups:extract",
|
|
4511
|
+
"doc:permsetgroups:hardis:extract",
|
|
4512
|
+
"doc:permsetgroups:extract:hardis",
|
|
4513
|
+
"hardis:permsetgroups:doc:extract",
|
|
4514
|
+
"permsetgroups:hardis:doc:extract",
|
|
4515
|
+
"permsetgroups:doc:hardis:extract",
|
|
4516
|
+
"permsetgroups:doc:extract:hardis",
|
|
4517
|
+
"hardis:permsetgroups:extract:doc",
|
|
4518
|
+
"permsetgroups:hardis:extract:doc",
|
|
4519
|
+
"permsetgroups:extract:hardis:doc",
|
|
4520
|
+
"permsetgroups:extract:doc:hardis"
|
|
4536
4521
|
]
|
|
4537
4522
|
},
|
|
4538
|
-
"hardis:doc:
|
|
4523
|
+
"hardis:doc:plugin:generate": {
|
|
4539
4524
|
"aliases": [],
|
|
4540
4525
|
"args": {},
|
|
4541
|
-
"description": "\n## Command Behavior\n\n**
|
|
4526
|
+
"description": "\n## Command Behavior\n\n**Generates Markdown documentation for an SF CLI plugin, ready for conversion into HTML with MkDocs.**\n\nThis command automates the creation of comprehensive documentation for your Salesforce CLI plugin. It processes your plugin's commands and their flags to generate structured Markdown files, which can then be used with MkDocs to produce a professional-looking website.\n\nKey functionalities:\n\n- **Command Documentation:** Generates a dedicated Markdown file for each command, including its description, parameters (flags), and examples.\n- **Index and Commands Pages:** Creates an `index.md` and `commands.md` file that list all available commands, providing an overview and easy navigation.\n- **MkDocs Integration:** Sets up the basic MkDocs project structure and updates the `mkdocs.yml` navigation to include the generated command documentation.\n- **Default File Copying:** Copies essential MkDocs configuration files and GitHub Actions workflows to your project, streamlining the setup for continuous documentation deployment.\n\n**Post-Generation Steps:**\n\nAfter the initial run, you will need to manually update:\n\n- `mkdocs.yml`: Customize the project title, theme, and other MkDocs settings.\n- `.github/workflows/build-deploy-docs.yml`: Configure the GitHub Actions workflow for automatic documentation deployment.\n- `docs/javascripts/gtag.js`: If desired, set up Google Analytics tracking.\n\nFinally, activate GitHub Pages with `gh_pages` as the target branch. This will enable automatic documentation rebuilding and publishing to GitHub Pages upon each merge into your `master`/`main` branch.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Plugin Configuration Loading:** It loads the SF CLI plugin's configuration using `@oclif/core`'s `Config.load()`, which provides access to all registered commands and their metadata.\n- **Command Iteration:** It iterates through each command defined in the plugin's configuration.\n- **Markdown File Generation:** For each command, it constructs a Markdown file (`.md`) containing:\n - The command ID as the main heading.\n - The command's `description` property.\n - A table of parameters (flags), including their name, type, description, default value, required status, and available options. It dynamically extracts this information from the command's `flags` property.\n - Code blocks for each example provided in the command's `examples` property.\n- **Navigation Structure:** It builds a nested JavaScript object (`commandsNav`) that mirrors the command hierarchy, which is then converted to YAML and inserted into `mkdocs.yml` to create the navigation menu.\n- **Index and Commands Page Generation:** It reads the project's `README.md` and extracts relevant sections to create the `index.md` file. It also generates a separate `commands.md` file listing all commands.\n- **File System Operations:** It uses `fs-extra` to create directories, copy default MkDocs files (`defaults/mkdocs`), and write the generated Markdown and YAML files.\n- **YAML Serialization:** It uses `js-yaml` to serialize the navigation object into YAML format for `mkdocs.yml`.\n</details>\n",
|
|
4542
4527
|
"examples": [
|
|
4543
|
-
"$ sf hardis:doc:
|
|
4528
|
+
"$ sf hardis:doc:plugin:generate"
|
|
4544
4529
|
],
|
|
4545
4530
|
"flags": {
|
|
4546
4531
|
"json": {
|
|
@@ -4558,14 +4543,6 @@
|
|
|
4558
4543
|
"multiple": false,
|
|
4559
4544
|
"type": "option"
|
|
4560
4545
|
},
|
|
4561
|
-
"outputfile": {
|
|
4562
|
-
"char": "f",
|
|
4563
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
4564
|
-
"name": "outputfile",
|
|
4565
|
-
"hasDynamicHelp": false,
|
|
4566
|
-
"multiple": false,
|
|
4567
|
-
"type": "option"
|
|
4568
|
-
},
|
|
4569
4546
|
"debug": {
|
|
4570
4547
|
"char": "d",
|
|
4571
4548
|
"description": "Activate debug mode (more logs)",
|
|
@@ -4589,57 +4566,58 @@
|
|
|
4589
4566
|
},
|
|
4590
4567
|
"hasDynamicHelp": false,
|
|
4591
4568
|
"hiddenAliases": [],
|
|
4592
|
-
"id": "hardis:doc:
|
|
4569
|
+
"id": "hardis:doc:plugin:generate",
|
|
4593
4570
|
"pluginAlias": "sfdx-hardis",
|
|
4594
4571
|
"pluginName": "sfdx-hardis",
|
|
4595
4572
|
"pluginType": "core",
|
|
4596
4573
|
"strict": true,
|
|
4597
4574
|
"enableJsonFlag": true,
|
|
4598
|
-
"title": "Generate
|
|
4599
|
-
"requiresProject":
|
|
4575
|
+
"title": "Generate SF Cli Plugin Documentation",
|
|
4576
|
+
"requiresProject": false,
|
|
4600
4577
|
"isESM": true,
|
|
4601
4578
|
"relativePath": [
|
|
4602
4579
|
"lib",
|
|
4603
4580
|
"commands",
|
|
4604
4581
|
"hardis",
|
|
4605
4582
|
"doc",
|
|
4606
|
-
"
|
|
4607
|
-
"
|
|
4583
|
+
"plugin",
|
|
4584
|
+
"generate.js"
|
|
4608
4585
|
],
|
|
4609
4586
|
"aliasPermutations": [],
|
|
4610
4587
|
"permutations": [
|
|
4611
|
-
"hardis:doc:
|
|
4612
|
-
"doc:hardis:
|
|
4613
|
-
"doc:
|
|
4614
|
-
"doc:
|
|
4615
|
-
"hardis:
|
|
4616
|
-
"
|
|
4617
|
-
"
|
|
4618
|
-
"
|
|
4619
|
-
"hardis:
|
|
4620
|
-
"
|
|
4621
|
-
"
|
|
4622
|
-
"
|
|
4623
|
-
"hardis:doc:
|
|
4624
|
-
"doc:hardis:
|
|
4625
|
-
"doc:
|
|
4626
|
-
"doc:
|
|
4627
|
-
"hardis:
|
|
4628
|
-
"
|
|
4629
|
-
"
|
|
4630
|
-
"
|
|
4631
|
-
"hardis:
|
|
4632
|
-
"
|
|
4633
|
-
"
|
|
4634
|
-
"
|
|
4588
|
+
"hardis:doc:plugin:generate",
|
|
4589
|
+
"doc:hardis:plugin:generate",
|
|
4590
|
+
"doc:plugin:hardis:generate",
|
|
4591
|
+
"doc:plugin:generate:hardis",
|
|
4592
|
+
"hardis:plugin:doc:generate",
|
|
4593
|
+
"plugin:hardis:doc:generate",
|
|
4594
|
+
"plugin:doc:hardis:generate",
|
|
4595
|
+
"plugin:doc:generate:hardis",
|
|
4596
|
+
"hardis:plugin:generate:doc",
|
|
4597
|
+
"plugin:hardis:generate:doc",
|
|
4598
|
+
"plugin:generate:hardis:doc",
|
|
4599
|
+
"plugin:generate:doc:hardis",
|
|
4600
|
+
"hardis:doc:generate:plugin",
|
|
4601
|
+
"doc:hardis:generate:plugin",
|
|
4602
|
+
"doc:generate:hardis:plugin",
|
|
4603
|
+
"doc:generate:plugin:hardis",
|
|
4604
|
+
"hardis:generate:doc:plugin",
|
|
4605
|
+
"generate:hardis:doc:plugin",
|
|
4606
|
+
"generate:doc:hardis:plugin",
|
|
4607
|
+
"generate:doc:plugin:hardis",
|
|
4608
|
+
"hardis:generate:plugin:doc",
|
|
4609
|
+
"generate:hardis:plugin:doc",
|
|
4610
|
+
"generate:plugin:hardis:doc",
|
|
4611
|
+
"generate:plugin:doc:hardis"
|
|
4635
4612
|
]
|
|
4636
4613
|
},
|
|
4637
|
-
"hardis:
|
|
4614
|
+
"hardis:git:pull-requests:extract": {
|
|
4638
4615
|
"aliases": [],
|
|
4639
4616
|
"args": {},
|
|
4640
|
-
"description": "\n## Command Behavior\n\n**
|
|
4617
|
+
"description": "\n## Command Behavior\n\n**Extracts pull request information from your Git server based on specified filtering criteria.**\n\nThis command provides a powerful way to query and retrieve details about pull requests (or merge requests, depending on your Git provider) in your repository. It's highly useful for reporting, auditing, and analyzing development workflows.\n\nKey functionalities include:\n\n- **Target Branch Filtering:** You can filter pull requests by their target branch using the `--target-branch` flag. If not specified, the command will prompt you to select one.\n- **Status Filtering:** Filter pull requests by their status: `open`, `merged`, or `abandoned` using the `--status` flag. An interactive prompt is provided if no status is specified.\n- **Minimum Date Filtering:** Use the `--min-date` flag to retrieve pull requests created or updated after a specific date.\n- **CSV Output:** The extracted pull request data is generated into a CSV file, which can be used for further analysis in spreadsheet software.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves interacting with a Git provider's API:\n\n- **Git Provider Abstraction:** It uses the `GitProvider.getInstance(true)` to abstract away the specifics of different Git platforms (e.g., GitHub, GitLab, Azure DevOps). This ensures the command can work across various environments.\n- **API Calls:** The `gitProvider.listPullRequests()` method is called with a `prConstraint` object that encapsulates the filtering criteria (target branch, minimum date, status).\n- **Interactive Prompts:** The `prompts` library is used to interactively gather input from the user for the target branch and pull request status if they are not provided as command-line flags.\n- **Date Handling:** The `moment` library is used to parse and handle date inputs for the `--min-date` flag.\n- **CSV Generation:** The `generateCsvFile` utility is responsible for converting the retrieved pull request data into a CSV format, and `generateReportPath` determines the output file location.\n- **Error Handling:** It includes error handling for cases where a Git provider cannot be identified.\n</details>\n",
|
|
4641
4618
|
"examples": [
|
|
4642
|
-
"$ sf hardis:
|
|
4619
|
+
"$ sf hardis:git:pull-requests:extract",
|
|
4620
|
+
"$ sf hardis:git:pull-requests:extract --target-branch main --status merged"
|
|
4643
4621
|
],
|
|
4644
4622
|
"flags": {
|
|
4645
4623
|
"json": {
|
|
@@ -4657,6 +4635,43 @@
|
|
|
4657
4635
|
"multiple": false,
|
|
4658
4636
|
"type": "option"
|
|
4659
4637
|
},
|
|
4638
|
+
"target-branch": {
|
|
4639
|
+
"char": "t",
|
|
4640
|
+
"description": "Target branch of PRs",
|
|
4641
|
+
"name": "target-branch",
|
|
4642
|
+
"hasDynamicHelp": false,
|
|
4643
|
+
"multiple": false,
|
|
4644
|
+
"type": "option"
|
|
4645
|
+
},
|
|
4646
|
+
"status": {
|
|
4647
|
+
"char": "x",
|
|
4648
|
+
"description": "Status of the PR",
|
|
4649
|
+
"name": "status",
|
|
4650
|
+
"hasDynamicHelp": false,
|
|
4651
|
+
"multiple": false,
|
|
4652
|
+
"options": [
|
|
4653
|
+
"open",
|
|
4654
|
+
"merged",
|
|
4655
|
+
"abandoned"
|
|
4656
|
+
],
|
|
4657
|
+
"type": "option"
|
|
4658
|
+
},
|
|
4659
|
+
"min-date": {
|
|
4660
|
+
"char": "m",
|
|
4661
|
+
"description": "Minimum date for PR",
|
|
4662
|
+
"name": "min-date",
|
|
4663
|
+
"hasDynamicHelp": false,
|
|
4664
|
+
"multiple": false,
|
|
4665
|
+
"type": "option"
|
|
4666
|
+
},
|
|
4667
|
+
"outputfile": {
|
|
4668
|
+
"char": "f",
|
|
4669
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
4670
|
+
"name": "outputfile",
|
|
4671
|
+
"hasDynamicHelp": false,
|
|
4672
|
+
"multiple": false,
|
|
4673
|
+
"type": "option"
|
|
4674
|
+
},
|
|
4660
4675
|
"debug": {
|
|
4661
4676
|
"char": "d",
|
|
4662
4677
|
"description": "Activate debug mode (more logs)",
|
|
@@ -4680,49 +4695,49 @@
|
|
|
4680
4695
|
},
|
|
4681
4696
|
"hasDynamicHelp": false,
|
|
4682
4697
|
"hiddenAliases": [],
|
|
4683
|
-
"id": "hardis:
|
|
4698
|
+
"id": "hardis:git:pull-requests:extract",
|
|
4684
4699
|
"pluginAlias": "sfdx-hardis",
|
|
4685
4700
|
"pluginName": "sfdx-hardis",
|
|
4686
4701
|
"pluginType": "core",
|
|
4687
4702
|
"strict": true,
|
|
4688
4703
|
"enableJsonFlag": true,
|
|
4689
|
-
"title": "
|
|
4690
|
-
"requiresProject":
|
|
4704
|
+
"title": "Extract pull requests",
|
|
4705
|
+
"requiresProject": true,
|
|
4691
4706
|
"isESM": true,
|
|
4692
4707
|
"relativePath": [
|
|
4693
4708
|
"lib",
|
|
4694
4709
|
"commands",
|
|
4695
4710
|
"hardis",
|
|
4696
|
-
"
|
|
4697
|
-
"
|
|
4698
|
-
"
|
|
4711
|
+
"git",
|
|
4712
|
+
"pull-requests",
|
|
4713
|
+
"extract.js"
|
|
4699
4714
|
],
|
|
4700
4715
|
"aliasPermutations": [],
|
|
4701
4716
|
"permutations": [
|
|
4702
|
-
"hardis:
|
|
4703
|
-
"
|
|
4704
|
-
"
|
|
4705
|
-
"
|
|
4706
|
-
"hardis:
|
|
4707
|
-
"
|
|
4708
|
-
"
|
|
4709
|
-
"
|
|
4710
|
-
"hardis:
|
|
4711
|
-
"
|
|
4712
|
-
"
|
|
4713
|
-
"
|
|
4714
|
-
"hardis:
|
|
4715
|
-
"
|
|
4716
|
-
"
|
|
4717
|
-
"
|
|
4718
|
-
"hardis:
|
|
4719
|
-
"
|
|
4720
|
-
"
|
|
4721
|
-
"
|
|
4722
|
-
"hardis:
|
|
4723
|
-
"
|
|
4724
|
-
"
|
|
4725
|
-
"
|
|
4717
|
+
"hardis:git:pull-requests:extract",
|
|
4718
|
+
"git:hardis:pull-requests:extract",
|
|
4719
|
+
"git:pull-requests:hardis:extract",
|
|
4720
|
+
"git:pull-requests:extract:hardis",
|
|
4721
|
+
"hardis:pull-requests:git:extract",
|
|
4722
|
+
"pull-requests:hardis:git:extract",
|
|
4723
|
+
"pull-requests:git:hardis:extract",
|
|
4724
|
+
"pull-requests:git:extract:hardis",
|
|
4725
|
+
"hardis:pull-requests:extract:git",
|
|
4726
|
+
"pull-requests:hardis:extract:git",
|
|
4727
|
+
"pull-requests:extract:hardis:git",
|
|
4728
|
+
"pull-requests:extract:git:hardis",
|
|
4729
|
+
"hardis:git:extract:pull-requests",
|
|
4730
|
+
"git:hardis:extract:pull-requests",
|
|
4731
|
+
"git:extract:hardis:pull-requests",
|
|
4732
|
+
"git:extract:pull-requests:hardis",
|
|
4733
|
+
"hardis:extract:git:pull-requests",
|
|
4734
|
+
"extract:hardis:git:pull-requests",
|
|
4735
|
+
"extract:git:hardis:pull-requests",
|
|
4736
|
+
"extract:git:pull-requests:hardis",
|
|
4737
|
+
"hardis:extract:pull-requests:git",
|
|
4738
|
+
"extract:hardis:pull-requests:git",
|
|
4739
|
+
"extract:pull-requests:hardis:git",
|
|
4740
|
+
"extract:pull-requests:git:hardis"
|
|
4726
4741
|
]
|
|
4727
4742
|
},
|
|
4728
4743
|
"hardis:org:community:update": {
|
|
@@ -9676,12 +9691,12 @@
|
|
|
9676
9691
|
"auth:configure:project:hardis"
|
|
9677
9692
|
]
|
|
9678
9693
|
},
|
|
9679
|
-
"hardis:project:
|
|
9694
|
+
"hardis:project:convert:profilestopermsets": {
|
|
9680
9695
|
"aliases": [],
|
|
9681
9696
|
"args": {},
|
|
9682
|
-
"description": "\n## Command Behavior\n\n**
|
|
9697
|
+
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
9683
9698
|
"examples": [
|
|
9684
|
-
"$ sf hardis:project:
|
|
9699
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
9685
9700
|
],
|
|
9686
9701
|
"flags": {
|
|
9687
9702
|
"json": {
|
|
@@ -9699,13 +9714,13 @@
|
|
|
9699
9714
|
"multiple": false,
|
|
9700
9715
|
"type": "option"
|
|
9701
9716
|
},
|
|
9702
|
-
"
|
|
9703
|
-
"char": "
|
|
9704
|
-
"description": "
|
|
9705
|
-
"name": "
|
|
9706
|
-
"default":
|
|
9717
|
+
"except": {
|
|
9718
|
+
"char": "e",
|
|
9719
|
+
"description": "List of filters",
|
|
9720
|
+
"name": "except",
|
|
9721
|
+
"default": [],
|
|
9707
9722
|
"hasDynamicHelp": false,
|
|
9708
|
-
"multiple":
|
|
9723
|
+
"multiple": true,
|
|
9709
9724
|
"type": "option"
|
|
9710
9725
|
},
|
|
9711
9726
|
"debug": {
|
|
@@ -9731,58 +9746,161 @@
|
|
|
9731
9746
|
},
|
|
9732
9747
|
"hasDynamicHelp": false,
|
|
9733
9748
|
"hiddenAliases": [],
|
|
9734
|
-
"id": "hardis:project:
|
|
9749
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
9735
9750
|
"pluginAlias": "sfdx-hardis",
|
|
9736
9751
|
"pluginName": "sfdx-hardis",
|
|
9737
9752
|
"pluginType": "core",
|
|
9738
9753
|
"strict": true,
|
|
9739
9754
|
"enableJsonFlag": true,
|
|
9740
|
-
"title": "
|
|
9755
|
+
"title": "Convert Profiles into Permission Sets",
|
|
9741
9756
|
"requiresProject": true,
|
|
9757
|
+
"requiresSfdxPlugins": [
|
|
9758
|
+
"shane-sfdx-plugins"
|
|
9759
|
+
],
|
|
9742
9760
|
"isESM": true,
|
|
9743
9761
|
"relativePath": [
|
|
9744
9762
|
"lib",
|
|
9745
9763
|
"commands",
|
|
9746
9764
|
"hardis",
|
|
9747
9765
|
"project",
|
|
9748
|
-
"
|
|
9749
|
-
"
|
|
9766
|
+
"convert",
|
|
9767
|
+
"profilestopermsets.js"
|
|
9750
9768
|
],
|
|
9751
9769
|
"aliasPermutations": [],
|
|
9752
9770
|
"permutations": [
|
|
9753
|
-
"hardis:project:
|
|
9754
|
-
"project:hardis:
|
|
9755
|
-
"project:
|
|
9756
|
-
"project:
|
|
9757
|
-
"hardis:
|
|
9758
|
-
"
|
|
9759
|
-
"
|
|
9760
|
-
"
|
|
9761
|
-
"hardis:
|
|
9762
|
-
"
|
|
9763
|
-
"
|
|
9764
|
-
"
|
|
9765
|
-
"hardis:project:
|
|
9766
|
-
"project:hardis:
|
|
9767
|
-
"project:
|
|
9768
|
-
"project:
|
|
9769
|
-
"hardis:
|
|
9770
|
-
"
|
|
9771
|
-
"
|
|
9772
|
-
"
|
|
9773
|
-
"hardis:
|
|
9774
|
-
"
|
|
9775
|
-
"
|
|
9776
|
-
"
|
|
9771
|
+
"hardis:project:convert:profilestopermsets",
|
|
9772
|
+
"project:hardis:convert:profilestopermsets",
|
|
9773
|
+
"project:convert:hardis:profilestopermsets",
|
|
9774
|
+
"project:convert:profilestopermsets:hardis",
|
|
9775
|
+
"hardis:convert:project:profilestopermsets",
|
|
9776
|
+
"convert:hardis:project:profilestopermsets",
|
|
9777
|
+
"convert:project:hardis:profilestopermsets",
|
|
9778
|
+
"convert:project:profilestopermsets:hardis",
|
|
9779
|
+
"hardis:convert:profilestopermsets:project",
|
|
9780
|
+
"convert:hardis:profilestopermsets:project",
|
|
9781
|
+
"convert:profilestopermsets:hardis:project",
|
|
9782
|
+
"convert:profilestopermsets:project:hardis",
|
|
9783
|
+
"hardis:project:profilestopermsets:convert",
|
|
9784
|
+
"project:hardis:profilestopermsets:convert",
|
|
9785
|
+
"project:profilestopermsets:hardis:convert",
|
|
9786
|
+
"project:profilestopermsets:convert:hardis",
|
|
9787
|
+
"hardis:profilestopermsets:project:convert",
|
|
9788
|
+
"profilestopermsets:hardis:project:convert",
|
|
9789
|
+
"profilestopermsets:project:hardis:convert",
|
|
9790
|
+
"profilestopermsets:project:convert:hardis",
|
|
9791
|
+
"hardis:profilestopermsets:convert:project",
|
|
9792
|
+
"profilestopermsets:hardis:convert:project",
|
|
9793
|
+
"profilestopermsets:convert:hardis:project",
|
|
9794
|
+
"profilestopermsets:convert:project:hardis"
|
|
9777
9795
|
]
|
|
9778
9796
|
},
|
|
9779
|
-
"hardis:project:clean:
|
|
9797
|
+
"hardis:project:clean:emptyitems": {
|
|
9780
9798
|
"aliases": [],
|
|
9781
9799
|
"args": {},
|
|
9782
|
-
"description": "\n## Command Behavior\n\n**
|
|
9800
|
+
"description": "\n## Command Behavior\n\n**Removes empty or irrelevant metadata items from your Salesforce DX project sources.**\n\nThis command helps maintain a clean and efficient Salesforce codebase by deleting metadata files that are essentially empty or contain no meaningful configuration. These files can sometimes be generated during retrieval processes or remain after refactoring, contributing to unnecessary clutter in your project.\n\nKey functionalities:\n\n- **Targeted Cleaning:** Specifically targets and removes empty instances of:\n - Global Value Set Translations (`.globalValueSetTranslation-meta.xml`)\n - Standard Value Sets (`.standardValueSet-meta.xml`)\n - Sharing Rules (`.sharingRules-meta.xml`)\n- **Content-Based Deletion:** It checks the XML content of these files for the presence of specific tags (e.g., `valueTranslation` for Global Value Set Translations) to determine if they are truly empty or lack relevant data.\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 files matching predefined patterns for Global Value Set Translations, Standard Value Sets, and Sharing Rules within the specified root folder (defaults to `force-app`).\n- **XML Parsing:** For each matching file, it reads and parses the XML content using `parseXmlFile`.\n- **Content Validation:** It then checks the parsed XML object for the existence of specific nested properties (e.g., `xmlContent.GlobalValueSetTranslation.valueTranslation`). If these properties are missing or empty, the file is considered empty.\n- **File Deletion:** If a file is determined to be empty, it is removed from the file system using `fs.remove`.\n- **Logging:** Provides clear messages about which files are being removed and a summary of the total number of items cleaned.\n</details>\n",
|
|
9783
9801
|
"examples": [
|
|
9784
|
-
"sf hardis:project:clean:
|
|
9785
|
-
|
|
9802
|
+
"$ sf hardis:project:clean:emptyitems"
|
|
9803
|
+
],
|
|
9804
|
+
"flags": {
|
|
9805
|
+
"json": {
|
|
9806
|
+
"description": "Format output as json.",
|
|
9807
|
+
"helpGroup": "GLOBAL",
|
|
9808
|
+
"name": "json",
|
|
9809
|
+
"allowNo": false,
|
|
9810
|
+
"type": "boolean"
|
|
9811
|
+
},
|
|
9812
|
+
"flags-dir": {
|
|
9813
|
+
"helpGroup": "GLOBAL",
|
|
9814
|
+
"name": "flags-dir",
|
|
9815
|
+
"summary": "Import flag values from a directory.",
|
|
9816
|
+
"hasDynamicHelp": false,
|
|
9817
|
+
"multiple": false,
|
|
9818
|
+
"type": "option"
|
|
9819
|
+
},
|
|
9820
|
+
"folder": {
|
|
9821
|
+
"char": "f",
|
|
9822
|
+
"description": "Root folder",
|
|
9823
|
+
"name": "folder",
|
|
9824
|
+
"default": "force-app",
|
|
9825
|
+
"hasDynamicHelp": false,
|
|
9826
|
+
"multiple": false,
|
|
9827
|
+
"type": "option"
|
|
9828
|
+
},
|
|
9829
|
+
"debug": {
|
|
9830
|
+
"char": "d",
|
|
9831
|
+
"description": "Activate debug mode (more logs)",
|
|
9832
|
+
"name": "debug",
|
|
9833
|
+
"allowNo": false,
|
|
9834
|
+
"type": "boolean"
|
|
9835
|
+
},
|
|
9836
|
+
"websocket": {
|
|
9837
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9838
|
+
"name": "websocket",
|
|
9839
|
+
"hasDynamicHelp": false,
|
|
9840
|
+
"multiple": false,
|
|
9841
|
+
"type": "option"
|
|
9842
|
+
},
|
|
9843
|
+
"skipauth": {
|
|
9844
|
+
"description": "Skip authentication check when a default username is required",
|
|
9845
|
+
"name": "skipauth",
|
|
9846
|
+
"allowNo": false,
|
|
9847
|
+
"type": "boolean"
|
|
9848
|
+
}
|
|
9849
|
+
},
|
|
9850
|
+
"hasDynamicHelp": false,
|
|
9851
|
+
"hiddenAliases": [],
|
|
9852
|
+
"id": "hardis:project:clean:emptyitems",
|
|
9853
|
+
"pluginAlias": "sfdx-hardis",
|
|
9854
|
+
"pluginName": "sfdx-hardis",
|
|
9855
|
+
"pluginType": "core",
|
|
9856
|
+
"strict": true,
|
|
9857
|
+
"enableJsonFlag": true,
|
|
9858
|
+
"title": "Clean retrieved empty items in dx sources",
|
|
9859
|
+
"requiresProject": true,
|
|
9860
|
+
"isESM": true,
|
|
9861
|
+
"relativePath": [
|
|
9862
|
+
"lib",
|
|
9863
|
+
"commands",
|
|
9864
|
+
"hardis",
|
|
9865
|
+
"project",
|
|
9866
|
+
"clean",
|
|
9867
|
+
"emptyitems.js"
|
|
9868
|
+
],
|
|
9869
|
+
"aliasPermutations": [],
|
|
9870
|
+
"permutations": [
|
|
9871
|
+
"hardis:project:clean:emptyitems",
|
|
9872
|
+
"project:hardis:clean:emptyitems",
|
|
9873
|
+
"project:clean:hardis:emptyitems",
|
|
9874
|
+
"project:clean:emptyitems:hardis",
|
|
9875
|
+
"hardis:clean:project:emptyitems",
|
|
9876
|
+
"clean:hardis:project:emptyitems",
|
|
9877
|
+
"clean:project:hardis:emptyitems",
|
|
9878
|
+
"clean:project:emptyitems:hardis",
|
|
9879
|
+
"hardis:clean:emptyitems:project",
|
|
9880
|
+
"clean:hardis:emptyitems:project",
|
|
9881
|
+
"clean:emptyitems:hardis:project",
|
|
9882
|
+
"clean:emptyitems:project:hardis",
|
|
9883
|
+
"hardis:project:emptyitems:clean",
|
|
9884
|
+
"project:hardis:emptyitems:clean",
|
|
9885
|
+
"project:emptyitems:hardis:clean",
|
|
9886
|
+
"project:emptyitems:clean:hardis",
|
|
9887
|
+
"hardis:emptyitems:project:clean",
|
|
9888
|
+
"emptyitems:hardis:project:clean",
|
|
9889
|
+
"emptyitems:project:hardis:clean",
|
|
9890
|
+
"emptyitems:project:clean:hardis",
|
|
9891
|
+
"hardis:emptyitems:clean:project",
|
|
9892
|
+
"emptyitems:hardis:clean:project",
|
|
9893
|
+
"emptyitems:clean:hardis:project",
|
|
9894
|
+
"emptyitems:clean:project:hardis"
|
|
9895
|
+
]
|
|
9896
|
+
},
|
|
9897
|
+
"hardis:project:clean:filter-xml-content": {
|
|
9898
|
+
"aliases": [],
|
|
9899
|
+
"args": {},
|
|
9900
|
+
"description": "\n## Command Behavior\n\n**Filters the content of Salesforce metadata XML files to remove specific elements, enabling more granular deployments.**\n\nThis command addresses a common challenge in Salesforce development: deploying only a subset of metadata from an XML file when the target org might not support all elements or when certain elements are not desired. It allows you to define rules in a JSON configuration file to remove unwanted XML nodes.\n\nKey functionalities:\n\n- **Configurable Filtering:** Uses a JSON configuration file (e.g., `filter-config.json`) to define which XML elements to remove. This configuration specifies the XML tags to target and the values within those tags that should trigger removal.\n- **Targeted File Processing:** Processes XML files within a specified input folder (defaults to current directory) and writes the filtered content to an output folder.\n- **Example Use Cases:** Useful for scenarios like:\n - Removing references to features not enabled in the target org.\n - Stripping out specific profile permissions or field-level security settings.\n - Cleaning up metadata that is not relevant to a particular deployment.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Configuration Loading:** Reads the `filter-config.json` file, which contains an array of `filters`. Each filter defines a `name`, `description`, `folders` (where to apply the filter), `file_extensions`, and an `exclude_list`.\n- **File System Operations:** Copies the input folder to an output folder (if different) to avoid modifying original files directly. It then iterates through the files in the output folder that match the specified file extensions.\n- **XML Parsing and Manipulation:** For each matching XML file:\n - It uses `xml2js.Parser` to parse the XML content into a JavaScript object.\n - It recursively traverses the JavaScript object, applying the `filterElement` function.\n - The `filterElement` function checks for `type_tag` and `identifier_tag` defined in the `exclude_list`. If a match is found and the value is in the `excludeDef.values`, the element is removed from the XML structure.\n - After filtering, it uses `writeXmlFile` to write the modified JavaScript object back to the XML file.\n- **Logging:** Provides detailed logs about the filtering process, including which files are being processed and which elements are being filtered.\n- **Summary Reporting:** Tracks and reports on the files that have been updated due to filtering.\n</details>\n",
|
|
9901
|
+
"examples": [
|
|
9902
|
+
"sf hardis:project:clean:filter-xml-content -i \"./mdapi_output\"",
|
|
9903
|
+
"sf hardis:project:clean:filter-xml-content -i \"retrieveUnpackaged\""
|
|
9786
9904
|
],
|
|
9787
9905
|
"flags": {
|
|
9788
9906
|
"json": {
|
|
@@ -11161,12 +11279,14 @@
|
|
|
11161
11279
|
"xml:clean:project:hardis"
|
|
11162
11280
|
]
|
|
11163
11281
|
},
|
|
11164
|
-
"hardis:project:
|
|
11282
|
+
"hardis:project:deploy:notify": {
|
|
11165
11283
|
"aliases": [],
|
|
11166
11284
|
"args": {},
|
|
11167
|
-
"description": "
|
|
11285
|
+
"description": "Post notifications related to:\n\n- **Deployment simulation** _(use with --check-only)_\n\n- **Deployment process** _(to call only if your deployment is successful)_\n\n### Integrations\n\nAccording to the [integrations you configured](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integrations-home/), notifications can contain deployment information and [Flow Visual Git Diff](https://sfdx-hardis.cloudity.com/salesforce-deployment-assistant-home/#flow-visual-git-diff)\n\n - GitHub, Gitlab, Azure DevOps, Bitbucket comments on Pull Requests (including Flows Visual Git Diff)\n\n - Slack, Microsoft Teams, Email deployment summary after a successful deployment\n\n - JIRA tags and comments on tickets that just has been deployed\n\n\n\n\n\n### Flows Visual Git Diff\n\n- Visually show you the differences on a diagram\n\n- Display the update details without having to open any XML !\n\n🟩 = added\n\n🟥 = removed\n\n🟧 = updated\n\n\n\n\n\n### In custom CI/CD workflow\n\nExample of usage in a custom CI/CD pipeline:\n\n```bash\n# Disable exit-on-error temporarily\nset +e\n\n# Run the deploy command\nsf project deploy start [....]\nRET_CODE=$?\n\n# Re-enable exit-on-error\nset -e\n\n# Determine MYSTATUS based on return code\nif [ $RET_CODE -eq 0 ]; then\n MYSTATUS=\"valid\"\nelse\n MYSTATUS=\"invalid\"\nfi\n\n# Run the notify command with MYSTATUS\nsf hardis:project:deploy:notify --check-only --deploy-status \"$MYSTATUS\"\n```\n\n### Other usages\n\nThis command is for custom SF Cli pipelines, if you are a sfdx-hardis user, it is already embedded in sf hardis:deploy:smart.\n\nYou can also use [sfdx-hardis wrapper commands of SF deployment commands](https://sfdx-hardis.cloudity.com/salesforce-deployment-assistant-setup/#using-custom-cicd-pipeline)\n",
|
|
11168
11286
|
"examples": [
|
|
11169
|
-
"$ sf hardis:project:
|
|
11287
|
+
"$ sf hardis:project:deploy:notify --check-only --deploy-status valid --message \"This deployment check is valid\\n\\nYahooo !!\"",
|
|
11288
|
+
"$ sf hardis:project:deploy:notify --check-only --deploy-status invalid --message \"This deployment check has failed !\\n\\Oh no !!\"",
|
|
11289
|
+
"$ sf hardis:project:deploy:notify --deploy-status valid --message \"This deployment has been processed !\\n\\nYahooo !!\""
|
|
11170
11290
|
],
|
|
11171
11291
|
"flags": {
|
|
11172
11292
|
"json": {
|
|
@@ -11184,13 +11304,34 @@
|
|
|
11184
11304
|
"multiple": false,
|
|
11185
11305
|
"type": "option"
|
|
11186
11306
|
},
|
|
11187
|
-
"
|
|
11188
|
-
"char": "
|
|
11189
|
-
"description": "
|
|
11190
|
-
"name": "
|
|
11191
|
-
"
|
|
11307
|
+
"check-only": {
|
|
11308
|
+
"char": "c",
|
|
11309
|
+
"description": "Use this option to send notifications from a Deployment simulation job",
|
|
11310
|
+
"name": "check-only",
|
|
11311
|
+
"allowNo": false,
|
|
11312
|
+
"type": "boolean"
|
|
11313
|
+
},
|
|
11314
|
+
"deploy-status": {
|
|
11315
|
+
"char": "s",
|
|
11316
|
+
"description": "Send success, failure or unknown (default) to indicate if the deployment or deployment simulation is in success or not",
|
|
11317
|
+
"name": "deploy-status",
|
|
11318
|
+
"default": "unknown",
|
|
11192
11319
|
"hasDynamicHelp": false,
|
|
11193
|
-
"multiple":
|
|
11320
|
+
"multiple": false,
|
|
11321
|
+
"options": [
|
|
11322
|
+
"valid",
|
|
11323
|
+
"invalid",
|
|
11324
|
+
"unknown"
|
|
11325
|
+
],
|
|
11326
|
+
"type": "option"
|
|
11327
|
+
},
|
|
11328
|
+
"message": {
|
|
11329
|
+
"char": "m",
|
|
11330
|
+
"description": "Custom message that you want to be added in notifications (string or markdown format)",
|
|
11331
|
+
"name": "message",
|
|
11332
|
+
"default": "",
|
|
11333
|
+
"hasDynamicHelp": false,
|
|
11334
|
+
"multiple": false,
|
|
11194
11335
|
"type": "option"
|
|
11195
11336
|
},
|
|
11196
11337
|
"debug": {
|
|
@@ -11212,65 +11353,76 @@
|
|
|
11212
11353
|
"name": "skipauth",
|
|
11213
11354
|
"allowNo": false,
|
|
11214
11355
|
"type": "boolean"
|
|
11356
|
+
},
|
|
11357
|
+
"target-org": {
|
|
11358
|
+
"aliases": [
|
|
11359
|
+
"targetusername",
|
|
11360
|
+
"u"
|
|
11361
|
+
],
|
|
11362
|
+
"char": "o",
|
|
11363
|
+
"deprecateAliases": true,
|
|
11364
|
+
"name": "target-org",
|
|
11365
|
+
"noCacheDefault": true,
|
|
11366
|
+
"required": true,
|
|
11367
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
11368
|
+
"hasDynamicHelp": true,
|
|
11369
|
+
"multiple": false,
|
|
11370
|
+
"type": "option"
|
|
11215
11371
|
}
|
|
11216
11372
|
},
|
|
11217
|
-
"hasDynamicHelp":
|
|
11373
|
+
"hasDynamicHelp": true,
|
|
11218
11374
|
"hiddenAliases": [],
|
|
11219
|
-
"id": "hardis:project:
|
|
11375
|
+
"id": "hardis:project:deploy:notify",
|
|
11220
11376
|
"pluginAlias": "sfdx-hardis",
|
|
11221
11377
|
"pluginName": "sfdx-hardis",
|
|
11222
11378
|
"pluginType": "core",
|
|
11223
11379
|
"strict": true,
|
|
11224
11380
|
"enableJsonFlag": true,
|
|
11225
|
-
"title": "
|
|
11381
|
+
"title": "Deployment Notifications",
|
|
11226
11382
|
"requiresProject": true,
|
|
11227
|
-
"requiresSfdxPlugins": [
|
|
11228
|
-
"shane-sfdx-plugins"
|
|
11229
|
-
],
|
|
11230
11383
|
"isESM": true,
|
|
11231
11384
|
"relativePath": [
|
|
11232
11385
|
"lib",
|
|
11233
11386
|
"commands",
|
|
11234
11387
|
"hardis",
|
|
11235
11388
|
"project",
|
|
11236
|
-
"
|
|
11237
|
-
"
|
|
11389
|
+
"deploy",
|
|
11390
|
+
"notify.js"
|
|
11238
11391
|
],
|
|
11239
11392
|
"aliasPermutations": [],
|
|
11240
11393
|
"permutations": [
|
|
11241
|
-
"hardis:project:
|
|
11242
|
-
"project:hardis:
|
|
11243
|
-
"project:
|
|
11244
|
-
"project:
|
|
11245
|
-
"hardis:
|
|
11246
|
-
"
|
|
11247
|
-
"
|
|
11248
|
-
"
|
|
11249
|
-
"hardis:
|
|
11250
|
-
"
|
|
11251
|
-
"
|
|
11252
|
-
"
|
|
11253
|
-
"hardis:project:
|
|
11254
|
-
"project:hardis:
|
|
11255
|
-
"project:
|
|
11256
|
-
"project:
|
|
11257
|
-
"hardis:
|
|
11258
|
-
"
|
|
11259
|
-
"
|
|
11260
|
-
"
|
|
11261
|
-
"hardis:
|
|
11262
|
-
"
|
|
11263
|
-
"
|
|
11264
|
-
"
|
|
11394
|
+
"hardis:project:deploy:notify",
|
|
11395
|
+
"project:hardis:deploy:notify",
|
|
11396
|
+
"project:deploy:hardis:notify",
|
|
11397
|
+
"project:deploy:notify:hardis",
|
|
11398
|
+
"hardis:deploy:project:notify",
|
|
11399
|
+
"deploy:hardis:project:notify",
|
|
11400
|
+
"deploy:project:hardis:notify",
|
|
11401
|
+
"deploy:project:notify:hardis",
|
|
11402
|
+
"hardis:deploy:notify:project",
|
|
11403
|
+
"deploy:hardis:notify:project",
|
|
11404
|
+
"deploy:notify:hardis:project",
|
|
11405
|
+
"deploy:notify:project:hardis",
|
|
11406
|
+
"hardis:project:notify:deploy",
|
|
11407
|
+
"project:hardis:notify:deploy",
|
|
11408
|
+
"project:notify:hardis:deploy",
|
|
11409
|
+
"project:notify:deploy:hardis",
|
|
11410
|
+
"hardis:notify:project:deploy",
|
|
11411
|
+
"notify:hardis:project:deploy",
|
|
11412
|
+
"notify:project:hardis:deploy",
|
|
11413
|
+
"notify:project:deploy:hardis",
|
|
11414
|
+
"hardis:notify:deploy:project",
|
|
11415
|
+
"notify:hardis:deploy:project",
|
|
11416
|
+
"notify:deploy:hardis:project",
|
|
11417
|
+
"notify:deploy:project:hardis"
|
|
11265
11418
|
]
|
|
11266
11419
|
},
|
|
11267
|
-
"hardis:project:
|
|
11268
|
-
"aliases": [
|
|
11269
|
-
|
|
11270
|
-
"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",
|
|
11271
|
-
"examples": [
|
|
11272
|
-
"$ sf hardis:project:fix:profiletabs"
|
|
11420
|
+
"hardis:project:deploy:quick": {
|
|
11421
|
+
"aliases": [
|
|
11422
|
+
"hardis:deploy:quick"
|
|
11273
11423
|
],
|
|
11424
|
+
"args": {},
|
|
11425
|
+
"description": "sfdx-hardis wrapper for **sf project deploy quick** that displays tips to solve deployment errors.\n\nNote: Use **--json** argument to have better results\n\n[](https://nicolas.vuillamy.fr/assisted-solving-of-salesforce-deployments-errors-47f3666a9ed0)\n\n[See documentation of Salesforce command](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_project_commands_unified.htm#cli_reference_project_deploy_quick_unified)\n\n### Deployment pre or post commands\n\nYou can define command lines to run before or after a deployment, with parameters:\n\n- **id**: Unique Id for the command\n- **label**: Human readable label for the command\n- **skipIfError**: If defined to \"true\", the post-command won't be run if there is a deployment failure\n- **context**: Defines the context where the command will be run. Can be **all** (default), **check-deployment-only** or **process-deployment-only**\n- **runOnlyOnceByOrg**: If set to true, the command will be run only one time per org. A record of SfdxHardisTrace__c is stored to make that possible (it needs to be existing in target org)\n\nIf the commands are not the same depending on the target org, you can define them into **config/branches/.sfdx-hardis-BRANCHNAME.yml** instead of root **config/.sfdx-hardis.yml**\n\nExample:\n\n```yaml\ncommandsPreDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to the deployment user\n command: sf data update record --sobject User --where \"Username='deploy.github@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n\ncommandsPostDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to desired username\n command: sf data update record --sobject User --where \"Username='admin-yser@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n - id: someActionToRunJustOneTime\n label: And to run only if deployment is success\n command: sf sfdmu:run ...\n skipIfError: true\n context: process-deployment-only\n runOnlyOnceByOrg: true\n```\n",
|
|
11274
11426
|
"flags": {
|
|
11275
11427
|
"json": {
|
|
11276
11428
|
"description": "Format output as json.",
|
|
@@ -11287,372 +11439,20 @@
|
|
|
11287
11439
|
"multiple": false,
|
|
11288
11440
|
"type": "option"
|
|
11289
11441
|
},
|
|
11290
|
-
"
|
|
11291
|
-
"char": "
|
|
11292
|
-
"description": "
|
|
11293
|
-
"name": "
|
|
11294
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
11442
|
+
"api-version": {
|
|
11443
|
+
"char": "a",
|
|
11444
|
+
"description": "api-version",
|
|
11445
|
+
"name": "api-version",
|
|
11295
11446
|
"hasDynamicHelp": false,
|
|
11296
11447
|
"multiple": false,
|
|
11297
11448
|
"type": "option"
|
|
11298
11449
|
},
|
|
11299
|
-
"
|
|
11300
|
-
"
|
|
11301
|
-
"
|
|
11302
|
-
|
|
11303
|
-
|
|
11304
|
-
"
|
|
11305
|
-
},
|
|
11306
|
-
"websocket": {
|
|
11307
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11308
|
-
"name": "websocket",
|
|
11309
|
-
"hasDynamicHelp": false,
|
|
11310
|
-
"multiple": false,
|
|
11311
|
-
"type": "option"
|
|
11312
|
-
},
|
|
11313
|
-
"skipauth": {
|
|
11314
|
-
"description": "Skip authentication check when a default username is required",
|
|
11315
|
-
"name": "skipauth",
|
|
11316
|
-
"allowNo": false,
|
|
11317
|
-
"type": "boolean"
|
|
11318
|
-
},
|
|
11319
|
-
"target-org": {
|
|
11320
|
-
"aliases": [
|
|
11321
|
-
"targetusername",
|
|
11322
|
-
"u"
|
|
11323
|
-
],
|
|
11324
|
-
"char": "o",
|
|
11325
|
-
"deprecateAliases": true,
|
|
11326
|
-
"name": "target-org",
|
|
11327
|
-
"noCacheDefault": true,
|
|
11328
|
-
"required": true,
|
|
11329
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
11330
|
-
"hasDynamicHelp": true,
|
|
11331
|
-
"multiple": false,
|
|
11332
|
-
"type": "option"
|
|
11333
|
-
}
|
|
11334
|
-
},
|
|
11335
|
-
"hasDynamicHelp": true,
|
|
11336
|
-
"hiddenAliases": [],
|
|
11337
|
-
"id": "hardis:project:fix:profiletabs",
|
|
11338
|
-
"pluginAlias": "sfdx-hardis",
|
|
11339
|
-
"pluginName": "sfdx-hardis",
|
|
11340
|
-
"pluginType": "core",
|
|
11341
|
-
"strict": true,
|
|
11342
|
-
"enableJsonFlag": true,
|
|
11343
|
-
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
11344
|
-
"requiresProject": true,
|
|
11345
|
-
"isESM": true,
|
|
11346
|
-
"relativePath": [
|
|
11347
|
-
"lib",
|
|
11348
|
-
"commands",
|
|
11349
|
-
"hardis",
|
|
11350
|
-
"project",
|
|
11351
|
-
"fix",
|
|
11352
|
-
"profiletabs.js"
|
|
11353
|
-
],
|
|
11354
|
-
"aliasPermutations": [],
|
|
11355
|
-
"permutations": [
|
|
11356
|
-
"hardis:project:fix:profiletabs",
|
|
11357
|
-
"project:hardis:fix:profiletabs",
|
|
11358
|
-
"project:fix:hardis:profiletabs",
|
|
11359
|
-
"project:fix:profiletabs:hardis",
|
|
11360
|
-
"hardis:fix:project:profiletabs",
|
|
11361
|
-
"fix:hardis:project:profiletabs",
|
|
11362
|
-
"fix:project:hardis:profiletabs",
|
|
11363
|
-
"fix:project:profiletabs:hardis",
|
|
11364
|
-
"hardis:fix:profiletabs:project",
|
|
11365
|
-
"fix:hardis:profiletabs:project",
|
|
11366
|
-
"fix:profiletabs:hardis:project",
|
|
11367
|
-
"fix:profiletabs:project:hardis",
|
|
11368
|
-
"hardis:project:profiletabs:fix",
|
|
11369
|
-
"project:hardis:profiletabs:fix",
|
|
11370
|
-
"project:profiletabs:hardis:fix",
|
|
11371
|
-
"project:profiletabs:fix:hardis",
|
|
11372
|
-
"hardis:profiletabs:project:fix",
|
|
11373
|
-
"profiletabs:hardis:project:fix",
|
|
11374
|
-
"profiletabs:project:hardis:fix",
|
|
11375
|
-
"profiletabs:project:fix:hardis",
|
|
11376
|
-
"hardis:profiletabs:fix:project",
|
|
11377
|
-
"profiletabs:hardis:fix:project",
|
|
11378
|
-
"profiletabs:fix:hardis:project",
|
|
11379
|
-
"profiletabs:fix:project:hardis"
|
|
11380
|
-
]
|
|
11381
|
-
},
|
|
11382
|
-
"hardis:project:fix:v53flexipages": {
|
|
11383
|
-
"aliases": [],
|
|
11384
|
-
"args": {},
|
|
11385
|
-
"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",
|
|
11386
|
-
"examples": [
|
|
11387
|
-
"$ sf hardis:project:fix:v53flexipages"
|
|
11388
|
-
],
|
|
11389
|
-
"flags": {
|
|
11390
|
-
"json": {
|
|
11391
|
-
"description": "Format output as json.",
|
|
11392
|
-
"helpGroup": "GLOBAL",
|
|
11393
|
-
"name": "json",
|
|
11394
|
-
"allowNo": false,
|
|
11395
|
-
"type": "boolean"
|
|
11396
|
-
},
|
|
11397
|
-
"flags-dir": {
|
|
11398
|
-
"helpGroup": "GLOBAL",
|
|
11399
|
-
"name": "flags-dir",
|
|
11400
|
-
"summary": "Import flag values from a directory.",
|
|
11401
|
-
"hasDynamicHelp": false,
|
|
11402
|
-
"multiple": false,
|
|
11403
|
-
"type": "option"
|
|
11404
|
-
},
|
|
11405
|
-
"path": {
|
|
11406
|
-
"char": "p",
|
|
11407
|
-
"description": "Root folder",
|
|
11408
|
-
"name": "path",
|
|
11409
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
11410
|
-
"hasDynamicHelp": false,
|
|
11411
|
-
"multiple": false,
|
|
11412
|
-
"type": "option"
|
|
11413
|
-
},
|
|
11414
|
-
"debug": {
|
|
11415
|
-
"char": "d",
|
|
11416
|
-
"description": "Activate debug mode (more logs)",
|
|
11417
|
-
"name": "debug",
|
|
11418
|
-
"allowNo": false,
|
|
11419
|
-
"type": "boolean"
|
|
11420
|
-
},
|
|
11421
|
-
"websocket": {
|
|
11422
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11423
|
-
"name": "websocket",
|
|
11424
|
-
"hasDynamicHelp": false,
|
|
11425
|
-
"multiple": false,
|
|
11426
|
-
"type": "option"
|
|
11427
|
-
},
|
|
11428
|
-
"skipauth": {
|
|
11429
|
-
"description": "Skip authentication check when a default username is required",
|
|
11430
|
-
"name": "skipauth",
|
|
11431
|
-
"allowNo": false,
|
|
11432
|
-
"type": "boolean"
|
|
11433
|
-
}
|
|
11434
|
-
},
|
|
11435
|
-
"hasDynamicHelp": false,
|
|
11436
|
-
"hiddenAliases": [],
|
|
11437
|
-
"id": "hardis:project:fix:v53flexipages",
|
|
11438
|
-
"pluginAlias": "sfdx-hardis",
|
|
11439
|
-
"pluginName": "sfdx-hardis",
|
|
11440
|
-
"pluginType": "core",
|
|
11441
|
-
"strict": true,
|
|
11442
|
-
"enableJsonFlag": true,
|
|
11443
|
-
"title": "Fix flexipages for v53",
|
|
11444
|
-
"requiresProject": true,
|
|
11445
|
-
"isESM": true,
|
|
11446
|
-
"relativePath": [
|
|
11447
|
-
"lib",
|
|
11448
|
-
"commands",
|
|
11449
|
-
"hardis",
|
|
11450
|
-
"project",
|
|
11451
|
-
"fix",
|
|
11452
|
-
"v53flexipages.js"
|
|
11453
|
-
],
|
|
11454
|
-
"aliasPermutations": [],
|
|
11455
|
-
"permutations": [
|
|
11456
|
-
"hardis:project:fix:v53flexipages",
|
|
11457
|
-
"project:hardis:fix:v53flexipages",
|
|
11458
|
-
"project:fix:hardis:v53flexipages",
|
|
11459
|
-
"project:fix:v53flexipages:hardis",
|
|
11460
|
-
"hardis:fix:project:v53flexipages",
|
|
11461
|
-
"fix:hardis:project:v53flexipages",
|
|
11462
|
-
"fix:project:hardis:v53flexipages",
|
|
11463
|
-
"fix:project:v53flexipages:hardis",
|
|
11464
|
-
"hardis:fix:v53flexipages:project",
|
|
11465
|
-
"fix:hardis:v53flexipages:project",
|
|
11466
|
-
"fix:v53flexipages:hardis:project",
|
|
11467
|
-
"fix:v53flexipages:project:hardis",
|
|
11468
|
-
"hardis:project:v53flexipages:fix",
|
|
11469
|
-
"project:hardis:v53flexipages:fix",
|
|
11470
|
-
"project:v53flexipages:hardis:fix",
|
|
11471
|
-
"project:v53flexipages:fix:hardis",
|
|
11472
|
-
"hardis:v53flexipages:project:fix",
|
|
11473
|
-
"v53flexipages:hardis:project:fix",
|
|
11474
|
-
"v53flexipages:project:hardis:fix",
|
|
11475
|
-
"v53flexipages:project:fix:hardis",
|
|
11476
|
-
"hardis:v53flexipages:fix:project",
|
|
11477
|
-
"v53flexipages:hardis:fix:project",
|
|
11478
|
-
"v53flexipages:fix:hardis:project",
|
|
11479
|
-
"v53flexipages:fix:project:hardis"
|
|
11480
|
-
]
|
|
11481
|
-
},
|
|
11482
|
-
"hardis:project:deploy:notify": {
|
|
11483
|
-
"aliases": [],
|
|
11484
|
-
"args": {},
|
|
11485
|
-
"description": "Post notifications related to:\n\n- **Deployment simulation** _(use with --check-only)_\n\n- **Deployment process** _(to call only if your deployment is successful)_\n\n### Integrations\n\nAccording to the [integrations you configured](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integrations-home/), notifications can contain deployment information and [Flow Visual Git Diff](https://sfdx-hardis.cloudity.com/salesforce-deployment-assistant-home/#flow-visual-git-diff)\n\n - GitHub, Gitlab, Azure DevOps, Bitbucket comments on Pull Requests (including Flows Visual Git Diff)\n\n - Slack, Microsoft Teams, Email deployment summary after a successful deployment\n\n - JIRA tags and comments on tickets that just has been deployed\n\n\n\n\n\n### Flows Visual Git Diff\n\n- Visually show you the differences on a diagram\n\n- Display the update details without having to open any XML !\n\n🟩 = added\n\n🟥 = removed\n\n🟧 = updated\n\n\n\n\n\n### In custom CI/CD workflow\n\nExample of usage in a custom CI/CD pipeline:\n\n```bash\n# Disable exit-on-error temporarily\nset +e\n\n# Run the deploy command\nsf project deploy start [....]\nRET_CODE=$?\n\n# Re-enable exit-on-error\nset -e\n\n# Determine MYSTATUS based on return code\nif [ $RET_CODE -eq 0 ]; then\n MYSTATUS=\"valid\"\nelse\n MYSTATUS=\"invalid\"\nfi\n\n# Run the notify command with MYSTATUS\nsf hardis:project:deploy:notify --check-only --deploy-status \"$MYSTATUS\"\n```\n\n### Other usages\n\nThis command is for custom SF Cli pipelines, if you are a sfdx-hardis user, it is already embedded in sf hardis:deploy:smart.\n\nYou can also use [sfdx-hardis wrapper commands of SF deployment commands](https://sfdx-hardis.cloudity.com/salesforce-deployment-assistant-setup/#using-custom-cicd-pipeline)\n",
|
|
11486
|
-
"examples": [
|
|
11487
|
-
"$ sf hardis:project:deploy:notify --check-only --deploy-status valid --message \"This deployment check is valid\\n\\nYahooo !!\"",
|
|
11488
|
-
"$ sf hardis:project:deploy:notify --check-only --deploy-status invalid --message \"This deployment check has failed !\\n\\Oh no !!\"",
|
|
11489
|
-
"$ sf hardis:project:deploy:notify --deploy-status valid --message \"This deployment has been processed !\\n\\nYahooo !!\""
|
|
11490
|
-
],
|
|
11491
|
-
"flags": {
|
|
11492
|
-
"json": {
|
|
11493
|
-
"description": "Format output as json.",
|
|
11494
|
-
"helpGroup": "GLOBAL",
|
|
11495
|
-
"name": "json",
|
|
11496
|
-
"allowNo": false,
|
|
11497
|
-
"type": "boolean"
|
|
11498
|
-
},
|
|
11499
|
-
"flags-dir": {
|
|
11500
|
-
"helpGroup": "GLOBAL",
|
|
11501
|
-
"name": "flags-dir",
|
|
11502
|
-
"summary": "Import flag values from a directory.",
|
|
11503
|
-
"hasDynamicHelp": false,
|
|
11504
|
-
"multiple": false,
|
|
11505
|
-
"type": "option"
|
|
11506
|
-
},
|
|
11507
|
-
"check-only": {
|
|
11508
|
-
"char": "c",
|
|
11509
|
-
"description": "Use this option to send notifications from a Deployment simulation job",
|
|
11510
|
-
"name": "check-only",
|
|
11511
|
-
"allowNo": false,
|
|
11512
|
-
"type": "boolean"
|
|
11513
|
-
},
|
|
11514
|
-
"deploy-status": {
|
|
11515
|
-
"char": "s",
|
|
11516
|
-
"description": "Send success, failure or unknown (default) to indicate if the deployment or deployment simulation is in success or not",
|
|
11517
|
-
"name": "deploy-status",
|
|
11518
|
-
"default": "unknown",
|
|
11519
|
-
"hasDynamicHelp": false,
|
|
11520
|
-
"multiple": false,
|
|
11521
|
-
"options": [
|
|
11522
|
-
"valid",
|
|
11523
|
-
"invalid",
|
|
11524
|
-
"unknown"
|
|
11525
|
-
],
|
|
11526
|
-
"type": "option"
|
|
11527
|
-
},
|
|
11528
|
-
"message": {
|
|
11529
|
-
"char": "m",
|
|
11530
|
-
"description": "Custom message that you want to be added in notifications (string or markdown format)",
|
|
11531
|
-
"name": "message",
|
|
11532
|
-
"default": "",
|
|
11533
|
-
"hasDynamicHelp": false,
|
|
11534
|
-
"multiple": false,
|
|
11535
|
-
"type": "option"
|
|
11536
|
-
},
|
|
11537
|
-
"debug": {
|
|
11538
|
-
"char": "d",
|
|
11539
|
-
"description": "Activate debug mode (more logs)",
|
|
11540
|
-
"name": "debug",
|
|
11541
|
-
"allowNo": false,
|
|
11542
|
-
"type": "boolean"
|
|
11543
|
-
},
|
|
11544
|
-
"websocket": {
|
|
11545
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11546
|
-
"name": "websocket",
|
|
11547
|
-
"hasDynamicHelp": false,
|
|
11548
|
-
"multiple": false,
|
|
11549
|
-
"type": "option"
|
|
11550
|
-
},
|
|
11551
|
-
"skipauth": {
|
|
11552
|
-
"description": "Skip authentication check when a default username is required",
|
|
11553
|
-
"name": "skipauth",
|
|
11554
|
-
"allowNo": false,
|
|
11555
|
-
"type": "boolean"
|
|
11556
|
-
},
|
|
11557
|
-
"target-org": {
|
|
11558
|
-
"aliases": [
|
|
11559
|
-
"targetusername",
|
|
11560
|
-
"u"
|
|
11561
|
-
],
|
|
11562
|
-
"char": "o",
|
|
11563
|
-
"deprecateAliases": true,
|
|
11564
|
-
"name": "target-org",
|
|
11565
|
-
"noCacheDefault": true,
|
|
11566
|
-
"required": true,
|
|
11567
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
11568
|
-
"hasDynamicHelp": true,
|
|
11569
|
-
"multiple": false,
|
|
11570
|
-
"type": "option"
|
|
11571
|
-
}
|
|
11572
|
-
},
|
|
11573
|
-
"hasDynamicHelp": true,
|
|
11574
|
-
"hiddenAliases": [],
|
|
11575
|
-
"id": "hardis:project:deploy:notify",
|
|
11576
|
-
"pluginAlias": "sfdx-hardis",
|
|
11577
|
-
"pluginName": "sfdx-hardis",
|
|
11578
|
-
"pluginType": "core",
|
|
11579
|
-
"strict": true,
|
|
11580
|
-
"enableJsonFlag": true,
|
|
11581
|
-
"title": "Deployment Notifications",
|
|
11582
|
-
"requiresProject": true,
|
|
11583
|
-
"isESM": true,
|
|
11584
|
-
"relativePath": [
|
|
11585
|
-
"lib",
|
|
11586
|
-
"commands",
|
|
11587
|
-
"hardis",
|
|
11588
|
-
"project",
|
|
11589
|
-
"deploy",
|
|
11590
|
-
"notify.js"
|
|
11591
|
-
],
|
|
11592
|
-
"aliasPermutations": [],
|
|
11593
|
-
"permutations": [
|
|
11594
|
-
"hardis:project:deploy:notify",
|
|
11595
|
-
"project:hardis:deploy:notify",
|
|
11596
|
-
"project:deploy:hardis:notify",
|
|
11597
|
-
"project:deploy:notify:hardis",
|
|
11598
|
-
"hardis:deploy:project:notify",
|
|
11599
|
-
"deploy:hardis:project:notify",
|
|
11600
|
-
"deploy:project:hardis:notify",
|
|
11601
|
-
"deploy:project:notify:hardis",
|
|
11602
|
-
"hardis:deploy:notify:project",
|
|
11603
|
-
"deploy:hardis:notify:project",
|
|
11604
|
-
"deploy:notify:hardis:project",
|
|
11605
|
-
"deploy:notify:project:hardis",
|
|
11606
|
-
"hardis:project:notify:deploy",
|
|
11607
|
-
"project:hardis:notify:deploy",
|
|
11608
|
-
"project:notify:hardis:deploy",
|
|
11609
|
-
"project:notify:deploy:hardis",
|
|
11610
|
-
"hardis:notify:project:deploy",
|
|
11611
|
-
"notify:hardis:project:deploy",
|
|
11612
|
-
"notify:project:hardis:deploy",
|
|
11613
|
-
"notify:project:deploy:hardis",
|
|
11614
|
-
"hardis:notify:deploy:project",
|
|
11615
|
-
"notify:hardis:deploy:project",
|
|
11616
|
-
"notify:deploy:hardis:project",
|
|
11617
|
-
"notify:deploy:project:hardis"
|
|
11618
|
-
]
|
|
11619
|
-
},
|
|
11620
|
-
"hardis:project:deploy:quick": {
|
|
11621
|
-
"aliases": [
|
|
11622
|
-
"hardis:deploy:quick"
|
|
11623
|
-
],
|
|
11624
|
-
"args": {},
|
|
11625
|
-
"description": "sfdx-hardis wrapper for **sf project deploy quick** that displays tips to solve deployment errors.\n\nNote: Use **--json** argument to have better results\n\n[](https://nicolas.vuillamy.fr/assisted-solving-of-salesforce-deployments-errors-47f3666a9ed0)\n\n[See documentation of Salesforce command](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_project_commands_unified.htm#cli_reference_project_deploy_quick_unified)\n\n### Deployment pre or post commands\n\nYou can define command lines to run before or after a deployment, with parameters:\n\n- **id**: Unique Id for the command\n- **label**: Human readable label for the command\n- **skipIfError**: If defined to \"true\", the post-command won't be run if there is a deployment failure\n- **context**: Defines the context where the command will be run. Can be **all** (default), **check-deployment-only** or **process-deployment-only**\n- **runOnlyOnceByOrg**: If set to true, the command will be run only one time per org. A record of SfdxHardisTrace__c is stored to make that possible (it needs to be existing in target org)\n\nIf the commands are not the same depending on the target org, you can define them into **config/branches/.sfdx-hardis-BRANCHNAME.yml** instead of root **config/.sfdx-hardis.yml**\n\nExample:\n\n```yaml\ncommandsPreDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to the deployment user\n command: sf data update record --sobject User --where \"Username='deploy.github@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n\ncommandsPostDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to desired username\n command: sf data update record --sobject User --where \"Username='admin-yser@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n - id: someActionToRunJustOneTime\n label: And to run only if deployment is success\n command: sf sfdmu:run ...\n skipIfError: true\n context: process-deployment-only\n runOnlyOnceByOrg: true\n```\n",
|
|
11626
|
-
"flags": {
|
|
11627
|
-
"json": {
|
|
11628
|
-
"description": "Format output as json.",
|
|
11629
|
-
"helpGroup": "GLOBAL",
|
|
11630
|
-
"name": "json",
|
|
11631
|
-
"allowNo": false,
|
|
11632
|
-
"type": "boolean"
|
|
11633
|
-
},
|
|
11634
|
-
"flags-dir": {
|
|
11635
|
-
"helpGroup": "GLOBAL",
|
|
11636
|
-
"name": "flags-dir",
|
|
11637
|
-
"summary": "Import flag values from a directory.",
|
|
11638
|
-
"hasDynamicHelp": false,
|
|
11639
|
-
"multiple": false,
|
|
11640
|
-
"type": "option"
|
|
11641
|
-
},
|
|
11642
|
-
"api-version": {
|
|
11643
|
-
"char": "a",
|
|
11644
|
-
"description": "api-version",
|
|
11645
|
-
"name": "api-version",
|
|
11646
|
-
"hasDynamicHelp": false,
|
|
11647
|
-
"multiple": false,
|
|
11648
|
-
"type": "option"
|
|
11649
|
-
},
|
|
11650
|
-
"async": {
|
|
11651
|
-
"description": "async",
|
|
11652
|
-
"exclusive": [
|
|
11653
|
-
"wait"
|
|
11654
|
-
],
|
|
11655
|
-
"name": "async",
|
|
11450
|
+
"async": {
|
|
11451
|
+
"description": "async",
|
|
11452
|
+
"exclusive": [
|
|
11453
|
+
"wait"
|
|
11454
|
+
],
|
|
11455
|
+
"name": "async",
|
|
11656
11456
|
"allowNo": false,
|
|
11657
11457
|
"type": "boolean"
|
|
11658
11458
|
},
|
|
@@ -12654,6 +12454,221 @@
|
|
|
12654
12454
|
"validate:deploy:project:hardis"
|
|
12655
12455
|
]
|
|
12656
12456
|
},
|
|
12457
|
+
"hardis:project:fix:profiletabs": {
|
|
12458
|
+
"aliases": [],
|
|
12459
|
+
"args": {},
|
|
12460
|
+
"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",
|
|
12461
|
+
"examples": [
|
|
12462
|
+
"$ sf hardis:project:fix:profiletabs"
|
|
12463
|
+
],
|
|
12464
|
+
"flags": {
|
|
12465
|
+
"json": {
|
|
12466
|
+
"description": "Format output as json.",
|
|
12467
|
+
"helpGroup": "GLOBAL",
|
|
12468
|
+
"name": "json",
|
|
12469
|
+
"allowNo": false,
|
|
12470
|
+
"type": "boolean"
|
|
12471
|
+
},
|
|
12472
|
+
"flags-dir": {
|
|
12473
|
+
"helpGroup": "GLOBAL",
|
|
12474
|
+
"name": "flags-dir",
|
|
12475
|
+
"summary": "Import flag values from a directory.",
|
|
12476
|
+
"hasDynamicHelp": false,
|
|
12477
|
+
"multiple": false,
|
|
12478
|
+
"type": "option"
|
|
12479
|
+
},
|
|
12480
|
+
"path": {
|
|
12481
|
+
"char": "p",
|
|
12482
|
+
"description": "Root folder",
|
|
12483
|
+
"name": "path",
|
|
12484
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12485
|
+
"hasDynamicHelp": false,
|
|
12486
|
+
"multiple": false,
|
|
12487
|
+
"type": "option"
|
|
12488
|
+
},
|
|
12489
|
+
"debug": {
|
|
12490
|
+
"char": "d",
|
|
12491
|
+
"description": "Activate debug mode (more logs)",
|
|
12492
|
+
"name": "debug",
|
|
12493
|
+
"allowNo": false,
|
|
12494
|
+
"type": "boolean"
|
|
12495
|
+
},
|
|
12496
|
+
"websocket": {
|
|
12497
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12498
|
+
"name": "websocket",
|
|
12499
|
+
"hasDynamicHelp": false,
|
|
12500
|
+
"multiple": false,
|
|
12501
|
+
"type": "option"
|
|
12502
|
+
},
|
|
12503
|
+
"skipauth": {
|
|
12504
|
+
"description": "Skip authentication check when a default username is required",
|
|
12505
|
+
"name": "skipauth",
|
|
12506
|
+
"allowNo": false,
|
|
12507
|
+
"type": "boolean"
|
|
12508
|
+
},
|
|
12509
|
+
"target-org": {
|
|
12510
|
+
"aliases": [
|
|
12511
|
+
"targetusername",
|
|
12512
|
+
"u"
|
|
12513
|
+
],
|
|
12514
|
+
"char": "o",
|
|
12515
|
+
"deprecateAliases": true,
|
|
12516
|
+
"name": "target-org",
|
|
12517
|
+
"noCacheDefault": true,
|
|
12518
|
+
"required": true,
|
|
12519
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
12520
|
+
"hasDynamicHelp": true,
|
|
12521
|
+
"multiple": false,
|
|
12522
|
+
"type": "option"
|
|
12523
|
+
}
|
|
12524
|
+
},
|
|
12525
|
+
"hasDynamicHelp": true,
|
|
12526
|
+
"hiddenAliases": [],
|
|
12527
|
+
"id": "hardis:project:fix:profiletabs",
|
|
12528
|
+
"pluginAlias": "sfdx-hardis",
|
|
12529
|
+
"pluginName": "sfdx-hardis",
|
|
12530
|
+
"pluginType": "core",
|
|
12531
|
+
"strict": true,
|
|
12532
|
+
"enableJsonFlag": true,
|
|
12533
|
+
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
12534
|
+
"requiresProject": true,
|
|
12535
|
+
"isESM": true,
|
|
12536
|
+
"relativePath": [
|
|
12537
|
+
"lib",
|
|
12538
|
+
"commands",
|
|
12539
|
+
"hardis",
|
|
12540
|
+
"project",
|
|
12541
|
+
"fix",
|
|
12542
|
+
"profiletabs.js"
|
|
12543
|
+
],
|
|
12544
|
+
"aliasPermutations": [],
|
|
12545
|
+
"permutations": [
|
|
12546
|
+
"hardis:project:fix:profiletabs",
|
|
12547
|
+
"project:hardis:fix:profiletabs",
|
|
12548
|
+
"project:fix:hardis:profiletabs",
|
|
12549
|
+
"project:fix:profiletabs:hardis",
|
|
12550
|
+
"hardis:fix:project:profiletabs",
|
|
12551
|
+
"fix:hardis:project:profiletabs",
|
|
12552
|
+
"fix:project:hardis:profiletabs",
|
|
12553
|
+
"fix:project:profiletabs:hardis",
|
|
12554
|
+
"hardis:fix:profiletabs:project",
|
|
12555
|
+
"fix:hardis:profiletabs:project",
|
|
12556
|
+
"fix:profiletabs:hardis:project",
|
|
12557
|
+
"fix:profiletabs:project:hardis",
|
|
12558
|
+
"hardis:project:profiletabs:fix",
|
|
12559
|
+
"project:hardis:profiletabs:fix",
|
|
12560
|
+
"project:profiletabs:hardis:fix",
|
|
12561
|
+
"project:profiletabs:fix:hardis",
|
|
12562
|
+
"hardis:profiletabs:project:fix",
|
|
12563
|
+
"profiletabs:hardis:project:fix",
|
|
12564
|
+
"profiletabs:project:hardis:fix",
|
|
12565
|
+
"profiletabs:project:fix:hardis",
|
|
12566
|
+
"hardis:profiletabs:fix:project",
|
|
12567
|
+
"profiletabs:hardis:fix:project",
|
|
12568
|
+
"profiletabs:fix:hardis:project",
|
|
12569
|
+
"profiletabs:fix:project:hardis"
|
|
12570
|
+
]
|
|
12571
|
+
},
|
|
12572
|
+
"hardis:project:fix:v53flexipages": {
|
|
12573
|
+
"aliases": [],
|
|
12574
|
+
"args": {},
|
|
12575
|
+
"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",
|
|
12576
|
+
"examples": [
|
|
12577
|
+
"$ sf hardis:project:fix:v53flexipages"
|
|
12578
|
+
],
|
|
12579
|
+
"flags": {
|
|
12580
|
+
"json": {
|
|
12581
|
+
"description": "Format output as json.",
|
|
12582
|
+
"helpGroup": "GLOBAL",
|
|
12583
|
+
"name": "json",
|
|
12584
|
+
"allowNo": false,
|
|
12585
|
+
"type": "boolean"
|
|
12586
|
+
},
|
|
12587
|
+
"flags-dir": {
|
|
12588
|
+
"helpGroup": "GLOBAL",
|
|
12589
|
+
"name": "flags-dir",
|
|
12590
|
+
"summary": "Import flag values from a directory.",
|
|
12591
|
+
"hasDynamicHelp": false,
|
|
12592
|
+
"multiple": false,
|
|
12593
|
+
"type": "option"
|
|
12594
|
+
},
|
|
12595
|
+
"path": {
|
|
12596
|
+
"char": "p",
|
|
12597
|
+
"description": "Root folder",
|
|
12598
|
+
"name": "path",
|
|
12599
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12600
|
+
"hasDynamicHelp": false,
|
|
12601
|
+
"multiple": false,
|
|
12602
|
+
"type": "option"
|
|
12603
|
+
},
|
|
12604
|
+
"debug": {
|
|
12605
|
+
"char": "d",
|
|
12606
|
+
"description": "Activate debug mode (more logs)",
|
|
12607
|
+
"name": "debug",
|
|
12608
|
+
"allowNo": false,
|
|
12609
|
+
"type": "boolean"
|
|
12610
|
+
},
|
|
12611
|
+
"websocket": {
|
|
12612
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12613
|
+
"name": "websocket",
|
|
12614
|
+
"hasDynamicHelp": false,
|
|
12615
|
+
"multiple": false,
|
|
12616
|
+
"type": "option"
|
|
12617
|
+
},
|
|
12618
|
+
"skipauth": {
|
|
12619
|
+
"description": "Skip authentication check when a default username is required",
|
|
12620
|
+
"name": "skipauth",
|
|
12621
|
+
"allowNo": false,
|
|
12622
|
+
"type": "boolean"
|
|
12623
|
+
}
|
|
12624
|
+
},
|
|
12625
|
+
"hasDynamicHelp": false,
|
|
12626
|
+
"hiddenAliases": [],
|
|
12627
|
+
"id": "hardis:project:fix:v53flexipages",
|
|
12628
|
+
"pluginAlias": "sfdx-hardis",
|
|
12629
|
+
"pluginName": "sfdx-hardis",
|
|
12630
|
+
"pluginType": "core",
|
|
12631
|
+
"strict": true,
|
|
12632
|
+
"enableJsonFlag": true,
|
|
12633
|
+
"title": "Fix flexipages for v53",
|
|
12634
|
+
"requiresProject": true,
|
|
12635
|
+
"isESM": true,
|
|
12636
|
+
"relativePath": [
|
|
12637
|
+
"lib",
|
|
12638
|
+
"commands",
|
|
12639
|
+
"hardis",
|
|
12640
|
+
"project",
|
|
12641
|
+
"fix",
|
|
12642
|
+
"v53flexipages.js"
|
|
12643
|
+
],
|
|
12644
|
+
"aliasPermutations": [],
|
|
12645
|
+
"permutations": [
|
|
12646
|
+
"hardis:project:fix:v53flexipages",
|
|
12647
|
+
"project:hardis:fix:v53flexipages",
|
|
12648
|
+
"project:fix:hardis:v53flexipages",
|
|
12649
|
+
"project:fix:v53flexipages:hardis",
|
|
12650
|
+
"hardis:fix:project:v53flexipages",
|
|
12651
|
+
"fix:hardis:project:v53flexipages",
|
|
12652
|
+
"fix:project:hardis:v53flexipages",
|
|
12653
|
+
"fix:project:v53flexipages:hardis",
|
|
12654
|
+
"hardis:fix:v53flexipages:project",
|
|
12655
|
+
"fix:hardis:v53flexipages:project",
|
|
12656
|
+
"fix:v53flexipages:hardis:project",
|
|
12657
|
+
"fix:v53flexipages:project:hardis",
|
|
12658
|
+
"hardis:project:v53flexipages:fix",
|
|
12659
|
+
"project:hardis:v53flexipages:fix",
|
|
12660
|
+
"project:v53flexipages:hardis:fix",
|
|
12661
|
+
"project:v53flexipages:fix:hardis",
|
|
12662
|
+
"hardis:v53flexipages:project:fix",
|
|
12663
|
+
"v53flexipages:hardis:project:fix",
|
|
12664
|
+
"v53flexipages:project:hardis:fix",
|
|
12665
|
+
"v53flexipages:project:fix:hardis",
|
|
12666
|
+
"hardis:v53flexipages:fix:project",
|
|
12667
|
+
"v53flexipages:hardis:fix:project",
|
|
12668
|
+
"v53flexipages:fix:hardis:project",
|
|
12669
|
+
"v53flexipages:fix:project:hardis"
|
|
12670
|
+
]
|
|
12671
|
+
},
|
|
12657
12672
|
"hardis:project:generate:bypass": {
|
|
12658
12673
|
"aliases": [],
|
|
12659
12674
|
"args": {},
|
|
@@ -15136,5 +15151,5 @@
|
|
|
15136
15151
|
]
|
|
15137
15152
|
}
|
|
15138
15153
|
},
|
|
15139
|
-
"version": "6.1
|
|
15154
|
+
"version": "6.2.1"
|
|
15140
15155
|
}
|