sfdx-hardis 6.12.3 → 6.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/oclif.lock +24 -17
- package/oclif.manifest.json +520 -520
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -57,13 +57,12 @@
|
|
|
57
57
|
"world:hello"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
|
-
"hardis:
|
|
60
|
+
"hardis:cache:clear": {
|
|
61
61
|
"aliases": [],
|
|
62
62
|
"args": {},
|
|
63
|
-
"description": "\n## Command Behavior\n\n**
|
|
63
|
+
"description": "\n## Command Behavior\n\n**Clears the local cache generated by the sfdx-hardis plugin.**\n\nThis command is designed to remove temporary files, stored configurations, and other cached data that sfdx-hardis uses to optimize its operations. Clearing the cache can be beneficial for:\n\n- **Troubleshooting:** Resolving unexpected behavior or inconsistencies.\n- **Disk Space Management:** Freeing up storage on your local machine.\n- **Ensuring Fresh Data:** Guaranteeing that the plugin operates with the most current data and configurations.\n\n## Technical explanations\n\nThe command's technical implementation is straightforward:\n\n- **Direct Function Call:** It directly invokes the `clearCache()` function, which is imported from \buri../../../common/cache/index.js\buri.\n- **Cache Management Logic:** The \buriclearCache()` function encapsulates the logic for identifying and removing the specific files and directories that constitute the sfdx-hardis cache.\n",
|
|
64
64
|
"examples": [
|
|
65
|
-
"$ sf hardis:
|
|
66
|
-
"CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
|
|
65
|
+
"$ sf hardis:cache:clear"
|
|
67
66
|
],
|
|
68
67
|
"flags": {
|
|
69
68
|
"json": {
|
|
@@ -81,28 +80,6 @@
|
|
|
81
80
|
"multiple": false,
|
|
82
81
|
"type": "option"
|
|
83
82
|
},
|
|
84
|
-
"instanceurl": {
|
|
85
|
-
"char": "r",
|
|
86
|
-
"description": "URL of org instance",
|
|
87
|
-
"name": "instanceurl",
|
|
88
|
-
"hasDynamicHelp": false,
|
|
89
|
-
"multiple": false,
|
|
90
|
-
"type": "option"
|
|
91
|
-
},
|
|
92
|
-
"devhub": {
|
|
93
|
-
"char": "h",
|
|
94
|
-
"description": "Also connect associated DevHub",
|
|
95
|
-
"name": "devhub",
|
|
96
|
-
"allowNo": false,
|
|
97
|
-
"type": "boolean"
|
|
98
|
-
},
|
|
99
|
-
"scratchorg": {
|
|
100
|
-
"char": "s",
|
|
101
|
-
"description": "Scratch org",
|
|
102
|
-
"name": "scratchorg",
|
|
103
|
-
"allowNo": false,
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
},
|
|
106
83
|
"debug": {
|
|
107
84
|
"char": "d",
|
|
108
85
|
"description": "Activate debug mode (more logs)",
|
|
@@ -126,38 +103,41 @@
|
|
|
126
103
|
},
|
|
127
104
|
"hasDynamicHelp": false,
|
|
128
105
|
"hiddenAliases": [],
|
|
129
|
-
"id": "hardis:
|
|
106
|
+
"id": "hardis:cache:clear",
|
|
130
107
|
"pluginAlias": "sfdx-hardis",
|
|
131
108
|
"pluginName": "sfdx-hardis",
|
|
132
109
|
"pluginType": "core",
|
|
133
110
|
"strict": true,
|
|
134
111
|
"enableJsonFlag": true,
|
|
135
|
-
"title": "
|
|
112
|
+
"title": "Clear sfdx-hardis cache",
|
|
113
|
+
"uiConfig": {
|
|
114
|
+
"hide": true
|
|
115
|
+
},
|
|
136
116
|
"requiresProject": false,
|
|
137
117
|
"isESM": true,
|
|
138
118
|
"relativePath": [
|
|
139
119
|
"lib",
|
|
140
120
|
"commands",
|
|
141
121
|
"hardis",
|
|
142
|
-
"
|
|
143
|
-
"
|
|
122
|
+
"cache",
|
|
123
|
+
"clear.js"
|
|
144
124
|
],
|
|
145
125
|
"aliasPermutations": [],
|
|
146
126
|
"permutations": [
|
|
147
|
-
"hardis:
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"hardis:
|
|
151
|
-
"
|
|
152
|
-
"
|
|
127
|
+
"hardis:cache:clear",
|
|
128
|
+
"cache:hardis:clear",
|
|
129
|
+
"cache:clear:hardis",
|
|
130
|
+
"hardis:clear:cache",
|
|
131
|
+
"clear:hardis:cache",
|
|
132
|
+
"clear:cache:hardis"
|
|
153
133
|
]
|
|
154
134
|
},
|
|
155
|
-
"hardis:
|
|
135
|
+
"hardis:config:get": {
|
|
156
136
|
"aliases": [],
|
|
157
137
|
"args": {},
|
|
158
|
-
"description": "\n## Command Behavior\n\n**
|
|
138
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the sfdx-hardis configuration for a specified level.**\n\nThis command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.\n\n- **Configuration levels:** It can retrieve configuration from three different levels:\n - **Project:** The configuration defined in the project's `.sfdx-hardis.yml` file.\n - **Branch:** The configuration defined in a branch-specific configuration file (e.g., `.sfdx-hardis.production.yml`).\n - **User:** The global user-level configuration.\n\n## Technical explanations\n\nThe command's logic is straightforward:\n\n- **`getConfig` function:** It calls the `getConfig` utility function, passing the desired configuration level as an argument.\n- **Configuration loading:** The `getConfig` function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON.\n- **Output:** The retrieved configuration is then displayed to the user as a JSON string.\n",
|
|
159
139
|
"examples": [
|
|
160
|
-
"$ sf hardis:
|
|
140
|
+
"$ sf hardis:project:deploy:sources:metadata"
|
|
161
141
|
],
|
|
162
142
|
"flags": {
|
|
163
143
|
"json": {
|
|
@@ -175,6 +155,20 @@
|
|
|
175
155
|
"multiple": false,
|
|
176
156
|
"type": "option"
|
|
177
157
|
},
|
|
158
|
+
"level": {
|
|
159
|
+
"char": "l",
|
|
160
|
+
"description": "project,branch or user",
|
|
161
|
+
"name": "level",
|
|
162
|
+
"default": "project",
|
|
163
|
+
"hasDynamicHelp": false,
|
|
164
|
+
"multiple": false,
|
|
165
|
+
"options": [
|
|
166
|
+
"project",
|
|
167
|
+
"branch",
|
|
168
|
+
"user"
|
|
169
|
+
],
|
|
170
|
+
"type": "option"
|
|
171
|
+
},
|
|
178
172
|
"debug": {
|
|
179
173
|
"char": "d",
|
|
180
174
|
"description": "Activate debug mode (more logs)",
|
|
@@ -198,41 +192,39 @@
|
|
|
198
192
|
},
|
|
199
193
|
"hasDynamicHelp": false,
|
|
200
194
|
"hiddenAliases": [],
|
|
201
|
-
"id": "hardis:
|
|
195
|
+
"id": "hardis:config:get",
|
|
202
196
|
"pluginAlias": "sfdx-hardis",
|
|
203
197
|
"pluginName": "sfdx-hardis",
|
|
204
198
|
"pluginType": "core",
|
|
205
199
|
"strict": true,
|
|
206
200
|
"enableJsonFlag": true,
|
|
207
|
-
"title": "
|
|
208
|
-
"uiConfig": {
|
|
209
|
-
"hide": true
|
|
210
|
-
},
|
|
201
|
+
"title": "Deploy metadata sources to org",
|
|
211
202
|
"requiresProject": false,
|
|
212
203
|
"isESM": true,
|
|
213
204
|
"relativePath": [
|
|
214
205
|
"lib",
|
|
215
206
|
"commands",
|
|
216
207
|
"hardis",
|
|
217
|
-
"
|
|
218
|
-
"
|
|
208
|
+
"config",
|
|
209
|
+
"get.js"
|
|
219
210
|
],
|
|
220
211
|
"aliasPermutations": [],
|
|
221
212
|
"permutations": [
|
|
222
|
-
"hardis:
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"hardis:
|
|
226
|
-
"
|
|
227
|
-
"
|
|
213
|
+
"hardis:config:get",
|
|
214
|
+
"config:hardis:get",
|
|
215
|
+
"config:get:hardis",
|
|
216
|
+
"hardis:get:config",
|
|
217
|
+
"get:hardis:config",
|
|
218
|
+
"get:config:hardis"
|
|
228
219
|
]
|
|
229
220
|
},
|
|
230
|
-
"hardis:
|
|
221
|
+
"hardis:auth:login": {
|
|
231
222
|
"aliases": [],
|
|
232
223
|
"args": {},
|
|
233
|
-
"description": "\n## Command Behavior\n\n**
|
|
224
|
+
"description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n</details>\n",
|
|
234
225
|
"examples": [
|
|
235
|
-
"$ sf hardis:
|
|
226
|
+
"$ sf hardis:auth:login",
|
|
227
|
+
"CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
|
|
236
228
|
],
|
|
237
229
|
"flags": {
|
|
238
230
|
"json": {
|
|
@@ -250,20 +242,28 @@
|
|
|
250
242
|
"multiple": false,
|
|
251
243
|
"type": "option"
|
|
252
244
|
},
|
|
253
|
-
"
|
|
254
|
-
"char": "
|
|
255
|
-
"description": "
|
|
256
|
-
"name": "
|
|
257
|
-
"default": "project",
|
|
245
|
+
"instanceurl": {
|
|
246
|
+
"char": "r",
|
|
247
|
+
"description": "URL of org instance",
|
|
248
|
+
"name": "instanceurl",
|
|
258
249
|
"hasDynamicHelp": false,
|
|
259
250
|
"multiple": false,
|
|
260
|
-
"options": [
|
|
261
|
-
"project",
|
|
262
|
-
"branch",
|
|
263
|
-
"user"
|
|
264
|
-
],
|
|
265
251
|
"type": "option"
|
|
266
252
|
},
|
|
253
|
+
"devhub": {
|
|
254
|
+
"char": "h",
|
|
255
|
+
"description": "Also connect associated DevHub",
|
|
256
|
+
"name": "devhub",
|
|
257
|
+
"allowNo": false,
|
|
258
|
+
"type": "boolean"
|
|
259
|
+
},
|
|
260
|
+
"scratchorg": {
|
|
261
|
+
"char": "s",
|
|
262
|
+
"description": "Scratch org",
|
|
263
|
+
"name": "scratchorg",
|
|
264
|
+
"allowNo": false,
|
|
265
|
+
"type": "boolean"
|
|
266
|
+
},
|
|
267
267
|
"debug": {
|
|
268
268
|
"char": "d",
|
|
269
269
|
"description": "Activate debug mode (more logs)",
|
|
@@ -287,30 +287,30 @@
|
|
|
287
287
|
},
|
|
288
288
|
"hasDynamicHelp": false,
|
|
289
289
|
"hiddenAliases": [],
|
|
290
|
-
"id": "hardis:
|
|
290
|
+
"id": "hardis:auth:login",
|
|
291
291
|
"pluginAlias": "sfdx-hardis",
|
|
292
292
|
"pluginName": "sfdx-hardis",
|
|
293
293
|
"pluginType": "core",
|
|
294
294
|
"strict": true,
|
|
295
295
|
"enableJsonFlag": true,
|
|
296
|
-
"title": "
|
|
296
|
+
"title": "Login",
|
|
297
297
|
"requiresProject": false,
|
|
298
298
|
"isESM": true,
|
|
299
299
|
"relativePath": [
|
|
300
300
|
"lib",
|
|
301
301
|
"commands",
|
|
302
302
|
"hardis",
|
|
303
|
-
"
|
|
304
|
-
"
|
|
303
|
+
"auth",
|
|
304
|
+
"login.js"
|
|
305
305
|
],
|
|
306
306
|
"aliasPermutations": [],
|
|
307
307
|
"permutations": [
|
|
308
|
-
"hardis:
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"hardis:
|
|
312
|
-
"
|
|
313
|
-
"
|
|
308
|
+
"hardis:auth:login",
|
|
309
|
+
"auth:hardis:login",
|
|
310
|
+
"auth:login:hardis",
|
|
311
|
+
"hardis:login:auth",
|
|
312
|
+
"login:hardis:auth",
|
|
313
|
+
"login:auth:hardis"
|
|
314
314
|
]
|
|
315
315
|
},
|
|
316
316
|
"hardis:doc:fieldusage": {
|
|
@@ -5539,15 +5539,12 @@
|
|
|
5539
5539
|
"import:data:org:hardis"
|
|
5540
5540
|
]
|
|
5541
5541
|
},
|
|
5542
|
-
"hardis:org:
|
|
5542
|
+
"hardis:org:files:export": {
|
|
5543
5543
|
"aliases": [],
|
|
5544
5544
|
"args": {},
|
|
5545
|
-
"description": "
|
|
5545
|
+
"description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
|
|
5546
5546
|
"examples": [
|
|
5547
|
-
"$ sf hardis:org:
|
|
5548
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5549
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5550
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5547
|
+
"$ sf hardis:org:files:export"
|
|
5551
5548
|
],
|
|
5552
5549
|
"flags": {
|
|
5553
5550
|
"json": {
|
|
@@ -5565,30 +5562,48 @@
|
|
|
5565
5562
|
"multiple": false,
|
|
5566
5563
|
"type": "option"
|
|
5567
5564
|
},
|
|
5568
|
-
"
|
|
5569
|
-
"char": "
|
|
5570
|
-
"description": "
|
|
5571
|
-
"name": "
|
|
5565
|
+
"path": {
|
|
5566
|
+
"char": "p",
|
|
5567
|
+
"description": "Path to the file export project",
|
|
5568
|
+
"name": "path",
|
|
5572
5569
|
"hasDynamicHelp": false,
|
|
5573
5570
|
"multiple": false,
|
|
5574
5571
|
"type": "option"
|
|
5575
5572
|
},
|
|
5576
|
-
"
|
|
5573
|
+
"chunksize": {
|
|
5574
|
+
"char": "c",
|
|
5575
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
5576
|
+
"name": "chunksize",
|
|
5577
|
+
"default": 1000,
|
|
5578
|
+
"hasDynamicHelp": false,
|
|
5579
|
+
"multiple": false,
|
|
5580
|
+
"type": "option"
|
|
5581
|
+
},
|
|
5582
|
+
"polltimeout": {
|
|
5577
5583
|
"char": "t",
|
|
5578
|
-
"description": "
|
|
5579
|
-
"name": "
|
|
5584
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
5585
|
+
"name": "polltimeout",
|
|
5586
|
+
"default": 300000,
|
|
5580
5587
|
"hasDynamicHelp": false,
|
|
5581
5588
|
"multiple": false,
|
|
5582
5589
|
"type": "option"
|
|
5583
5590
|
},
|
|
5584
|
-
"
|
|
5585
|
-
"char": "
|
|
5586
|
-
"description": "
|
|
5587
|
-
"name": "
|
|
5591
|
+
"startchunknumber": {
|
|
5592
|
+
"char": "s",
|
|
5593
|
+
"description": "Chunk number to start from",
|
|
5594
|
+
"name": "startchunknumber",
|
|
5595
|
+
"default": 0,
|
|
5588
5596
|
"hasDynamicHelp": false,
|
|
5589
5597
|
"multiple": false,
|
|
5590
5598
|
"type": "option"
|
|
5591
5599
|
},
|
|
5600
|
+
"resume": {
|
|
5601
|
+
"char": "r",
|
|
5602
|
+
"description": "Resume previous export by checking existing files (default in CI)",
|
|
5603
|
+
"name": "resume",
|
|
5604
|
+
"allowNo": false,
|
|
5605
|
+
"type": "boolean"
|
|
5606
|
+
},
|
|
5592
5607
|
"debug": {
|
|
5593
5608
|
"char": "d",
|
|
5594
5609
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5627,13 +5642,13 @@
|
|
|
5627
5642
|
},
|
|
5628
5643
|
"hasDynamicHelp": true,
|
|
5629
5644
|
"hiddenAliases": [],
|
|
5630
|
-
"id": "hardis:org:
|
|
5645
|
+
"id": "hardis:org:files:export",
|
|
5631
5646
|
"pluginAlias": "sfdx-hardis",
|
|
5632
5647
|
"pluginName": "sfdx-hardis",
|
|
5633
5648
|
"pluginType": "core",
|
|
5634
5649
|
"strict": true,
|
|
5635
5650
|
"enableJsonFlag": true,
|
|
5636
|
-
"title": "
|
|
5651
|
+
"title": "Export files",
|
|
5637
5652
|
"requiresProject": false,
|
|
5638
5653
|
"isESM": true,
|
|
5639
5654
|
"relativePath": [
|
|
@@ -5641,38 +5656,292 @@
|
|
|
5641
5656
|
"commands",
|
|
5642
5657
|
"hardis",
|
|
5643
5658
|
"org",
|
|
5644
|
-
"
|
|
5645
|
-
"
|
|
5659
|
+
"files",
|
|
5660
|
+
"export.js"
|
|
5646
5661
|
],
|
|
5647
5662
|
"aliasPermutations": [],
|
|
5648
5663
|
"permutations": [
|
|
5649
|
-
"hardis:org:
|
|
5650
|
-
"org:hardis:
|
|
5651
|
-
"org:
|
|
5652
|
-
"org:
|
|
5653
|
-
"hardis:
|
|
5654
|
-
"
|
|
5655
|
-
"
|
|
5656
|
-
"
|
|
5657
|
-
"hardis:
|
|
5658
|
-
"
|
|
5659
|
-
"
|
|
5660
|
-
"
|
|
5661
|
-
"hardis:org:
|
|
5662
|
-
"org:hardis:
|
|
5663
|
-
"org:
|
|
5664
|
-
"org:
|
|
5665
|
-
"hardis:
|
|
5666
|
-
"
|
|
5667
|
-
"
|
|
5668
|
-
"
|
|
5669
|
-
"hardis:
|
|
5670
|
-
"
|
|
5671
|
-
"
|
|
5672
|
-
"
|
|
5664
|
+
"hardis:org:files:export",
|
|
5665
|
+
"org:hardis:files:export",
|
|
5666
|
+
"org:files:hardis:export",
|
|
5667
|
+
"org:files:export:hardis",
|
|
5668
|
+
"hardis:files:org:export",
|
|
5669
|
+
"files:hardis:org:export",
|
|
5670
|
+
"files:org:hardis:export",
|
|
5671
|
+
"files:org:export:hardis",
|
|
5672
|
+
"hardis:files:export:org",
|
|
5673
|
+
"files:hardis:export:org",
|
|
5674
|
+
"files:export:hardis:org",
|
|
5675
|
+
"files:export:org:hardis",
|
|
5676
|
+
"hardis:org:export:files",
|
|
5677
|
+
"org:hardis:export:files",
|
|
5678
|
+
"org:export:hardis:files",
|
|
5679
|
+
"org:export:files:hardis",
|
|
5680
|
+
"hardis:export:org:files",
|
|
5681
|
+
"export:hardis:org:files",
|
|
5682
|
+
"export:org:hardis:files",
|
|
5683
|
+
"export:org:files:hardis",
|
|
5684
|
+
"hardis:export:files:org",
|
|
5685
|
+
"export:hardis:files:org",
|
|
5686
|
+
"export:files:hardis:org",
|
|
5687
|
+
"export:files:org:hardis"
|
|
5673
5688
|
]
|
|
5674
5689
|
},
|
|
5675
|
-
"hardis:org:
|
|
5690
|
+
"hardis:org:files:import": {
|
|
5691
|
+
"aliases": [],
|
|
5692
|
+
"args": {},
|
|
5693
|
+
"description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
|
|
5694
|
+
"examples": [
|
|
5695
|
+
"$ sf hardis:org:files:import"
|
|
5696
|
+
],
|
|
5697
|
+
"flags": {
|
|
5698
|
+
"json": {
|
|
5699
|
+
"description": "Format output as json.",
|
|
5700
|
+
"helpGroup": "GLOBAL",
|
|
5701
|
+
"name": "json",
|
|
5702
|
+
"allowNo": false,
|
|
5703
|
+
"type": "boolean"
|
|
5704
|
+
},
|
|
5705
|
+
"flags-dir": {
|
|
5706
|
+
"helpGroup": "GLOBAL",
|
|
5707
|
+
"name": "flags-dir",
|
|
5708
|
+
"summary": "Import flag values from a directory.",
|
|
5709
|
+
"hasDynamicHelp": false,
|
|
5710
|
+
"multiple": false,
|
|
5711
|
+
"type": "option"
|
|
5712
|
+
},
|
|
5713
|
+
"path": {
|
|
5714
|
+
"char": "p",
|
|
5715
|
+
"description": "Path to the file export project",
|
|
5716
|
+
"name": "path",
|
|
5717
|
+
"hasDynamicHelp": false,
|
|
5718
|
+
"multiple": false,
|
|
5719
|
+
"type": "option"
|
|
5720
|
+
},
|
|
5721
|
+
"overwrite": {
|
|
5722
|
+
"char": "f",
|
|
5723
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
5724
|
+
"name": "overwrite",
|
|
5725
|
+
"allowNo": false,
|
|
5726
|
+
"type": "boolean"
|
|
5727
|
+
},
|
|
5728
|
+
"debug": {
|
|
5729
|
+
"char": "d",
|
|
5730
|
+
"description": "Activate debug mode (more logs)",
|
|
5731
|
+
"name": "debug",
|
|
5732
|
+
"allowNo": false,
|
|
5733
|
+
"type": "boolean"
|
|
5734
|
+
},
|
|
5735
|
+
"websocket": {
|
|
5736
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5737
|
+
"name": "websocket",
|
|
5738
|
+
"hasDynamicHelp": false,
|
|
5739
|
+
"multiple": false,
|
|
5740
|
+
"type": "option"
|
|
5741
|
+
},
|
|
5742
|
+
"skipauth": {
|
|
5743
|
+
"description": "Skip authentication check when a default username is required",
|
|
5744
|
+
"name": "skipauth",
|
|
5745
|
+
"allowNo": false,
|
|
5746
|
+
"type": "boolean"
|
|
5747
|
+
},
|
|
5748
|
+
"target-org": {
|
|
5749
|
+
"aliases": [
|
|
5750
|
+
"targetusername",
|
|
5751
|
+
"u"
|
|
5752
|
+
],
|
|
5753
|
+
"char": "o",
|
|
5754
|
+
"deprecateAliases": true,
|
|
5755
|
+
"name": "target-org",
|
|
5756
|
+
"noCacheDefault": true,
|
|
5757
|
+
"required": true,
|
|
5758
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
5759
|
+
"hasDynamicHelp": true,
|
|
5760
|
+
"multiple": false,
|
|
5761
|
+
"type": "option"
|
|
5762
|
+
}
|
|
5763
|
+
},
|
|
5764
|
+
"hasDynamicHelp": true,
|
|
5765
|
+
"hiddenAliases": [],
|
|
5766
|
+
"id": "hardis:org:files:import",
|
|
5767
|
+
"pluginAlias": "sfdx-hardis",
|
|
5768
|
+
"pluginName": "sfdx-hardis",
|
|
5769
|
+
"pluginType": "core",
|
|
5770
|
+
"strict": true,
|
|
5771
|
+
"enableJsonFlag": true,
|
|
5772
|
+
"title": "Import files",
|
|
5773
|
+
"requiresProject": false,
|
|
5774
|
+
"isESM": true,
|
|
5775
|
+
"relativePath": [
|
|
5776
|
+
"lib",
|
|
5777
|
+
"commands",
|
|
5778
|
+
"hardis",
|
|
5779
|
+
"org",
|
|
5780
|
+
"files",
|
|
5781
|
+
"import.js"
|
|
5782
|
+
],
|
|
5783
|
+
"aliasPermutations": [],
|
|
5784
|
+
"permutations": [
|
|
5785
|
+
"hardis:org:files:import",
|
|
5786
|
+
"org:hardis:files:import",
|
|
5787
|
+
"org:files:hardis:import",
|
|
5788
|
+
"org:files:import:hardis",
|
|
5789
|
+
"hardis:files:org:import",
|
|
5790
|
+
"files:hardis:org:import",
|
|
5791
|
+
"files:org:hardis:import",
|
|
5792
|
+
"files:org:import:hardis",
|
|
5793
|
+
"hardis:files:import:org",
|
|
5794
|
+
"files:hardis:import:org",
|
|
5795
|
+
"files:import:hardis:org",
|
|
5796
|
+
"files:import:org:hardis",
|
|
5797
|
+
"hardis:org:import:files",
|
|
5798
|
+
"org:hardis:import:files",
|
|
5799
|
+
"org:import:hardis:files",
|
|
5800
|
+
"org:import:files:hardis",
|
|
5801
|
+
"hardis:import:org:files",
|
|
5802
|
+
"import:hardis:org:files",
|
|
5803
|
+
"import:org:hardis:files",
|
|
5804
|
+
"import:org:files:hardis",
|
|
5805
|
+
"hardis:import:files:org",
|
|
5806
|
+
"import:hardis:files:org",
|
|
5807
|
+
"import:files:hardis:org",
|
|
5808
|
+
"import:files:org:hardis"
|
|
5809
|
+
]
|
|
5810
|
+
},
|
|
5811
|
+
"hardis:org:diagnose:audittrail": {
|
|
5812
|
+
"aliases": [],
|
|
5813
|
+
"args": {},
|
|
5814
|
+
"description": "Export Audit trail into a CSV file with selected criteria, and highlight suspect actions\n\nAlso detects updates of Custom Settings values (disable by defining `SKIP_AUDIT_TRAIL_CUSTOM_SETTINGS=true`)\n\nRegular setup actions performed in major orgs are filtered.\n\n- \"\"\n - createScratchOrg\n - changedsenderemail\n - deleteScratchOrg\n - loginasgrantedtopartnerbt\n- Certificate and Key Management\n - insertCertificate\n- Custom App Licenses\n - addeduserpackagelicense\n - granteduserpackagelicense\n - revokeduserpackagelicense\n- Customer Portal\n - createdcustomersuccessuser\n - CSPUserDisabled\n- Currency\n - updateddatedexchrate\n- Data Management\n - queueMembership\n- Email Administration\n - dkimRotationPreparationSuccessful\n - dkimRotationSuccessful\n- External Objects\n - xdsEncryptedFieldChange\n- Groups\n - groupMembership\n- Holidays\n - holiday_insert\n- Inbox mobile and legacy desktop apps\n - enableSIQUserNonEAC\n - siqUserAcceptedTOS\n- Manage Users\n - activateduser\n - createduser\n - changedcommunitynickname\n - changedemail\n - changedfederationid\n - changedpassword\n - changedinteractionuseroffon\n - changedinteractionuseronoff\n - changedmarketinguseroffon\n - changedmarketinguseronoff\n - changedofflineuseroffon\n - changedprofileforuserstdtostd\n - changedprofileforuser\n - changedprofileforusercusttostd\n - changedprofileforuserstdtocust\n - changedroleforusertonone\n - changedroleforuser\n - changedroleforuserfromnone\n - changedUserAdminVerifiedStatusVerified\n - changedUserEmailVerifiedStatusUnverified\n - changedUserEmailVerifiedStatusVerified\n - changedknowledgeuseroffon\n - changedsfcontentuseroffon\n - changedsupportuseroffon\n - changedusername\n - changedUserPhoneNumber\n - changedUserPhoneVerifiedStatusUnverified\n - changedUserPhoneVerifiedStatusVerified\n - deactivateduser\n - deleteAuthenticatorPairing\n - deleteTwoFactorInfo2\n - deleteTwoFactorTempCode\n - frozeuser\n - insertAuthenticatorPairing\n - insertTwoFactorInfo2\n - insertTwoFactorTempCode\n - lightningloginenroll\n - PermSetAssign\n - PermSetGroupAssign\n - PermSetGroupUnassign\n - PermSetLicenseAssign\n - PermSetUnassign\n - PermSetLicenseUnassign\n - registeredUserPhoneNumber\n - resetpassword\n - suNetworkAdminLogin\n - suNetworkAdminLogout\n - suOrgAdminLogin\n - suOrgAdminLogout\n - unfrozeuser\n - useremailchangesent\n- Mobile Administration\n - assigneduserstomobileconfig\n- Reporting Snapshots\n - createdReportJob\n - deletedReportJob\n- Sandboxes\n - DeleteSandbox\n\nBy default, deployment user defined in .sfdx-hardis.yml targetUsername property will be excluded.\n\nYou can define additional users to exclude in .sfdx-hardis.yml **monitoringExcludeUsernames** property.\n\nYou can also add more sections / actions considered as not suspect using property **monitoringAllowedSectionsActions**\n\nExample:\n\n```yaml\nmonitoringExcludeUsernames:\n - deploymentuser@cloudity.com\n - marketingcloud@cloudity.com\n - integration-user@cloudity.com\n\nmonitoringAllowedSectionsActions:\n \"Some section\": [] // Will ignore all actions from such section\n \"Some other section\": [\"actionType1\",\"actionType2\",\"actionType3\"] // Will ignore only those 3 actions from section \"Some other section\". Other actions in the same section will be considered as suspect.\n```\n\n## Excel output example\n\n\n\n## Local output example\n\n\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-suspect-audit-trail/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
5815
|
+
"examples": [
|
|
5816
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5817
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5818
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5819
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5820
|
+
],
|
|
5821
|
+
"flags": {
|
|
5822
|
+
"json": {
|
|
5823
|
+
"description": "Format output as json.",
|
|
5824
|
+
"helpGroup": "GLOBAL",
|
|
5825
|
+
"name": "json",
|
|
5826
|
+
"allowNo": false,
|
|
5827
|
+
"type": "boolean"
|
|
5828
|
+
},
|
|
5829
|
+
"flags-dir": {
|
|
5830
|
+
"helpGroup": "GLOBAL",
|
|
5831
|
+
"name": "flags-dir",
|
|
5832
|
+
"summary": "Import flag values from a directory.",
|
|
5833
|
+
"hasDynamicHelp": false,
|
|
5834
|
+
"multiple": false,
|
|
5835
|
+
"type": "option"
|
|
5836
|
+
},
|
|
5837
|
+
"excludeusers": {
|
|
5838
|
+
"char": "e",
|
|
5839
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5840
|
+
"name": "excludeusers",
|
|
5841
|
+
"hasDynamicHelp": false,
|
|
5842
|
+
"multiple": false,
|
|
5843
|
+
"type": "option"
|
|
5844
|
+
},
|
|
5845
|
+
"lastndays": {
|
|
5846
|
+
"char": "t",
|
|
5847
|
+
"description": "Number of days to extract from today (included)",
|
|
5848
|
+
"name": "lastndays",
|
|
5849
|
+
"hasDynamicHelp": false,
|
|
5850
|
+
"multiple": false,
|
|
5851
|
+
"type": "option"
|
|
5852
|
+
},
|
|
5853
|
+
"outputfile": {
|
|
5854
|
+
"char": "f",
|
|
5855
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5856
|
+
"name": "outputfile",
|
|
5857
|
+
"hasDynamicHelp": false,
|
|
5858
|
+
"multiple": false,
|
|
5859
|
+
"type": "option"
|
|
5860
|
+
},
|
|
5861
|
+
"debug": {
|
|
5862
|
+
"char": "d",
|
|
5863
|
+
"description": "Activate debug mode (more logs)",
|
|
5864
|
+
"name": "debug",
|
|
5865
|
+
"allowNo": false,
|
|
5866
|
+
"type": "boolean"
|
|
5867
|
+
},
|
|
5868
|
+
"websocket": {
|
|
5869
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5870
|
+
"name": "websocket",
|
|
5871
|
+
"hasDynamicHelp": false,
|
|
5872
|
+
"multiple": false,
|
|
5873
|
+
"type": "option"
|
|
5874
|
+
},
|
|
5875
|
+
"skipauth": {
|
|
5876
|
+
"description": "Skip authentication check when a default username is required",
|
|
5877
|
+
"name": "skipauth",
|
|
5878
|
+
"allowNo": false,
|
|
5879
|
+
"type": "boolean"
|
|
5880
|
+
},
|
|
5881
|
+
"target-org": {
|
|
5882
|
+
"aliases": [
|
|
5883
|
+
"targetusername",
|
|
5884
|
+
"u"
|
|
5885
|
+
],
|
|
5886
|
+
"char": "o",
|
|
5887
|
+
"deprecateAliases": true,
|
|
5888
|
+
"name": "target-org",
|
|
5889
|
+
"noCacheDefault": true,
|
|
5890
|
+
"required": true,
|
|
5891
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
5892
|
+
"hasDynamicHelp": true,
|
|
5893
|
+
"multiple": false,
|
|
5894
|
+
"type": "option"
|
|
5895
|
+
}
|
|
5896
|
+
},
|
|
5897
|
+
"hasDynamicHelp": true,
|
|
5898
|
+
"hiddenAliases": [],
|
|
5899
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5900
|
+
"pluginAlias": "sfdx-hardis",
|
|
5901
|
+
"pluginName": "sfdx-hardis",
|
|
5902
|
+
"pluginType": "core",
|
|
5903
|
+
"strict": true,
|
|
5904
|
+
"enableJsonFlag": true,
|
|
5905
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5906
|
+
"requiresProject": false,
|
|
5907
|
+
"isESM": true,
|
|
5908
|
+
"relativePath": [
|
|
5909
|
+
"lib",
|
|
5910
|
+
"commands",
|
|
5911
|
+
"hardis",
|
|
5912
|
+
"org",
|
|
5913
|
+
"diagnose",
|
|
5914
|
+
"audittrail.js"
|
|
5915
|
+
],
|
|
5916
|
+
"aliasPermutations": [],
|
|
5917
|
+
"permutations": [
|
|
5918
|
+
"hardis:org:diagnose:audittrail",
|
|
5919
|
+
"org:hardis:diagnose:audittrail",
|
|
5920
|
+
"org:diagnose:hardis:audittrail",
|
|
5921
|
+
"org:diagnose:audittrail:hardis",
|
|
5922
|
+
"hardis:diagnose:org:audittrail",
|
|
5923
|
+
"diagnose:hardis:org:audittrail",
|
|
5924
|
+
"diagnose:org:hardis:audittrail",
|
|
5925
|
+
"diagnose:org:audittrail:hardis",
|
|
5926
|
+
"hardis:diagnose:audittrail:org",
|
|
5927
|
+
"diagnose:hardis:audittrail:org",
|
|
5928
|
+
"diagnose:audittrail:hardis:org",
|
|
5929
|
+
"diagnose:audittrail:org:hardis",
|
|
5930
|
+
"hardis:org:audittrail:diagnose",
|
|
5931
|
+
"org:hardis:audittrail:diagnose",
|
|
5932
|
+
"org:audittrail:hardis:diagnose",
|
|
5933
|
+
"org:audittrail:diagnose:hardis",
|
|
5934
|
+
"hardis:audittrail:org:diagnose",
|
|
5935
|
+
"audittrail:hardis:org:diagnose",
|
|
5936
|
+
"audittrail:org:hardis:diagnose",
|
|
5937
|
+
"audittrail:org:diagnose:hardis",
|
|
5938
|
+
"hardis:audittrail:diagnose:org",
|
|
5939
|
+
"audittrail:hardis:diagnose:org",
|
|
5940
|
+
"audittrail:diagnose:hardis:org",
|
|
5941
|
+
"audittrail:diagnose:org:hardis"
|
|
5942
|
+
]
|
|
5943
|
+
},
|
|
5944
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5676
5945
|
"aliases": [],
|
|
5677
5946
|
"args": {},
|
|
5678
5947
|
"description": "\n## Command Behavior\n\n**Retrieves and displays the scheduled upgrade date for a Salesforce org's instance.**\n\nThis command provides crucial information about when your Salesforce instance will be upgraded to the next major release (Spring, Summer, or Winter). This is vital for release planning, testing, and ensuring compatibility with upcoming Salesforce features.\n\nKey functionalities:\n\n- **Instance Identification:** Determines the Salesforce instance name of your target org.\n- **Upgrade Date Retrieval:** Fetches the planned start time of the next major core service upgrade for that instance from the Salesforce Status API.\n- **Days Until Upgrade:** Calculates and displays the number of days remaining until the next major upgrade.\n- **Severity-Based Logging:** Adjusts the log severity (info, warning) based on the proximity of the upgrade date, providing a visual cue for urgency.\n- **Notifications:** Sends notifications to configured channels (e.g., Slack, MS Teams, Grafana) with the upgrade information, making it suitable for automated monitoring.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Query:** It first queries the `Organization` object in Salesforce to get the `InstanceName` of the target org.\n- **Salesforce Status API Integration:** It makes an HTTP GET request to the Salesforce Status API (`https://api.status.salesforce.com/v1/instances/{instanceName}/status`) to retrieve detailed information about the instance, including scheduled maintenances.\n- **Data Parsing:** It parses the JSON response from the Status API to extract the relevant major release upgrade information.\n- **Date Calculation:** Uses the `moment` library to calculate the difference in days between the current date and the planned upgrade date.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including the instance name, upgrade date, and days remaining, along with relevant metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the upgrade status and proximity.\n</details>\n",
|
|
@@ -6906,304 +7175,35 @@
|
|
|
6906
7175
|
"commands",
|
|
6907
7176
|
"hardis",
|
|
6908
7177
|
"org",
|
|
6909
|
-
"diagnose",
|
|
6910
|
-
"unusedusers.js"
|
|
6911
|
-
],
|
|
6912
|
-
"aliasPermutations": [],
|
|
6913
|
-
"permutations": [
|
|
6914
|
-
"hardis:org:diagnose:unusedusers",
|
|
6915
|
-
"org:hardis:diagnose:unusedusers",
|
|
6916
|
-
"org:diagnose:hardis:unusedusers",
|
|
6917
|
-
"org:diagnose:unusedusers:hardis",
|
|
6918
|
-
"hardis:diagnose:org:unusedusers",
|
|
6919
|
-
"diagnose:hardis:org:unusedusers",
|
|
6920
|
-
"diagnose:org:hardis:unusedusers",
|
|
6921
|
-
"diagnose:org:unusedusers:hardis",
|
|
6922
|
-
"hardis:diagnose:unusedusers:org",
|
|
6923
|
-
"diagnose:hardis:unusedusers:org",
|
|
6924
|
-
"diagnose:unusedusers:hardis:org",
|
|
6925
|
-
"diagnose:unusedusers:org:hardis",
|
|
6926
|
-
"hardis:org:unusedusers:diagnose",
|
|
6927
|
-
"org:hardis:unusedusers:diagnose",
|
|
6928
|
-
"org:unusedusers:hardis:diagnose",
|
|
6929
|
-
"org:unusedusers:diagnose:hardis",
|
|
6930
|
-
"hardis:unusedusers:org:diagnose",
|
|
6931
|
-
"unusedusers:hardis:org:diagnose",
|
|
6932
|
-
"unusedusers:org:hardis:diagnose",
|
|
6933
|
-
"unusedusers:org:diagnose:hardis",
|
|
6934
|
-
"hardis:unusedusers:diagnose:org",
|
|
6935
|
-
"unusedusers:hardis:diagnose:org",
|
|
6936
|
-
"unusedusers:diagnose:hardis:org",
|
|
6937
|
-
"unusedusers:diagnose:org:hardis"
|
|
6938
|
-
]
|
|
6939
|
-
},
|
|
6940
|
-
"hardis:org:files:export": {
|
|
6941
|
-
"aliases": [],
|
|
6942
|
-
"args": {},
|
|
6943
|
-
"description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
|
|
6944
|
-
"examples": [
|
|
6945
|
-
"$ sf hardis:org:files:export"
|
|
6946
|
-
],
|
|
6947
|
-
"flags": {
|
|
6948
|
-
"json": {
|
|
6949
|
-
"description": "Format output as json.",
|
|
6950
|
-
"helpGroup": "GLOBAL",
|
|
6951
|
-
"name": "json",
|
|
6952
|
-
"allowNo": false,
|
|
6953
|
-
"type": "boolean"
|
|
6954
|
-
},
|
|
6955
|
-
"flags-dir": {
|
|
6956
|
-
"helpGroup": "GLOBAL",
|
|
6957
|
-
"name": "flags-dir",
|
|
6958
|
-
"summary": "Import flag values from a directory.",
|
|
6959
|
-
"hasDynamicHelp": false,
|
|
6960
|
-
"multiple": false,
|
|
6961
|
-
"type": "option"
|
|
6962
|
-
},
|
|
6963
|
-
"path": {
|
|
6964
|
-
"char": "p",
|
|
6965
|
-
"description": "Path to the file export project",
|
|
6966
|
-
"name": "path",
|
|
6967
|
-
"hasDynamicHelp": false,
|
|
6968
|
-
"multiple": false,
|
|
6969
|
-
"type": "option"
|
|
6970
|
-
},
|
|
6971
|
-
"chunksize": {
|
|
6972
|
-
"char": "c",
|
|
6973
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
6974
|
-
"name": "chunksize",
|
|
6975
|
-
"default": 1000,
|
|
6976
|
-
"hasDynamicHelp": false,
|
|
6977
|
-
"multiple": false,
|
|
6978
|
-
"type": "option"
|
|
6979
|
-
},
|
|
6980
|
-
"polltimeout": {
|
|
6981
|
-
"char": "t",
|
|
6982
|
-
"description": "Timeout in MS for Bulk API calls",
|
|
6983
|
-
"name": "polltimeout",
|
|
6984
|
-
"default": 300000,
|
|
6985
|
-
"hasDynamicHelp": false,
|
|
6986
|
-
"multiple": false,
|
|
6987
|
-
"type": "option"
|
|
6988
|
-
},
|
|
6989
|
-
"startchunknumber": {
|
|
6990
|
-
"char": "s",
|
|
6991
|
-
"description": "Chunk number to start from",
|
|
6992
|
-
"name": "startchunknumber",
|
|
6993
|
-
"default": 0,
|
|
6994
|
-
"hasDynamicHelp": false,
|
|
6995
|
-
"multiple": false,
|
|
6996
|
-
"type": "option"
|
|
6997
|
-
},
|
|
6998
|
-
"resume": {
|
|
6999
|
-
"char": "r",
|
|
7000
|
-
"description": "Resume previous export by checking existing files (default in CI)",
|
|
7001
|
-
"name": "resume",
|
|
7002
|
-
"allowNo": false,
|
|
7003
|
-
"type": "boolean"
|
|
7004
|
-
},
|
|
7005
|
-
"debug": {
|
|
7006
|
-
"char": "d",
|
|
7007
|
-
"description": "Activate debug mode (more logs)",
|
|
7008
|
-
"name": "debug",
|
|
7009
|
-
"allowNo": false,
|
|
7010
|
-
"type": "boolean"
|
|
7011
|
-
},
|
|
7012
|
-
"websocket": {
|
|
7013
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7014
|
-
"name": "websocket",
|
|
7015
|
-
"hasDynamicHelp": false,
|
|
7016
|
-
"multiple": false,
|
|
7017
|
-
"type": "option"
|
|
7018
|
-
},
|
|
7019
|
-
"skipauth": {
|
|
7020
|
-
"description": "Skip authentication check when a default username is required",
|
|
7021
|
-
"name": "skipauth",
|
|
7022
|
-
"allowNo": false,
|
|
7023
|
-
"type": "boolean"
|
|
7024
|
-
},
|
|
7025
|
-
"target-org": {
|
|
7026
|
-
"aliases": [
|
|
7027
|
-
"targetusername",
|
|
7028
|
-
"u"
|
|
7029
|
-
],
|
|
7030
|
-
"char": "o",
|
|
7031
|
-
"deprecateAliases": true,
|
|
7032
|
-
"name": "target-org",
|
|
7033
|
-
"noCacheDefault": true,
|
|
7034
|
-
"required": true,
|
|
7035
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
7036
|
-
"hasDynamicHelp": true,
|
|
7037
|
-
"multiple": false,
|
|
7038
|
-
"type": "option"
|
|
7039
|
-
}
|
|
7040
|
-
},
|
|
7041
|
-
"hasDynamicHelp": true,
|
|
7042
|
-
"hiddenAliases": [],
|
|
7043
|
-
"id": "hardis:org:files:export",
|
|
7044
|
-
"pluginAlias": "sfdx-hardis",
|
|
7045
|
-
"pluginName": "sfdx-hardis",
|
|
7046
|
-
"pluginType": "core",
|
|
7047
|
-
"strict": true,
|
|
7048
|
-
"enableJsonFlag": true,
|
|
7049
|
-
"title": "Export files",
|
|
7050
|
-
"requiresProject": false,
|
|
7051
|
-
"isESM": true,
|
|
7052
|
-
"relativePath": [
|
|
7053
|
-
"lib",
|
|
7054
|
-
"commands",
|
|
7055
|
-
"hardis",
|
|
7056
|
-
"org",
|
|
7057
|
-
"files",
|
|
7058
|
-
"export.js"
|
|
7059
|
-
],
|
|
7060
|
-
"aliasPermutations": [],
|
|
7061
|
-
"permutations": [
|
|
7062
|
-
"hardis:org:files:export",
|
|
7063
|
-
"org:hardis:files:export",
|
|
7064
|
-
"org:files:hardis:export",
|
|
7065
|
-
"org:files:export:hardis",
|
|
7066
|
-
"hardis:files:org:export",
|
|
7067
|
-
"files:hardis:org:export",
|
|
7068
|
-
"files:org:hardis:export",
|
|
7069
|
-
"files:org:export:hardis",
|
|
7070
|
-
"hardis:files:export:org",
|
|
7071
|
-
"files:hardis:export:org",
|
|
7072
|
-
"files:export:hardis:org",
|
|
7073
|
-
"files:export:org:hardis",
|
|
7074
|
-
"hardis:org:export:files",
|
|
7075
|
-
"org:hardis:export:files",
|
|
7076
|
-
"org:export:hardis:files",
|
|
7077
|
-
"org:export:files:hardis",
|
|
7078
|
-
"hardis:export:org:files",
|
|
7079
|
-
"export:hardis:org:files",
|
|
7080
|
-
"export:org:hardis:files",
|
|
7081
|
-
"export:org:files:hardis",
|
|
7082
|
-
"hardis:export:files:org",
|
|
7083
|
-
"export:hardis:files:org",
|
|
7084
|
-
"export:files:hardis:org",
|
|
7085
|
-
"export:files:org:hardis"
|
|
7086
|
-
]
|
|
7087
|
-
},
|
|
7088
|
-
"hardis:org:files:import": {
|
|
7089
|
-
"aliases": [],
|
|
7090
|
-
"args": {},
|
|
7091
|
-
"description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
|
|
7092
|
-
"examples": [
|
|
7093
|
-
"$ sf hardis:org:files:import"
|
|
7094
|
-
],
|
|
7095
|
-
"flags": {
|
|
7096
|
-
"json": {
|
|
7097
|
-
"description": "Format output as json.",
|
|
7098
|
-
"helpGroup": "GLOBAL",
|
|
7099
|
-
"name": "json",
|
|
7100
|
-
"allowNo": false,
|
|
7101
|
-
"type": "boolean"
|
|
7102
|
-
},
|
|
7103
|
-
"flags-dir": {
|
|
7104
|
-
"helpGroup": "GLOBAL",
|
|
7105
|
-
"name": "flags-dir",
|
|
7106
|
-
"summary": "Import flag values from a directory.",
|
|
7107
|
-
"hasDynamicHelp": false,
|
|
7108
|
-
"multiple": false,
|
|
7109
|
-
"type": "option"
|
|
7110
|
-
},
|
|
7111
|
-
"path": {
|
|
7112
|
-
"char": "p",
|
|
7113
|
-
"description": "Path to the file export project",
|
|
7114
|
-
"name": "path",
|
|
7115
|
-
"hasDynamicHelp": false,
|
|
7116
|
-
"multiple": false,
|
|
7117
|
-
"type": "option"
|
|
7118
|
-
},
|
|
7119
|
-
"overwrite": {
|
|
7120
|
-
"char": "f",
|
|
7121
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
7122
|
-
"name": "overwrite",
|
|
7123
|
-
"allowNo": false,
|
|
7124
|
-
"type": "boolean"
|
|
7125
|
-
},
|
|
7126
|
-
"debug": {
|
|
7127
|
-
"char": "d",
|
|
7128
|
-
"description": "Activate debug mode (more logs)",
|
|
7129
|
-
"name": "debug",
|
|
7130
|
-
"allowNo": false,
|
|
7131
|
-
"type": "boolean"
|
|
7132
|
-
},
|
|
7133
|
-
"websocket": {
|
|
7134
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7135
|
-
"name": "websocket",
|
|
7136
|
-
"hasDynamicHelp": false,
|
|
7137
|
-
"multiple": false,
|
|
7138
|
-
"type": "option"
|
|
7139
|
-
},
|
|
7140
|
-
"skipauth": {
|
|
7141
|
-
"description": "Skip authentication check when a default username is required",
|
|
7142
|
-
"name": "skipauth",
|
|
7143
|
-
"allowNo": false,
|
|
7144
|
-
"type": "boolean"
|
|
7145
|
-
},
|
|
7146
|
-
"target-org": {
|
|
7147
|
-
"aliases": [
|
|
7148
|
-
"targetusername",
|
|
7149
|
-
"u"
|
|
7150
|
-
],
|
|
7151
|
-
"char": "o",
|
|
7152
|
-
"deprecateAliases": true,
|
|
7153
|
-
"name": "target-org",
|
|
7154
|
-
"noCacheDefault": true,
|
|
7155
|
-
"required": true,
|
|
7156
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
7157
|
-
"hasDynamicHelp": true,
|
|
7158
|
-
"multiple": false,
|
|
7159
|
-
"type": "option"
|
|
7160
|
-
}
|
|
7161
|
-
},
|
|
7162
|
-
"hasDynamicHelp": true,
|
|
7163
|
-
"hiddenAliases": [],
|
|
7164
|
-
"id": "hardis:org:files:import",
|
|
7165
|
-
"pluginAlias": "sfdx-hardis",
|
|
7166
|
-
"pluginName": "sfdx-hardis",
|
|
7167
|
-
"pluginType": "core",
|
|
7168
|
-
"strict": true,
|
|
7169
|
-
"enableJsonFlag": true,
|
|
7170
|
-
"title": "Import files",
|
|
7171
|
-
"requiresProject": false,
|
|
7172
|
-
"isESM": true,
|
|
7173
|
-
"relativePath": [
|
|
7174
|
-
"lib",
|
|
7175
|
-
"commands",
|
|
7176
|
-
"hardis",
|
|
7177
|
-
"org",
|
|
7178
|
-
"files",
|
|
7179
|
-
"import.js"
|
|
7178
|
+
"diagnose",
|
|
7179
|
+
"unusedusers.js"
|
|
7180
7180
|
],
|
|
7181
7181
|
"aliasPermutations": [],
|
|
7182
7182
|
"permutations": [
|
|
7183
|
-
"hardis:org:
|
|
7184
|
-
"org:hardis:
|
|
7185
|
-
"org:
|
|
7186
|
-
"org:
|
|
7187
|
-
"hardis:
|
|
7188
|
-
"
|
|
7189
|
-
"
|
|
7190
|
-
"
|
|
7191
|
-
"hardis:
|
|
7192
|
-
"
|
|
7193
|
-
"
|
|
7194
|
-
"
|
|
7195
|
-
"hardis:org:
|
|
7196
|
-
"org:hardis:
|
|
7197
|
-
"org:
|
|
7198
|
-
"org:
|
|
7199
|
-
"hardis:
|
|
7200
|
-
"
|
|
7201
|
-
"
|
|
7202
|
-
"
|
|
7203
|
-
"hardis:
|
|
7204
|
-
"
|
|
7205
|
-
"
|
|
7206
|
-
"
|
|
7183
|
+
"hardis:org:diagnose:unusedusers",
|
|
7184
|
+
"org:hardis:diagnose:unusedusers",
|
|
7185
|
+
"org:diagnose:hardis:unusedusers",
|
|
7186
|
+
"org:diagnose:unusedusers:hardis",
|
|
7187
|
+
"hardis:diagnose:org:unusedusers",
|
|
7188
|
+
"diagnose:hardis:org:unusedusers",
|
|
7189
|
+
"diagnose:org:hardis:unusedusers",
|
|
7190
|
+
"diagnose:org:unusedusers:hardis",
|
|
7191
|
+
"hardis:diagnose:unusedusers:org",
|
|
7192
|
+
"diagnose:hardis:unusedusers:org",
|
|
7193
|
+
"diagnose:unusedusers:hardis:org",
|
|
7194
|
+
"diagnose:unusedusers:org:hardis",
|
|
7195
|
+
"hardis:org:unusedusers:diagnose",
|
|
7196
|
+
"org:hardis:unusedusers:diagnose",
|
|
7197
|
+
"org:unusedusers:hardis:diagnose",
|
|
7198
|
+
"org:unusedusers:diagnose:hardis",
|
|
7199
|
+
"hardis:unusedusers:org:diagnose",
|
|
7200
|
+
"unusedusers:hardis:org:diagnose",
|
|
7201
|
+
"unusedusers:org:hardis:diagnose",
|
|
7202
|
+
"unusedusers:org:diagnose:hardis",
|
|
7203
|
+
"hardis:unusedusers:diagnose:org",
|
|
7204
|
+
"unusedusers:hardis:diagnose:org",
|
|
7205
|
+
"unusedusers:diagnose:hardis:org",
|
|
7206
|
+
"unusedusers:diagnose:org:hardis"
|
|
7207
7207
|
]
|
|
7208
7208
|
},
|
|
7209
7209
|
"hardis:org:fix:listviewmine": {
|
|
@@ -9954,6 +9954,109 @@
|
|
|
9954
9954
|
"auth:configure:project:hardis"
|
|
9955
9955
|
]
|
|
9956
9956
|
},
|
|
9957
|
+
"hardis:project:convert:profilestopermsets": {
|
|
9958
|
+
"aliases": [],
|
|
9959
|
+
"args": {},
|
|
9960
|
+
"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",
|
|
9961
|
+
"examples": [
|
|
9962
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
9963
|
+
],
|
|
9964
|
+
"flags": {
|
|
9965
|
+
"json": {
|
|
9966
|
+
"description": "Format output as json.",
|
|
9967
|
+
"helpGroup": "GLOBAL",
|
|
9968
|
+
"name": "json",
|
|
9969
|
+
"allowNo": false,
|
|
9970
|
+
"type": "boolean"
|
|
9971
|
+
},
|
|
9972
|
+
"flags-dir": {
|
|
9973
|
+
"helpGroup": "GLOBAL",
|
|
9974
|
+
"name": "flags-dir",
|
|
9975
|
+
"summary": "Import flag values from a directory.",
|
|
9976
|
+
"hasDynamicHelp": false,
|
|
9977
|
+
"multiple": false,
|
|
9978
|
+
"type": "option"
|
|
9979
|
+
},
|
|
9980
|
+
"except": {
|
|
9981
|
+
"char": "e",
|
|
9982
|
+
"description": "List of filters",
|
|
9983
|
+
"name": "except",
|
|
9984
|
+
"default": [],
|
|
9985
|
+
"hasDynamicHelp": false,
|
|
9986
|
+
"multiple": true,
|
|
9987
|
+
"type": "option"
|
|
9988
|
+
},
|
|
9989
|
+
"debug": {
|
|
9990
|
+
"char": "d",
|
|
9991
|
+
"description": "Activate debug mode (more logs)",
|
|
9992
|
+
"name": "debug",
|
|
9993
|
+
"allowNo": false,
|
|
9994
|
+
"type": "boolean"
|
|
9995
|
+
},
|
|
9996
|
+
"websocket": {
|
|
9997
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9998
|
+
"name": "websocket",
|
|
9999
|
+
"hasDynamicHelp": false,
|
|
10000
|
+
"multiple": false,
|
|
10001
|
+
"type": "option"
|
|
10002
|
+
},
|
|
10003
|
+
"skipauth": {
|
|
10004
|
+
"description": "Skip authentication check when a default username is required",
|
|
10005
|
+
"name": "skipauth",
|
|
10006
|
+
"allowNo": false,
|
|
10007
|
+
"type": "boolean"
|
|
10008
|
+
}
|
|
10009
|
+
},
|
|
10010
|
+
"hasDynamicHelp": false,
|
|
10011
|
+
"hiddenAliases": [],
|
|
10012
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
10013
|
+
"pluginAlias": "sfdx-hardis",
|
|
10014
|
+
"pluginName": "sfdx-hardis",
|
|
10015
|
+
"pluginType": "core",
|
|
10016
|
+
"strict": true,
|
|
10017
|
+
"enableJsonFlag": true,
|
|
10018
|
+
"title": "Convert Profiles into Permission Sets",
|
|
10019
|
+
"requiresProject": true,
|
|
10020
|
+
"requiresSfdxPlugins": [
|
|
10021
|
+
"shane-sfdx-plugins"
|
|
10022
|
+
],
|
|
10023
|
+
"isESM": true,
|
|
10024
|
+
"relativePath": [
|
|
10025
|
+
"lib",
|
|
10026
|
+
"commands",
|
|
10027
|
+
"hardis",
|
|
10028
|
+
"project",
|
|
10029
|
+
"convert",
|
|
10030
|
+
"profilestopermsets.js"
|
|
10031
|
+
],
|
|
10032
|
+
"aliasPermutations": [],
|
|
10033
|
+
"permutations": [
|
|
10034
|
+
"hardis:project:convert:profilestopermsets",
|
|
10035
|
+
"project:hardis:convert:profilestopermsets",
|
|
10036
|
+
"project:convert:hardis:profilestopermsets",
|
|
10037
|
+
"project:convert:profilestopermsets:hardis",
|
|
10038
|
+
"hardis:convert:project:profilestopermsets",
|
|
10039
|
+
"convert:hardis:project:profilestopermsets",
|
|
10040
|
+
"convert:project:hardis:profilestopermsets",
|
|
10041
|
+
"convert:project:profilestopermsets:hardis",
|
|
10042
|
+
"hardis:convert:profilestopermsets:project",
|
|
10043
|
+
"convert:hardis:profilestopermsets:project",
|
|
10044
|
+
"convert:profilestopermsets:hardis:project",
|
|
10045
|
+
"convert:profilestopermsets:project:hardis",
|
|
10046
|
+
"hardis:project:profilestopermsets:convert",
|
|
10047
|
+
"project:hardis:profilestopermsets:convert",
|
|
10048
|
+
"project:profilestopermsets:hardis:convert",
|
|
10049
|
+
"project:profilestopermsets:convert:hardis",
|
|
10050
|
+
"hardis:profilestopermsets:project:convert",
|
|
10051
|
+
"profilestopermsets:hardis:project:convert",
|
|
10052
|
+
"profilestopermsets:project:hardis:convert",
|
|
10053
|
+
"profilestopermsets:project:convert:hardis",
|
|
10054
|
+
"hardis:profilestopermsets:convert:project",
|
|
10055
|
+
"profilestopermsets:hardis:convert:project",
|
|
10056
|
+
"profilestopermsets:convert:hardis:project",
|
|
10057
|
+
"profilestopermsets:convert:project:hardis"
|
|
10058
|
+
]
|
|
10059
|
+
},
|
|
9957
10060
|
"hardis:project:clean:emptyitems": {
|
|
9958
10061
|
"aliases": [],
|
|
9959
10062
|
"args": {},
|
|
@@ -11439,109 +11542,6 @@
|
|
|
11439
11542
|
"xml:clean:project:hardis"
|
|
11440
11543
|
]
|
|
11441
11544
|
},
|
|
11442
|
-
"hardis:project:convert:profilestopermsets": {
|
|
11443
|
-
"aliases": [],
|
|
11444
|
-
"args": {},
|
|
11445
|
-
"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",
|
|
11446
|
-
"examples": [
|
|
11447
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
11448
|
-
],
|
|
11449
|
-
"flags": {
|
|
11450
|
-
"json": {
|
|
11451
|
-
"description": "Format output as json.",
|
|
11452
|
-
"helpGroup": "GLOBAL",
|
|
11453
|
-
"name": "json",
|
|
11454
|
-
"allowNo": false,
|
|
11455
|
-
"type": "boolean"
|
|
11456
|
-
},
|
|
11457
|
-
"flags-dir": {
|
|
11458
|
-
"helpGroup": "GLOBAL",
|
|
11459
|
-
"name": "flags-dir",
|
|
11460
|
-
"summary": "Import flag values from a directory.",
|
|
11461
|
-
"hasDynamicHelp": false,
|
|
11462
|
-
"multiple": false,
|
|
11463
|
-
"type": "option"
|
|
11464
|
-
},
|
|
11465
|
-
"except": {
|
|
11466
|
-
"char": "e",
|
|
11467
|
-
"description": "List of filters",
|
|
11468
|
-
"name": "except",
|
|
11469
|
-
"default": [],
|
|
11470
|
-
"hasDynamicHelp": false,
|
|
11471
|
-
"multiple": true,
|
|
11472
|
-
"type": "option"
|
|
11473
|
-
},
|
|
11474
|
-
"debug": {
|
|
11475
|
-
"char": "d",
|
|
11476
|
-
"description": "Activate debug mode (more logs)",
|
|
11477
|
-
"name": "debug",
|
|
11478
|
-
"allowNo": false,
|
|
11479
|
-
"type": "boolean"
|
|
11480
|
-
},
|
|
11481
|
-
"websocket": {
|
|
11482
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11483
|
-
"name": "websocket",
|
|
11484
|
-
"hasDynamicHelp": false,
|
|
11485
|
-
"multiple": false,
|
|
11486
|
-
"type": "option"
|
|
11487
|
-
},
|
|
11488
|
-
"skipauth": {
|
|
11489
|
-
"description": "Skip authentication check when a default username is required",
|
|
11490
|
-
"name": "skipauth",
|
|
11491
|
-
"allowNo": false,
|
|
11492
|
-
"type": "boolean"
|
|
11493
|
-
}
|
|
11494
|
-
},
|
|
11495
|
-
"hasDynamicHelp": false,
|
|
11496
|
-
"hiddenAliases": [],
|
|
11497
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
11498
|
-
"pluginAlias": "sfdx-hardis",
|
|
11499
|
-
"pluginName": "sfdx-hardis",
|
|
11500
|
-
"pluginType": "core",
|
|
11501
|
-
"strict": true,
|
|
11502
|
-
"enableJsonFlag": true,
|
|
11503
|
-
"title": "Convert Profiles into Permission Sets",
|
|
11504
|
-
"requiresProject": true,
|
|
11505
|
-
"requiresSfdxPlugins": [
|
|
11506
|
-
"shane-sfdx-plugins"
|
|
11507
|
-
],
|
|
11508
|
-
"isESM": true,
|
|
11509
|
-
"relativePath": [
|
|
11510
|
-
"lib",
|
|
11511
|
-
"commands",
|
|
11512
|
-
"hardis",
|
|
11513
|
-
"project",
|
|
11514
|
-
"convert",
|
|
11515
|
-
"profilestopermsets.js"
|
|
11516
|
-
],
|
|
11517
|
-
"aliasPermutations": [],
|
|
11518
|
-
"permutations": [
|
|
11519
|
-
"hardis:project:convert:profilestopermsets",
|
|
11520
|
-
"project:hardis:convert:profilestopermsets",
|
|
11521
|
-
"project:convert:hardis:profilestopermsets",
|
|
11522
|
-
"project:convert:profilestopermsets:hardis",
|
|
11523
|
-
"hardis:convert:project:profilestopermsets",
|
|
11524
|
-
"convert:hardis:project:profilestopermsets",
|
|
11525
|
-
"convert:project:hardis:profilestopermsets",
|
|
11526
|
-
"convert:project:profilestopermsets:hardis",
|
|
11527
|
-
"hardis:convert:profilestopermsets:project",
|
|
11528
|
-
"convert:hardis:profilestopermsets:project",
|
|
11529
|
-
"convert:profilestopermsets:hardis:project",
|
|
11530
|
-
"convert:profilestopermsets:project:hardis",
|
|
11531
|
-
"hardis:project:profilestopermsets:convert",
|
|
11532
|
-
"project:hardis:profilestopermsets:convert",
|
|
11533
|
-
"project:profilestopermsets:hardis:convert",
|
|
11534
|
-
"project:profilestopermsets:convert:hardis",
|
|
11535
|
-
"hardis:profilestopermsets:project:convert",
|
|
11536
|
-
"profilestopermsets:hardis:project:convert",
|
|
11537
|
-
"profilestopermsets:project:hardis:convert",
|
|
11538
|
-
"profilestopermsets:project:convert:hardis",
|
|
11539
|
-
"hardis:profilestopermsets:convert:project",
|
|
11540
|
-
"profilestopermsets:hardis:convert:project",
|
|
11541
|
-
"profilestopermsets:convert:hardis:project",
|
|
11542
|
-
"profilestopermsets:convert:project:hardis"
|
|
11543
|
-
]
|
|
11544
|
-
},
|
|
11545
11545
|
"hardis:project:deploy:notify": {
|
|
11546
11546
|
"aliases": [],
|
|
11547
11547
|
"args": {},
|
|
@@ -15505,5 +15505,5 @@
|
|
|
15505
15505
|
]
|
|
15506
15506
|
}
|
|
15507
15507
|
},
|
|
15508
|
-
"version": "6.12.
|
|
15508
|
+
"version": "6.12.4"
|
|
15509
15509
|
}
|