sfdx-hardis 6.4.4 → 6.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -3
- package/lib/commands/hardis/org/files/export.js +56 -4
- package/lib/commands/hardis/org/files/export.js.map +1 -1
- package/lib/common/utils/filesUtils.d.ts +34 -14
- package/lib/common/utils/filesUtils.js +260 -70
- package/lib/common/utils/filesUtils.js.map +1 -1
- package/lib/common/utils/index.js +8 -2
- package/lib/common/utils/index.js.map +1 -1
- package/lib/common/utils/limitUtils.d.ts +42 -0
- package/lib/common/utils/limitUtils.js +163 -0
- package/lib/common/utils/limitUtils.js.map +1 -0
- package/oclif.manifest.json +501 -494
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -57,13 +57,12 @@
|
|
|
57
57
|
"world:hello"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
|
-
"hardis:
|
|
60
|
+
"hardis:cache:clear": {
|
|
61
61
|
"aliases": [],
|
|
62
62
|
"args": {},
|
|
63
|
-
"description": "\n## Command Behavior\n\n**
|
|
63
|
+
"description": "\n## Command Behavior\n\n**Clears the local cache generated by the sfdx-hardis plugin.**\n\nThis command is designed to remove temporary files, stored configurations, and other cached data that sfdx-hardis uses to optimize its operations. Clearing the cache can be beneficial for:\n\n- **Troubleshooting:** Resolving unexpected behavior or inconsistencies.\n- **Disk Space Management:** Freeing up storage on your local machine.\n- **Ensuring Fresh Data:** Guaranteeing that the plugin operates with the most current data and configurations.\n\n## Technical explanations\n\nThe command's technical implementation is straightforward:\n\n- **Direct Function Call:** It directly invokes the `clearCache()` function, which is imported from \buri../../../common/cache/index.js\buri.\n- **Cache Management Logic:** The \buriclearCache()` function encapsulates the logic for identifying and removing the specific files and directories that constitute the sfdx-hardis cache.\n",
|
|
64
64
|
"examples": [
|
|
65
|
-
"$ sf hardis:
|
|
66
|
-
"CI=true sf hardis:auth:login"
|
|
65
|
+
"$ sf hardis:cache:clear"
|
|
67
66
|
],
|
|
68
67
|
"flags": {
|
|
69
68
|
"json": {
|
|
@@ -81,28 +80,6 @@
|
|
|
81
80
|
"multiple": false,
|
|
82
81
|
"type": "option"
|
|
83
82
|
},
|
|
84
|
-
"instanceurl": {
|
|
85
|
-
"char": "r",
|
|
86
|
-
"description": "URL of org instance",
|
|
87
|
-
"name": "instanceurl",
|
|
88
|
-
"hasDynamicHelp": false,
|
|
89
|
-
"multiple": false,
|
|
90
|
-
"type": "option"
|
|
91
|
-
},
|
|
92
|
-
"devhub": {
|
|
93
|
-
"char": "h",
|
|
94
|
-
"description": "Also connect associated DevHub",
|
|
95
|
-
"name": "devhub",
|
|
96
|
-
"allowNo": false,
|
|
97
|
-
"type": "boolean"
|
|
98
|
-
},
|
|
99
|
-
"scratchorg": {
|
|
100
|
-
"char": "s",
|
|
101
|
-
"description": "Scratch org",
|
|
102
|
-
"name": "scratchorg",
|
|
103
|
-
"allowNo": false,
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
},
|
|
106
83
|
"debug": {
|
|
107
84
|
"char": "d",
|
|
108
85
|
"description": "Activate debug mode (more logs)",
|
|
@@ -126,38 +103,42 @@
|
|
|
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:auth:login": {
|
|
156
136
|
"aliases": [],
|
|
157
137
|
"args": {},
|
|
158
|
-
"description": "\n## Command Behavior\n\n**
|
|
138
|
+
"description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<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",
|
|
159
139
|
"examples": [
|
|
160
|
-
"$ sf hardis:
|
|
140
|
+
"$ sf hardis:auth:login",
|
|
141
|
+
"CI=true sf hardis:auth:login"
|
|
161
142
|
],
|
|
162
143
|
"flags": {
|
|
163
144
|
"json": {
|
|
@@ -175,6 +156,28 @@
|
|
|
175
156
|
"multiple": false,
|
|
176
157
|
"type": "option"
|
|
177
158
|
},
|
|
159
|
+
"instanceurl": {
|
|
160
|
+
"char": "r",
|
|
161
|
+
"description": "URL of org instance",
|
|
162
|
+
"name": "instanceurl",
|
|
163
|
+
"hasDynamicHelp": false,
|
|
164
|
+
"multiple": false,
|
|
165
|
+
"type": "option"
|
|
166
|
+
},
|
|
167
|
+
"devhub": {
|
|
168
|
+
"char": "h",
|
|
169
|
+
"description": "Also connect associated DevHub",
|
|
170
|
+
"name": "devhub",
|
|
171
|
+
"allowNo": false,
|
|
172
|
+
"type": "boolean"
|
|
173
|
+
},
|
|
174
|
+
"scratchorg": {
|
|
175
|
+
"char": "s",
|
|
176
|
+
"description": "Scratch org",
|
|
177
|
+
"name": "scratchorg",
|
|
178
|
+
"allowNo": false,
|
|
179
|
+
"type": "boolean"
|
|
180
|
+
},
|
|
178
181
|
"debug": {
|
|
179
182
|
"char": "d",
|
|
180
183
|
"description": "Activate debug mode (more logs)",
|
|
@@ -198,33 +201,30 @@
|
|
|
198
201
|
},
|
|
199
202
|
"hasDynamicHelp": false,
|
|
200
203
|
"hiddenAliases": [],
|
|
201
|
-
"id": "hardis:
|
|
204
|
+
"id": "hardis:auth:login",
|
|
202
205
|
"pluginAlias": "sfdx-hardis",
|
|
203
206
|
"pluginName": "sfdx-hardis",
|
|
204
207
|
"pluginType": "core",
|
|
205
208
|
"strict": true,
|
|
206
209
|
"enableJsonFlag": true,
|
|
207
|
-
"title": "
|
|
208
|
-
"uiConfig": {
|
|
209
|
-
"hide": true
|
|
210
|
-
},
|
|
210
|
+
"title": "Login",
|
|
211
211
|
"requiresProject": false,
|
|
212
212
|
"isESM": true,
|
|
213
213
|
"relativePath": [
|
|
214
214
|
"lib",
|
|
215
215
|
"commands",
|
|
216
216
|
"hardis",
|
|
217
|
-
"
|
|
218
|
-
"
|
|
217
|
+
"auth",
|
|
218
|
+
"login.js"
|
|
219
219
|
],
|
|
220
220
|
"aliasPermutations": [],
|
|
221
221
|
"permutations": [
|
|
222
|
-
"hardis:
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"hardis:
|
|
226
|
-
"
|
|
227
|
-
"
|
|
222
|
+
"hardis:auth:login",
|
|
223
|
+
"auth:hardis:login",
|
|
224
|
+
"auth:login:hardis",
|
|
225
|
+
"hardis:login:auth",
|
|
226
|
+
"login:hardis:auth",
|
|
227
|
+
"login:auth:hardis"
|
|
228
228
|
]
|
|
229
229
|
},
|
|
230
230
|
"hardis:config:get": {
|
|
@@ -5538,12 +5538,15 @@
|
|
|
5538
5538
|
"import:data:org:hardis"
|
|
5539
5539
|
]
|
|
5540
5540
|
},
|
|
5541
|
-
"hardis:org:
|
|
5541
|
+
"hardis:org:diagnose:audittrail": {
|
|
5542
5542
|
"aliases": [],
|
|
5543
5543
|
"args": {},
|
|
5544
|
-
"description": "
|
|
5544
|
+
"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",
|
|
5545
5545
|
"examples": [
|
|
5546
|
-
"$ sf hardis:org:
|
|
5546
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5547
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5548
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5549
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5547
5550
|
],
|
|
5548
5551
|
"flags": {
|
|
5549
5552
|
"json": {
|
|
@@ -5561,37 +5564,26 @@
|
|
|
5561
5564
|
"multiple": false,
|
|
5562
5565
|
"type": "option"
|
|
5563
5566
|
},
|
|
5564
|
-
"
|
|
5565
|
-
"char": "
|
|
5566
|
-
"description": "
|
|
5567
|
-
"name": "
|
|
5568
|
-
"hasDynamicHelp": false,
|
|
5569
|
-
"multiple": false,
|
|
5570
|
-
"type": "option"
|
|
5571
|
-
},
|
|
5572
|
-
"chunksize": {
|
|
5573
|
-
"char": "c",
|
|
5574
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
5575
|
-
"name": "chunksize",
|
|
5576
|
-
"default": 1000,
|
|
5567
|
+
"excludeusers": {
|
|
5568
|
+
"char": "e",
|
|
5569
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5570
|
+
"name": "excludeusers",
|
|
5577
5571
|
"hasDynamicHelp": false,
|
|
5578
5572
|
"multiple": false,
|
|
5579
5573
|
"type": "option"
|
|
5580
5574
|
},
|
|
5581
|
-
"
|
|
5575
|
+
"lastndays": {
|
|
5582
5576
|
"char": "t",
|
|
5583
|
-
"description": "
|
|
5584
|
-
"name": "
|
|
5585
|
-
"default": 300000,
|
|
5577
|
+
"description": "Number of days to extract from today (included)",
|
|
5578
|
+
"name": "lastndays",
|
|
5586
5579
|
"hasDynamicHelp": false,
|
|
5587
5580
|
"multiple": false,
|
|
5588
5581
|
"type": "option"
|
|
5589
5582
|
},
|
|
5590
|
-
"
|
|
5591
|
-
"char": "
|
|
5592
|
-
"description": "
|
|
5593
|
-
"name": "
|
|
5594
|
-
"default": 0,
|
|
5583
|
+
"outputfile": {
|
|
5584
|
+
"char": "f",
|
|
5585
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5586
|
+
"name": "outputfile",
|
|
5595
5587
|
"hasDynamicHelp": false,
|
|
5596
5588
|
"multiple": false,
|
|
5597
5589
|
"type": "option"
|
|
@@ -5634,13 +5626,13 @@
|
|
|
5634
5626
|
},
|
|
5635
5627
|
"hasDynamicHelp": true,
|
|
5636
5628
|
"hiddenAliases": [],
|
|
5637
|
-
"id": "hardis:org:
|
|
5629
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5638
5630
|
"pluginAlias": "sfdx-hardis",
|
|
5639
5631
|
"pluginName": "sfdx-hardis",
|
|
5640
5632
|
"pluginType": "core",
|
|
5641
5633
|
"strict": true,
|
|
5642
5634
|
"enableJsonFlag": true,
|
|
5643
|
-
"title": "
|
|
5635
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5644
5636
|
"requiresProject": false,
|
|
5645
5637
|
"isESM": true,
|
|
5646
5638
|
"relativePath": [
|
|
@@ -5648,43 +5640,43 @@
|
|
|
5648
5640
|
"commands",
|
|
5649
5641
|
"hardis",
|
|
5650
5642
|
"org",
|
|
5651
|
-
"
|
|
5652
|
-
"
|
|
5643
|
+
"diagnose",
|
|
5644
|
+
"audittrail.js"
|
|
5653
5645
|
],
|
|
5654
5646
|
"aliasPermutations": [],
|
|
5655
5647
|
"permutations": [
|
|
5656
|
-
"hardis:org:
|
|
5657
|
-
"org:hardis:
|
|
5658
|
-
"org:
|
|
5659
|
-
"org:
|
|
5660
|
-
"hardis:
|
|
5661
|
-
"
|
|
5662
|
-
"
|
|
5663
|
-
"
|
|
5664
|
-
"hardis:
|
|
5665
|
-
"
|
|
5666
|
-
"
|
|
5667
|
-
"
|
|
5668
|
-
"hardis:org:
|
|
5669
|
-
"org:hardis:
|
|
5670
|
-
"org:
|
|
5671
|
-
"org:
|
|
5672
|
-
"hardis:
|
|
5673
|
-
"
|
|
5674
|
-
"
|
|
5675
|
-
"
|
|
5676
|
-
"hardis:
|
|
5677
|
-
"
|
|
5678
|
-
"
|
|
5679
|
-
"
|
|
5648
|
+
"hardis:org:diagnose:audittrail",
|
|
5649
|
+
"org:hardis:diagnose:audittrail",
|
|
5650
|
+
"org:diagnose:hardis:audittrail",
|
|
5651
|
+
"org:diagnose:audittrail:hardis",
|
|
5652
|
+
"hardis:diagnose:org:audittrail",
|
|
5653
|
+
"diagnose:hardis:org:audittrail",
|
|
5654
|
+
"diagnose:org:hardis:audittrail",
|
|
5655
|
+
"diagnose:org:audittrail:hardis",
|
|
5656
|
+
"hardis:diagnose:audittrail:org",
|
|
5657
|
+
"diagnose:hardis:audittrail:org",
|
|
5658
|
+
"diagnose:audittrail:hardis:org",
|
|
5659
|
+
"diagnose:audittrail:org:hardis",
|
|
5660
|
+
"hardis:org:audittrail:diagnose",
|
|
5661
|
+
"org:hardis:audittrail:diagnose",
|
|
5662
|
+
"org:audittrail:hardis:diagnose",
|
|
5663
|
+
"org:audittrail:diagnose:hardis",
|
|
5664
|
+
"hardis:audittrail:org:diagnose",
|
|
5665
|
+
"audittrail:hardis:org:diagnose",
|
|
5666
|
+
"audittrail:org:hardis:diagnose",
|
|
5667
|
+
"audittrail:org:diagnose:hardis",
|
|
5668
|
+
"hardis:audittrail:diagnose:org",
|
|
5669
|
+
"audittrail:hardis:diagnose:org",
|
|
5670
|
+
"audittrail:diagnose:hardis:org",
|
|
5671
|
+
"audittrail:diagnose:org:hardis"
|
|
5680
5672
|
]
|
|
5681
5673
|
},
|
|
5682
|
-
"hardis:org:
|
|
5674
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5683
5675
|
"aliases": [],
|
|
5684
5676
|
"args": {},
|
|
5685
|
-
"description": "\
|
|
5677
|
+
"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",
|
|
5686
5678
|
"examples": [
|
|
5687
|
-
"$ sf hardis:org:
|
|
5679
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5688
5680
|
],
|
|
5689
5681
|
"flags": {
|
|
5690
5682
|
"json": {
|
|
@@ -5702,21 +5694,6 @@
|
|
|
5702
5694
|
"multiple": false,
|
|
5703
5695
|
"type": "option"
|
|
5704
5696
|
},
|
|
5705
|
-
"path": {
|
|
5706
|
-
"char": "p",
|
|
5707
|
-
"description": "Path to the file export project",
|
|
5708
|
-
"name": "path",
|
|
5709
|
-
"hasDynamicHelp": false,
|
|
5710
|
-
"multiple": false,
|
|
5711
|
-
"type": "option"
|
|
5712
|
-
},
|
|
5713
|
-
"overwrite": {
|
|
5714
|
-
"char": "f",
|
|
5715
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
5716
|
-
"name": "overwrite",
|
|
5717
|
-
"allowNo": false,
|
|
5718
|
-
"type": "boolean"
|
|
5719
|
-
},
|
|
5720
5697
|
"debug": {
|
|
5721
5698
|
"char": "d",
|
|
5722
5699
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5755,13 +5732,13 @@
|
|
|
5755
5732
|
},
|
|
5756
5733
|
"hasDynamicHelp": true,
|
|
5757
5734
|
"hiddenAliases": [],
|
|
5758
|
-
"id": "hardis:org:
|
|
5735
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
5759
5736
|
"pluginAlias": "sfdx-hardis",
|
|
5760
5737
|
"pluginName": "sfdx-hardis",
|
|
5761
5738
|
"pluginType": "core",
|
|
5762
5739
|
"strict": true,
|
|
5763
5740
|
"enableJsonFlag": true,
|
|
5764
|
-
"title": "
|
|
5741
|
+
"title": "Get Instance Upgrade date",
|
|
5765
5742
|
"requiresProject": false,
|
|
5766
5743
|
"isESM": true,
|
|
5767
5744
|
"relativePath": [
|
|
@@ -5769,247 +5746,8 @@
|
|
|
5769
5746
|
"commands",
|
|
5770
5747
|
"hardis",
|
|
5771
5748
|
"org",
|
|
5772
|
-
"
|
|
5773
|
-
"
|
|
5774
|
-
],
|
|
5775
|
-
"aliasPermutations": [],
|
|
5776
|
-
"permutations": [
|
|
5777
|
-
"hardis:org:files:import",
|
|
5778
|
-
"org:hardis:files:import",
|
|
5779
|
-
"org:files:hardis:import",
|
|
5780
|
-
"org:files:import:hardis",
|
|
5781
|
-
"hardis:files:org:import",
|
|
5782
|
-
"files:hardis:org:import",
|
|
5783
|
-
"files:org:hardis:import",
|
|
5784
|
-
"files:org:import:hardis",
|
|
5785
|
-
"hardis:files:import:org",
|
|
5786
|
-
"files:hardis:import:org",
|
|
5787
|
-
"files:import:hardis:org",
|
|
5788
|
-
"files:import:org:hardis",
|
|
5789
|
-
"hardis:org:import:files",
|
|
5790
|
-
"org:hardis:import:files",
|
|
5791
|
-
"org:import:hardis:files",
|
|
5792
|
-
"org:import:files:hardis",
|
|
5793
|
-
"hardis:import:org:files",
|
|
5794
|
-
"import:hardis:org:files",
|
|
5795
|
-
"import:org:hardis:files",
|
|
5796
|
-
"import:org:files:hardis",
|
|
5797
|
-
"hardis:import:files:org",
|
|
5798
|
-
"import:hardis:files:org",
|
|
5799
|
-
"import:files:hardis:org",
|
|
5800
|
-
"import:files:org:hardis"
|
|
5801
|
-
]
|
|
5802
|
-
},
|
|
5803
|
-
"hardis:org:diagnose:audittrail": {
|
|
5804
|
-
"aliases": [],
|
|
5805
|
-
"args": {},
|
|
5806
|
-
"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",
|
|
5807
|
-
"examples": [
|
|
5808
|
-
"$ sf hardis:org:diagnose:audittrail",
|
|
5809
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5810
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5811
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5812
|
-
],
|
|
5813
|
-
"flags": {
|
|
5814
|
-
"json": {
|
|
5815
|
-
"description": "Format output as json.",
|
|
5816
|
-
"helpGroup": "GLOBAL",
|
|
5817
|
-
"name": "json",
|
|
5818
|
-
"allowNo": false,
|
|
5819
|
-
"type": "boolean"
|
|
5820
|
-
},
|
|
5821
|
-
"flags-dir": {
|
|
5822
|
-
"helpGroup": "GLOBAL",
|
|
5823
|
-
"name": "flags-dir",
|
|
5824
|
-
"summary": "Import flag values from a directory.",
|
|
5825
|
-
"hasDynamicHelp": false,
|
|
5826
|
-
"multiple": false,
|
|
5827
|
-
"type": "option"
|
|
5828
|
-
},
|
|
5829
|
-
"excludeusers": {
|
|
5830
|
-
"char": "e",
|
|
5831
|
-
"description": "Comma-separated list of usernames to exclude",
|
|
5832
|
-
"name": "excludeusers",
|
|
5833
|
-
"hasDynamicHelp": false,
|
|
5834
|
-
"multiple": false,
|
|
5835
|
-
"type": "option"
|
|
5836
|
-
},
|
|
5837
|
-
"lastndays": {
|
|
5838
|
-
"char": "t",
|
|
5839
|
-
"description": "Number of days to extract from today (included)",
|
|
5840
|
-
"name": "lastndays",
|
|
5841
|
-
"hasDynamicHelp": false,
|
|
5842
|
-
"multiple": false,
|
|
5843
|
-
"type": "option"
|
|
5844
|
-
},
|
|
5845
|
-
"outputfile": {
|
|
5846
|
-
"char": "f",
|
|
5847
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5848
|
-
"name": "outputfile",
|
|
5849
|
-
"hasDynamicHelp": false,
|
|
5850
|
-
"multiple": false,
|
|
5851
|
-
"type": "option"
|
|
5852
|
-
},
|
|
5853
|
-
"debug": {
|
|
5854
|
-
"char": "d",
|
|
5855
|
-
"description": "Activate debug mode (more logs)",
|
|
5856
|
-
"name": "debug",
|
|
5857
|
-
"allowNo": false,
|
|
5858
|
-
"type": "boolean"
|
|
5859
|
-
},
|
|
5860
|
-
"websocket": {
|
|
5861
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5862
|
-
"name": "websocket",
|
|
5863
|
-
"hasDynamicHelp": false,
|
|
5864
|
-
"multiple": false,
|
|
5865
|
-
"type": "option"
|
|
5866
|
-
},
|
|
5867
|
-
"skipauth": {
|
|
5868
|
-
"description": "Skip authentication check when a default username is required",
|
|
5869
|
-
"name": "skipauth",
|
|
5870
|
-
"allowNo": false,
|
|
5871
|
-
"type": "boolean"
|
|
5872
|
-
},
|
|
5873
|
-
"target-org": {
|
|
5874
|
-
"aliases": [
|
|
5875
|
-
"targetusername",
|
|
5876
|
-
"u"
|
|
5877
|
-
],
|
|
5878
|
-
"char": "o",
|
|
5879
|
-
"deprecateAliases": true,
|
|
5880
|
-
"name": "target-org",
|
|
5881
|
-
"noCacheDefault": true,
|
|
5882
|
-
"required": true,
|
|
5883
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
5884
|
-
"hasDynamicHelp": true,
|
|
5885
|
-
"multiple": false,
|
|
5886
|
-
"type": "option"
|
|
5887
|
-
}
|
|
5888
|
-
},
|
|
5889
|
-
"hasDynamicHelp": true,
|
|
5890
|
-
"hiddenAliases": [],
|
|
5891
|
-
"id": "hardis:org:diagnose:audittrail",
|
|
5892
|
-
"pluginAlias": "sfdx-hardis",
|
|
5893
|
-
"pluginName": "sfdx-hardis",
|
|
5894
|
-
"pluginType": "core",
|
|
5895
|
-
"strict": true,
|
|
5896
|
-
"enableJsonFlag": true,
|
|
5897
|
-
"title": "Diagnose content of Setup Audit Trail",
|
|
5898
|
-
"requiresProject": false,
|
|
5899
|
-
"isESM": true,
|
|
5900
|
-
"relativePath": [
|
|
5901
|
-
"lib",
|
|
5902
|
-
"commands",
|
|
5903
|
-
"hardis",
|
|
5904
|
-
"org",
|
|
5905
|
-
"diagnose",
|
|
5906
|
-
"audittrail.js"
|
|
5907
|
-
],
|
|
5908
|
-
"aliasPermutations": [],
|
|
5909
|
-
"permutations": [
|
|
5910
|
-
"hardis:org:diagnose:audittrail",
|
|
5911
|
-
"org:hardis:diagnose:audittrail",
|
|
5912
|
-
"org:diagnose:hardis:audittrail",
|
|
5913
|
-
"org:diagnose:audittrail:hardis",
|
|
5914
|
-
"hardis:diagnose:org:audittrail",
|
|
5915
|
-
"diagnose:hardis:org:audittrail",
|
|
5916
|
-
"diagnose:org:hardis:audittrail",
|
|
5917
|
-
"diagnose:org:audittrail:hardis",
|
|
5918
|
-
"hardis:diagnose:audittrail:org",
|
|
5919
|
-
"diagnose:hardis:audittrail:org",
|
|
5920
|
-
"diagnose:audittrail:hardis:org",
|
|
5921
|
-
"diagnose:audittrail:org:hardis",
|
|
5922
|
-
"hardis:org:audittrail:diagnose",
|
|
5923
|
-
"org:hardis:audittrail:diagnose",
|
|
5924
|
-
"org:audittrail:hardis:diagnose",
|
|
5925
|
-
"org:audittrail:diagnose:hardis",
|
|
5926
|
-
"hardis:audittrail:org:diagnose",
|
|
5927
|
-
"audittrail:hardis:org:diagnose",
|
|
5928
|
-
"audittrail:org:hardis:diagnose",
|
|
5929
|
-
"audittrail:org:diagnose:hardis",
|
|
5930
|
-
"hardis:audittrail:diagnose:org",
|
|
5931
|
-
"audittrail:hardis:diagnose:org",
|
|
5932
|
-
"audittrail:diagnose:hardis:org",
|
|
5933
|
-
"audittrail:diagnose:org:hardis"
|
|
5934
|
-
]
|
|
5935
|
-
},
|
|
5936
|
-
"hardis:org:diagnose:instanceupgrade": {
|
|
5937
|
-
"aliases": [],
|
|
5938
|
-
"args": {},
|
|
5939
|
-
"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",
|
|
5940
|
-
"examples": [
|
|
5941
|
-
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5942
|
-
],
|
|
5943
|
-
"flags": {
|
|
5944
|
-
"json": {
|
|
5945
|
-
"description": "Format output as json.",
|
|
5946
|
-
"helpGroup": "GLOBAL",
|
|
5947
|
-
"name": "json",
|
|
5948
|
-
"allowNo": false,
|
|
5949
|
-
"type": "boolean"
|
|
5950
|
-
},
|
|
5951
|
-
"flags-dir": {
|
|
5952
|
-
"helpGroup": "GLOBAL",
|
|
5953
|
-
"name": "flags-dir",
|
|
5954
|
-
"summary": "Import flag values from a directory.",
|
|
5955
|
-
"hasDynamicHelp": false,
|
|
5956
|
-
"multiple": false,
|
|
5957
|
-
"type": "option"
|
|
5958
|
-
},
|
|
5959
|
-
"debug": {
|
|
5960
|
-
"char": "d",
|
|
5961
|
-
"description": "Activate debug mode (more logs)",
|
|
5962
|
-
"name": "debug",
|
|
5963
|
-
"allowNo": false,
|
|
5964
|
-
"type": "boolean"
|
|
5965
|
-
},
|
|
5966
|
-
"websocket": {
|
|
5967
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5968
|
-
"name": "websocket",
|
|
5969
|
-
"hasDynamicHelp": false,
|
|
5970
|
-
"multiple": false,
|
|
5971
|
-
"type": "option"
|
|
5972
|
-
},
|
|
5973
|
-
"skipauth": {
|
|
5974
|
-
"description": "Skip authentication check when a default username is required",
|
|
5975
|
-
"name": "skipauth",
|
|
5976
|
-
"allowNo": false,
|
|
5977
|
-
"type": "boolean"
|
|
5978
|
-
},
|
|
5979
|
-
"target-org": {
|
|
5980
|
-
"aliases": [
|
|
5981
|
-
"targetusername",
|
|
5982
|
-
"u"
|
|
5983
|
-
],
|
|
5984
|
-
"char": "o",
|
|
5985
|
-
"deprecateAliases": true,
|
|
5986
|
-
"name": "target-org",
|
|
5987
|
-
"noCacheDefault": true,
|
|
5988
|
-
"required": true,
|
|
5989
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
5990
|
-
"hasDynamicHelp": true,
|
|
5991
|
-
"multiple": false,
|
|
5992
|
-
"type": "option"
|
|
5993
|
-
}
|
|
5994
|
-
},
|
|
5995
|
-
"hasDynamicHelp": true,
|
|
5996
|
-
"hiddenAliases": [],
|
|
5997
|
-
"id": "hardis:org:diagnose:instanceupgrade",
|
|
5998
|
-
"pluginAlias": "sfdx-hardis",
|
|
5999
|
-
"pluginName": "sfdx-hardis",
|
|
6000
|
-
"pluginType": "core",
|
|
6001
|
-
"strict": true,
|
|
6002
|
-
"enableJsonFlag": true,
|
|
6003
|
-
"title": "Get Instance Upgrade date",
|
|
6004
|
-
"requiresProject": false,
|
|
6005
|
-
"isESM": true,
|
|
6006
|
-
"relativePath": [
|
|
6007
|
-
"lib",
|
|
6008
|
-
"commands",
|
|
6009
|
-
"hardis",
|
|
6010
|
-
"org",
|
|
6011
|
-
"diagnose",
|
|
6012
|
-
"instanceupgrade.js"
|
|
5749
|
+
"diagnose",
|
|
5750
|
+
"instanceupgrade.js"
|
|
6013
5751
|
],
|
|
6014
5752
|
"aliasPermutations": [],
|
|
6015
5753
|
"permutations": [
|
|
@@ -7152,30 +6890,299 @@
|
|
|
7152
6890
|
],
|
|
7153
6891
|
"aliasPermutations": [],
|
|
7154
6892
|
"permutations": [
|
|
7155
|
-
"hardis:org:fix:listviewmine",
|
|
7156
|
-
"org:hardis:fix:listviewmine",
|
|
7157
|
-
"org:fix:hardis:listviewmine",
|
|
7158
|
-
"org:fix:listviewmine:hardis",
|
|
7159
|
-
"hardis:fix:org:listviewmine",
|
|
7160
|
-
"fix:hardis:org:listviewmine",
|
|
7161
|
-
"fix:org:hardis:listviewmine",
|
|
7162
|
-
"fix:org:listviewmine:hardis",
|
|
7163
|
-
"hardis:fix:listviewmine:org",
|
|
7164
|
-
"fix:hardis:listviewmine:org",
|
|
7165
|
-
"fix:listviewmine:hardis:org",
|
|
7166
|
-
"fix:listviewmine:org:hardis",
|
|
7167
|
-
"hardis:org:listviewmine:fix",
|
|
7168
|
-
"org:hardis:listviewmine:fix",
|
|
7169
|
-
"org:listviewmine:hardis:fix",
|
|
7170
|
-
"org:listviewmine:fix:hardis",
|
|
7171
|
-
"hardis:listviewmine:org:fix",
|
|
7172
|
-
"listviewmine:hardis:org:fix",
|
|
7173
|
-
"listviewmine:org:hardis:fix",
|
|
7174
|
-
"listviewmine:org:fix:hardis",
|
|
7175
|
-
"hardis:listviewmine:fix:org",
|
|
7176
|
-
"listviewmine:hardis:fix:org",
|
|
7177
|
-
"listviewmine:fix:hardis:org",
|
|
7178
|
-
"listviewmine:fix:org:hardis"
|
|
6893
|
+
"hardis:org:fix:listviewmine",
|
|
6894
|
+
"org:hardis:fix:listviewmine",
|
|
6895
|
+
"org:fix:hardis:listviewmine",
|
|
6896
|
+
"org:fix:listviewmine:hardis",
|
|
6897
|
+
"hardis:fix:org:listviewmine",
|
|
6898
|
+
"fix:hardis:org:listviewmine",
|
|
6899
|
+
"fix:org:hardis:listviewmine",
|
|
6900
|
+
"fix:org:listviewmine:hardis",
|
|
6901
|
+
"hardis:fix:listviewmine:org",
|
|
6902
|
+
"fix:hardis:listviewmine:org",
|
|
6903
|
+
"fix:listviewmine:hardis:org",
|
|
6904
|
+
"fix:listviewmine:org:hardis",
|
|
6905
|
+
"hardis:org:listviewmine:fix",
|
|
6906
|
+
"org:hardis:listviewmine:fix",
|
|
6907
|
+
"org:listviewmine:hardis:fix",
|
|
6908
|
+
"org:listviewmine:fix:hardis",
|
|
6909
|
+
"hardis:listviewmine:org:fix",
|
|
6910
|
+
"listviewmine:hardis:org:fix",
|
|
6911
|
+
"listviewmine:org:hardis:fix",
|
|
6912
|
+
"listviewmine:org:fix:hardis",
|
|
6913
|
+
"hardis:listviewmine:fix:org",
|
|
6914
|
+
"listviewmine:hardis:fix:org",
|
|
6915
|
+
"listviewmine:fix:hardis:org",
|
|
6916
|
+
"listviewmine:fix:org:hardis"
|
|
6917
|
+
]
|
|
6918
|
+
},
|
|
6919
|
+
"hardis:org:files:export": {
|
|
6920
|
+
"aliases": [],
|
|
6921
|
+
"args": {},
|
|
6922
|
+
"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",
|
|
6923
|
+
"examples": [
|
|
6924
|
+
"$ sf hardis:org:files:export"
|
|
6925
|
+
],
|
|
6926
|
+
"flags": {
|
|
6927
|
+
"json": {
|
|
6928
|
+
"description": "Format output as json.",
|
|
6929
|
+
"helpGroup": "GLOBAL",
|
|
6930
|
+
"name": "json",
|
|
6931
|
+
"allowNo": false,
|
|
6932
|
+
"type": "boolean"
|
|
6933
|
+
},
|
|
6934
|
+
"flags-dir": {
|
|
6935
|
+
"helpGroup": "GLOBAL",
|
|
6936
|
+
"name": "flags-dir",
|
|
6937
|
+
"summary": "Import flag values from a directory.",
|
|
6938
|
+
"hasDynamicHelp": false,
|
|
6939
|
+
"multiple": false,
|
|
6940
|
+
"type": "option"
|
|
6941
|
+
},
|
|
6942
|
+
"path": {
|
|
6943
|
+
"char": "p",
|
|
6944
|
+
"description": "Path to the file export project",
|
|
6945
|
+
"name": "path",
|
|
6946
|
+
"hasDynamicHelp": false,
|
|
6947
|
+
"multiple": false,
|
|
6948
|
+
"type": "option"
|
|
6949
|
+
},
|
|
6950
|
+
"chunksize": {
|
|
6951
|
+
"char": "c",
|
|
6952
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
6953
|
+
"name": "chunksize",
|
|
6954
|
+
"default": 1000,
|
|
6955
|
+
"hasDynamicHelp": false,
|
|
6956
|
+
"multiple": false,
|
|
6957
|
+
"type": "option"
|
|
6958
|
+
},
|
|
6959
|
+
"polltimeout": {
|
|
6960
|
+
"char": "t",
|
|
6961
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
6962
|
+
"name": "polltimeout",
|
|
6963
|
+
"default": 300000,
|
|
6964
|
+
"hasDynamicHelp": false,
|
|
6965
|
+
"multiple": false,
|
|
6966
|
+
"type": "option"
|
|
6967
|
+
},
|
|
6968
|
+
"startchunknumber": {
|
|
6969
|
+
"char": "s",
|
|
6970
|
+
"description": "Chunk number to start from",
|
|
6971
|
+
"name": "startchunknumber",
|
|
6972
|
+
"default": 0,
|
|
6973
|
+
"hasDynamicHelp": false,
|
|
6974
|
+
"multiple": false,
|
|
6975
|
+
"type": "option"
|
|
6976
|
+
},
|
|
6977
|
+
"resume": {
|
|
6978
|
+
"char": "r",
|
|
6979
|
+
"description": "Resume previous export by checking existing files (default in CI)",
|
|
6980
|
+
"name": "resume",
|
|
6981
|
+
"allowNo": false,
|
|
6982
|
+
"type": "boolean"
|
|
6983
|
+
},
|
|
6984
|
+
"debug": {
|
|
6985
|
+
"char": "d",
|
|
6986
|
+
"description": "Activate debug mode (more logs)",
|
|
6987
|
+
"name": "debug",
|
|
6988
|
+
"allowNo": false,
|
|
6989
|
+
"type": "boolean"
|
|
6990
|
+
},
|
|
6991
|
+
"websocket": {
|
|
6992
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
6993
|
+
"name": "websocket",
|
|
6994
|
+
"hasDynamicHelp": false,
|
|
6995
|
+
"multiple": false,
|
|
6996
|
+
"type": "option"
|
|
6997
|
+
},
|
|
6998
|
+
"skipauth": {
|
|
6999
|
+
"description": "Skip authentication check when a default username is required",
|
|
7000
|
+
"name": "skipauth",
|
|
7001
|
+
"allowNo": false,
|
|
7002
|
+
"type": "boolean"
|
|
7003
|
+
},
|
|
7004
|
+
"target-org": {
|
|
7005
|
+
"aliases": [
|
|
7006
|
+
"targetusername",
|
|
7007
|
+
"u"
|
|
7008
|
+
],
|
|
7009
|
+
"char": "o",
|
|
7010
|
+
"deprecateAliases": true,
|
|
7011
|
+
"name": "target-org",
|
|
7012
|
+
"noCacheDefault": true,
|
|
7013
|
+
"required": true,
|
|
7014
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
7015
|
+
"hasDynamicHelp": true,
|
|
7016
|
+
"multiple": false,
|
|
7017
|
+
"type": "option"
|
|
7018
|
+
}
|
|
7019
|
+
},
|
|
7020
|
+
"hasDynamicHelp": true,
|
|
7021
|
+
"hiddenAliases": [],
|
|
7022
|
+
"id": "hardis:org:files:export",
|
|
7023
|
+
"pluginAlias": "sfdx-hardis",
|
|
7024
|
+
"pluginName": "sfdx-hardis",
|
|
7025
|
+
"pluginType": "core",
|
|
7026
|
+
"strict": true,
|
|
7027
|
+
"enableJsonFlag": true,
|
|
7028
|
+
"title": "Export files",
|
|
7029
|
+
"requiresProject": false,
|
|
7030
|
+
"isESM": true,
|
|
7031
|
+
"relativePath": [
|
|
7032
|
+
"lib",
|
|
7033
|
+
"commands",
|
|
7034
|
+
"hardis",
|
|
7035
|
+
"org",
|
|
7036
|
+
"files",
|
|
7037
|
+
"export.js"
|
|
7038
|
+
],
|
|
7039
|
+
"aliasPermutations": [],
|
|
7040
|
+
"permutations": [
|
|
7041
|
+
"hardis:org:files:export",
|
|
7042
|
+
"org:hardis:files:export",
|
|
7043
|
+
"org:files:hardis:export",
|
|
7044
|
+
"org:files:export:hardis",
|
|
7045
|
+
"hardis:files:org:export",
|
|
7046
|
+
"files:hardis:org:export",
|
|
7047
|
+
"files:org:hardis:export",
|
|
7048
|
+
"files:org:export:hardis",
|
|
7049
|
+
"hardis:files:export:org",
|
|
7050
|
+
"files:hardis:export:org",
|
|
7051
|
+
"files:export:hardis:org",
|
|
7052
|
+
"files:export:org:hardis",
|
|
7053
|
+
"hardis:org:export:files",
|
|
7054
|
+
"org:hardis:export:files",
|
|
7055
|
+
"org:export:hardis:files",
|
|
7056
|
+
"org:export:files:hardis",
|
|
7057
|
+
"hardis:export:org:files",
|
|
7058
|
+
"export:hardis:org:files",
|
|
7059
|
+
"export:org:hardis:files",
|
|
7060
|
+
"export:org:files:hardis",
|
|
7061
|
+
"hardis:export:files:org",
|
|
7062
|
+
"export:hardis:files:org",
|
|
7063
|
+
"export:files:hardis:org",
|
|
7064
|
+
"export:files:org:hardis"
|
|
7065
|
+
]
|
|
7066
|
+
},
|
|
7067
|
+
"hardis:org:files:import": {
|
|
7068
|
+
"aliases": [],
|
|
7069
|
+
"args": {},
|
|
7070
|
+
"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",
|
|
7071
|
+
"examples": [
|
|
7072
|
+
"$ sf hardis:org:files:import"
|
|
7073
|
+
],
|
|
7074
|
+
"flags": {
|
|
7075
|
+
"json": {
|
|
7076
|
+
"description": "Format output as json.",
|
|
7077
|
+
"helpGroup": "GLOBAL",
|
|
7078
|
+
"name": "json",
|
|
7079
|
+
"allowNo": false,
|
|
7080
|
+
"type": "boolean"
|
|
7081
|
+
},
|
|
7082
|
+
"flags-dir": {
|
|
7083
|
+
"helpGroup": "GLOBAL",
|
|
7084
|
+
"name": "flags-dir",
|
|
7085
|
+
"summary": "Import flag values from a directory.",
|
|
7086
|
+
"hasDynamicHelp": false,
|
|
7087
|
+
"multiple": false,
|
|
7088
|
+
"type": "option"
|
|
7089
|
+
},
|
|
7090
|
+
"path": {
|
|
7091
|
+
"char": "p",
|
|
7092
|
+
"description": "Path to the file export project",
|
|
7093
|
+
"name": "path",
|
|
7094
|
+
"hasDynamicHelp": false,
|
|
7095
|
+
"multiple": false,
|
|
7096
|
+
"type": "option"
|
|
7097
|
+
},
|
|
7098
|
+
"overwrite": {
|
|
7099
|
+
"char": "f",
|
|
7100
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
7101
|
+
"name": "overwrite",
|
|
7102
|
+
"allowNo": false,
|
|
7103
|
+
"type": "boolean"
|
|
7104
|
+
},
|
|
7105
|
+
"debug": {
|
|
7106
|
+
"char": "d",
|
|
7107
|
+
"description": "Activate debug mode (more logs)",
|
|
7108
|
+
"name": "debug",
|
|
7109
|
+
"allowNo": false,
|
|
7110
|
+
"type": "boolean"
|
|
7111
|
+
},
|
|
7112
|
+
"websocket": {
|
|
7113
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7114
|
+
"name": "websocket",
|
|
7115
|
+
"hasDynamicHelp": false,
|
|
7116
|
+
"multiple": false,
|
|
7117
|
+
"type": "option"
|
|
7118
|
+
},
|
|
7119
|
+
"skipauth": {
|
|
7120
|
+
"description": "Skip authentication check when a default username is required",
|
|
7121
|
+
"name": "skipauth",
|
|
7122
|
+
"allowNo": false,
|
|
7123
|
+
"type": "boolean"
|
|
7124
|
+
},
|
|
7125
|
+
"target-org": {
|
|
7126
|
+
"aliases": [
|
|
7127
|
+
"targetusername",
|
|
7128
|
+
"u"
|
|
7129
|
+
],
|
|
7130
|
+
"char": "o",
|
|
7131
|
+
"deprecateAliases": true,
|
|
7132
|
+
"name": "target-org",
|
|
7133
|
+
"noCacheDefault": true,
|
|
7134
|
+
"required": true,
|
|
7135
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
7136
|
+
"hasDynamicHelp": true,
|
|
7137
|
+
"multiple": false,
|
|
7138
|
+
"type": "option"
|
|
7139
|
+
}
|
|
7140
|
+
},
|
|
7141
|
+
"hasDynamicHelp": true,
|
|
7142
|
+
"hiddenAliases": [],
|
|
7143
|
+
"id": "hardis:org:files:import",
|
|
7144
|
+
"pluginAlias": "sfdx-hardis",
|
|
7145
|
+
"pluginName": "sfdx-hardis",
|
|
7146
|
+
"pluginType": "core",
|
|
7147
|
+
"strict": true,
|
|
7148
|
+
"enableJsonFlag": true,
|
|
7149
|
+
"title": "Import files",
|
|
7150
|
+
"requiresProject": false,
|
|
7151
|
+
"isESM": true,
|
|
7152
|
+
"relativePath": [
|
|
7153
|
+
"lib",
|
|
7154
|
+
"commands",
|
|
7155
|
+
"hardis",
|
|
7156
|
+
"org",
|
|
7157
|
+
"files",
|
|
7158
|
+
"import.js"
|
|
7159
|
+
],
|
|
7160
|
+
"aliasPermutations": [],
|
|
7161
|
+
"permutations": [
|
|
7162
|
+
"hardis:org:files:import",
|
|
7163
|
+
"org:hardis:files:import",
|
|
7164
|
+
"org:files:hardis:import",
|
|
7165
|
+
"org:files:import:hardis",
|
|
7166
|
+
"hardis:files:org:import",
|
|
7167
|
+
"files:hardis:org:import",
|
|
7168
|
+
"files:org:hardis:import",
|
|
7169
|
+
"files:org:import:hardis",
|
|
7170
|
+
"hardis:files:import:org",
|
|
7171
|
+
"files:hardis:import:org",
|
|
7172
|
+
"files:import:hardis:org",
|
|
7173
|
+
"files:import:org:hardis",
|
|
7174
|
+
"hardis:org:import:files",
|
|
7175
|
+
"org:hardis:import:files",
|
|
7176
|
+
"org:import:hardis:files",
|
|
7177
|
+
"org:import:files:hardis",
|
|
7178
|
+
"hardis:import:org:files",
|
|
7179
|
+
"import:hardis:org:files",
|
|
7180
|
+
"import:org:hardis:files",
|
|
7181
|
+
"import:org:files:hardis",
|
|
7182
|
+
"hardis:import:files:org",
|
|
7183
|
+
"import:hardis:files:org",
|
|
7184
|
+
"import:files:hardis:org",
|
|
7185
|
+
"import:files:org:hardis"
|
|
7179
7186
|
]
|
|
7180
7187
|
},
|
|
7181
7188
|
"hardis:org:generate:packagexmlfull": {
|
|
@@ -9811,109 +9818,6 @@
|
|
|
9811
9818
|
"auth:configure:project:hardis"
|
|
9812
9819
|
]
|
|
9813
9820
|
},
|
|
9814
|
-
"hardis:project:convert:profilestopermsets": {
|
|
9815
|
-
"aliases": [],
|
|
9816
|
-
"args": {},
|
|
9817
|
-
"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",
|
|
9818
|
-
"examples": [
|
|
9819
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
9820
|
-
],
|
|
9821
|
-
"flags": {
|
|
9822
|
-
"json": {
|
|
9823
|
-
"description": "Format output as json.",
|
|
9824
|
-
"helpGroup": "GLOBAL",
|
|
9825
|
-
"name": "json",
|
|
9826
|
-
"allowNo": false,
|
|
9827
|
-
"type": "boolean"
|
|
9828
|
-
},
|
|
9829
|
-
"flags-dir": {
|
|
9830
|
-
"helpGroup": "GLOBAL",
|
|
9831
|
-
"name": "flags-dir",
|
|
9832
|
-
"summary": "Import flag values from a directory.",
|
|
9833
|
-
"hasDynamicHelp": false,
|
|
9834
|
-
"multiple": false,
|
|
9835
|
-
"type": "option"
|
|
9836
|
-
},
|
|
9837
|
-
"except": {
|
|
9838
|
-
"char": "e",
|
|
9839
|
-
"description": "List of filters",
|
|
9840
|
-
"name": "except",
|
|
9841
|
-
"default": [],
|
|
9842
|
-
"hasDynamicHelp": false,
|
|
9843
|
-
"multiple": true,
|
|
9844
|
-
"type": "option"
|
|
9845
|
-
},
|
|
9846
|
-
"debug": {
|
|
9847
|
-
"char": "d",
|
|
9848
|
-
"description": "Activate debug mode (more logs)",
|
|
9849
|
-
"name": "debug",
|
|
9850
|
-
"allowNo": false,
|
|
9851
|
-
"type": "boolean"
|
|
9852
|
-
},
|
|
9853
|
-
"websocket": {
|
|
9854
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9855
|
-
"name": "websocket",
|
|
9856
|
-
"hasDynamicHelp": false,
|
|
9857
|
-
"multiple": false,
|
|
9858
|
-
"type": "option"
|
|
9859
|
-
},
|
|
9860
|
-
"skipauth": {
|
|
9861
|
-
"description": "Skip authentication check when a default username is required",
|
|
9862
|
-
"name": "skipauth",
|
|
9863
|
-
"allowNo": false,
|
|
9864
|
-
"type": "boolean"
|
|
9865
|
-
}
|
|
9866
|
-
},
|
|
9867
|
-
"hasDynamicHelp": false,
|
|
9868
|
-
"hiddenAliases": [],
|
|
9869
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
9870
|
-
"pluginAlias": "sfdx-hardis",
|
|
9871
|
-
"pluginName": "sfdx-hardis",
|
|
9872
|
-
"pluginType": "core",
|
|
9873
|
-
"strict": true,
|
|
9874
|
-
"enableJsonFlag": true,
|
|
9875
|
-
"title": "Convert Profiles into Permission Sets",
|
|
9876
|
-
"requiresProject": true,
|
|
9877
|
-
"requiresSfdxPlugins": [
|
|
9878
|
-
"shane-sfdx-plugins"
|
|
9879
|
-
],
|
|
9880
|
-
"isESM": true,
|
|
9881
|
-
"relativePath": [
|
|
9882
|
-
"lib",
|
|
9883
|
-
"commands",
|
|
9884
|
-
"hardis",
|
|
9885
|
-
"project",
|
|
9886
|
-
"convert",
|
|
9887
|
-
"profilestopermsets.js"
|
|
9888
|
-
],
|
|
9889
|
-
"aliasPermutations": [],
|
|
9890
|
-
"permutations": [
|
|
9891
|
-
"hardis:project:convert:profilestopermsets",
|
|
9892
|
-
"project:hardis:convert:profilestopermsets",
|
|
9893
|
-
"project:convert:hardis:profilestopermsets",
|
|
9894
|
-
"project:convert:profilestopermsets:hardis",
|
|
9895
|
-
"hardis:convert:project:profilestopermsets",
|
|
9896
|
-
"convert:hardis:project:profilestopermsets",
|
|
9897
|
-
"convert:project:hardis:profilestopermsets",
|
|
9898
|
-
"convert:project:profilestopermsets:hardis",
|
|
9899
|
-
"hardis:convert:profilestopermsets:project",
|
|
9900
|
-
"convert:hardis:profilestopermsets:project",
|
|
9901
|
-
"convert:profilestopermsets:hardis:project",
|
|
9902
|
-
"convert:profilestopermsets:project:hardis",
|
|
9903
|
-
"hardis:project:profilestopermsets:convert",
|
|
9904
|
-
"project:hardis:profilestopermsets:convert",
|
|
9905
|
-
"project:profilestopermsets:hardis:convert",
|
|
9906
|
-
"project:profilestopermsets:convert:hardis",
|
|
9907
|
-
"hardis:profilestopermsets:project:convert",
|
|
9908
|
-
"profilestopermsets:hardis:project:convert",
|
|
9909
|
-
"profilestopermsets:project:hardis:convert",
|
|
9910
|
-
"profilestopermsets:project:convert:hardis",
|
|
9911
|
-
"hardis:profilestopermsets:convert:project",
|
|
9912
|
-
"profilestopermsets:hardis:convert:project",
|
|
9913
|
-
"profilestopermsets:convert:hardis:project",
|
|
9914
|
-
"profilestopermsets:convert:project:hardis"
|
|
9915
|
-
]
|
|
9916
|
-
},
|
|
9917
9821
|
"hardis:project:clean:emptyitems": {
|
|
9918
9822
|
"aliases": [],
|
|
9919
9823
|
"args": {},
|
|
@@ -11399,6 +11303,109 @@
|
|
|
11399
11303
|
"xml:clean:project:hardis"
|
|
11400
11304
|
]
|
|
11401
11305
|
},
|
|
11306
|
+
"hardis:project:convert:profilestopermsets": {
|
|
11307
|
+
"aliases": [],
|
|
11308
|
+
"args": {},
|
|
11309
|
+
"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",
|
|
11310
|
+
"examples": [
|
|
11311
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
11312
|
+
],
|
|
11313
|
+
"flags": {
|
|
11314
|
+
"json": {
|
|
11315
|
+
"description": "Format output as json.",
|
|
11316
|
+
"helpGroup": "GLOBAL",
|
|
11317
|
+
"name": "json",
|
|
11318
|
+
"allowNo": false,
|
|
11319
|
+
"type": "boolean"
|
|
11320
|
+
},
|
|
11321
|
+
"flags-dir": {
|
|
11322
|
+
"helpGroup": "GLOBAL",
|
|
11323
|
+
"name": "flags-dir",
|
|
11324
|
+
"summary": "Import flag values from a directory.",
|
|
11325
|
+
"hasDynamicHelp": false,
|
|
11326
|
+
"multiple": false,
|
|
11327
|
+
"type": "option"
|
|
11328
|
+
},
|
|
11329
|
+
"except": {
|
|
11330
|
+
"char": "e",
|
|
11331
|
+
"description": "List of filters",
|
|
11332
|
+
"name": "except",
|
|
11333
|
+
"default": [],
|
|
11334
|
+
"hasDynamicHelp": false,
|
|
11335
|
+
"multiple": true,
|
|
11336
|
+
"type": "option"
|
|
11337
|
+
},
|
|
11338
|
+
"debug": {
|
|
11339
|
+
"char": "d",
|
|
11340
|
+
"description": "Activate debug mode (more logs)",
|
|
11341
|
+
"name": "debug",
|
|
11342
|
+
"allowNo": false,
|
|
11343
|
+
"type": "boolean"
|
|
11344
|
+
},
|
|
11345
|
+
"websocket": {
|
|
11346
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11347
|
+
"name": "websocket",
|
|
11348
|
+
"hasDynamicHelp": false,
|
|
11349
|
+
"multiple": false,
|
|
11350
|
+
"type": "option"
|
|
11351
|
+
},
|
|
11352
|
+
"skipauth": {
|
|
11353
|
+
"description": "Skip authentication check when a default username is required",
|
|
11354
|
+
"name": "skipauth",
|
|
11355
|
+
"allowNo": false,
|
|
11356
|
+
"type": "boolean"
|
|
11357
|
+
}
|
|
11358
|
+
},
|
|
11359
|
+
"hasDynamicHelp": false,
|
|
11360
|
+
"hiddenAliases": [],
|
|
11361
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
11362
|
+
"pluginAlias": "sfdx-hardis",
|
|
11363
|
+
"pluginName": "sfdx-hardis",
|
|
11364
|
+
"pluginType": "core",
|
|
11365
|
+
"strict": true,
|
|
11366
|
+
"enableJsonFlag": true,
|
|
11367
|
+
"title": "Convert Profiles into Permission Sets",
|
|
11368
|
+
"requiresProject": true,
|
|
11369
|
+
"requiresSfdxPlugins": [
|
|
11370
|
+
"shane-sfdx-plugins"
|
|
11371
|
+
],
|
|
11372
|
+
"isESM": true,
|
|
11373
|
+
"relativePath": [
|
|
11374
|
+
"lib",
|
|
11375
|
+
"commands",
|
|
11376
|
+
"hardis",
|
|
11377
|
+
"project",
|
|
11378
|
+
"convert",
|
|
11379
|
+
"profilestopermsets.js"
|
|
11380
|
+
],
|
|
11381
|
+
"aliasPermutations": [],
|
|
11382
|
+
"permutations": [
|
|
11383
|
+
"hardis:project:convert:profilestopermsets",
|
|
11384
|
+
"project:hardis:convert:profilestopermsets",
|
|
11385
|
+
"project:convert:hardis:profilestopermsets",
|
|
11386
|
+
"project:convert:profilestopermsets:hardis",
|
|
11387
|
+
"hardis:convert:project:profilestopermsets",
|
|
11388
|
+
"convert:hardis:project:profilestopermsets",
|
|
11389
|
+
"convert:project:hardis:profilestopermsets",
|
|
11390
|
+
"convert:project:profilestopermsets:hardis",
|
|
11391
|
+
"hardis:convert:profilestopermsets:project",
|
|
11392
|
+
"convert:hardis:profilestopermsets:project",
|
|
11393
|
+
"convert:profilestopermsets:hardis:project",
|
|
11394
|
+
"convert:profilestopermsets:project:hardis",
|
|
11395
|
+
"hardis:project:profilestopermsets:convert",
|
|
11396
|
+
"project:hardis:profilestopermsets:convert",
|
|
11397
|
+
"project:profilestopermsets:hardis:convert",
|
|
11398
|
+
"project:profilestopermsets:convert:hardis",
|
|
11399
|
+
"hardis:profilestopermsets:project:convert",
|
|
11400
|
+
"profilestopermsets:hardis:project:convert",
|
|
11401
|
+
"profilestopermsets:project:hardis:convert",
|
|
11402
|
+
"profilestopermsets:project:convert:hardis",
|
|
11403
|
+
"hardis:profilestopermsets:convert:project",
|
|
11404
|
+
"profilestopermsets:hardis:convert:project",
|
|
11405
|
+
"profilestopermsets:convert:hardis:project",
|
|
11406
|
+
"profilestopermsets:convert:project:hardis"
|
|
11407
|
+
]
|
|
11408
|
+
},
|
|
11402
11409
|
"hardis:project:deploy:notify": {
|
|
11403
11410
|
"aliases": [],
|
|
11404
11411
|
"args": {},
|
|
@@ -15271,5 +15278,5 @@
|
|
|
15271
15278
|
]
|
|
15272
15279
|
}
|
|
15273
15280
|
},
|
|
15274
|
-
"version": "6.
|
|
15281
|
+
"version": "6.5.0"
|
|
15275
15282
|
}
|