sfdx-hardis 6.10.0 → 6.10.1-alpha202511021135.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 +7 -0
- package/lib/commands/hardis/doc/mkdocs-to-cf.js +38 -39
- package/lib/commands/hardis/doc/mkdocs-to-cf.js.map +1 -1
- package/lib/commands/hardis/project/deploy/notify.js +19 -23
- package/lib/commands/hardis/project/deploy/notify.js.map +1 -1
- package/lib/commands/hardis/project/deploy/quick.js +3 -2
- package/lib/commands/hardis/project/deploy/quick.js.map +1 -1
- package/lib/commands/hardis/project/deploy/start.js +4 -5
- package/lib/commands/hardis/project/deploy/start.js.map +1 -1
- package/lib/commands/hardis/project/deploy/validate.js +4 -3
- package/lib/commands/hardis/project/deploy/validate.js.map +1 -1
- package/lib/commands/hardis/source/deploy.js +4 -3
- package/lib/commands/hardis/source/deploy.js.map +1 -1
- package/lib/common/actionsProvider/actionsProvider.d.ts +41 -0
- package/lib/common/actionsProvider/actionsProvider.js +110 -0
- package/lib/common/actionsProvider/actionsProvider.js.map +1 -0
- package/lib/common/actionsProvider/apexAction.d.ts +6 -0
- package/lib/common/actionsProvider/apexAction.js +35 -0
- package/lib/common/actionsProvider/apexAction.js.map +1 -0
- package/lib/common/actionsProvider/commandAction.d.ts +6 -0
- package/lib/common/actionsProvider/commandAction.js +29 -0
- package/lib/common/actionsProvider/commandAction.js.map +1 -0
- package/lib/common/actionsProvider/dataAction.d.ts +6 -0
- package/lib/common/actionsProvider/dataAction.js +50 -0
- package/lib/common/actionsProvider/dataAction.js.map +1 -0
- package/lib/common/actionsProvider/manualAction.d.ts +6 -0
- package/lib/common/actionsProvider/manualAction.js +26 -0
- package/lib/common/actionsProvider/manualAction.js.map +1 -0
- package/lib/common/actionsProvider/publishCommunityAction.d.ts +6 -0
- package/lib/common/actionsProvider/publishCommunityAction.js +30 -0
- package/lib/common/actionsProvider/publishCommunityAction.js.map +1 -0
- package/lib/common/gitProvider/azureDevops.d.ts +1 -0
- package/lib/common/gitProvider/azureDevops.js +71 -3
- package/lib/common/gitProvider/azureDevops.js.map +1 -1
- package/lib/common/gitProvider/bitbucket.d.ts +1 -0
- package/lib/common/gitProvider/bitbucket.js +81 -2
- package/lib/common/gitProvider/bitbucket.js.map +1 -1
- package/lib/common/gitProvider/gitProviderRoot.d.ts +1 -0
- package/lib/common/gitProvider/gitProviderRoot.js +6 -0
- package/lib/common/gitProvider/gitProviderRoot.js.map +1 -1
- package/lib/common/gitProvider/github.d.ts +1 -0
- package/lib/common/gitProvider/github.js +74 -1
- package/lib/common/gitProvider/github.js.map +1 -1
- package/lib/common/gitProvider/gitlab.d.ts +3 -0
- package/lib/common/gitProvider/gitlab.js +110 -2
- package/lib/common/gitProvider/gitlab.js.map +1 -1
- package/lib/common/gitProvider/index.d.ts +1 -1
- package/lib/common/gitProvider/index.js +12 -5
- package/lib/common/gitProvider/index.js.map +1 -1
- package/lib/common/utils/authUtils.d.ts +15 -2
- package/lib/common/utils/authUtils.js +51 -32
- package/lib/common/utils/authUtils.js.map +1 -1
- package/lib/common/utils/dataUtils.d.ts +2 -2
- package/lib/common/utils/dataUtils.js +10 -2
- package/lib/common/utils/dataUtils.js.map +1 -1
- package/lib/common/utils/deployTips.js +2 -1
- package/lib/common/utils/deployTips.js.map +1 -1
- package/lib/common/utils/deployUtils.d.ts +0 -7
- package/lib/common/utils/deployUtils.js +28 -75
- package/lib/common/utils/deployUtils.js.map +1 -1
- package/lib/common/utils/gitUtils.d.ts +2 -0
- package/lib/common/utils/gitUtils.js +7 -1
- package/lib/common/utils/gitUtils.js.map +1 -1
- package/lib/common/utils/orgUtils.d.ts +1 -0
- package/lib/common/utils/orgUtils.js +12 -0
- package/lib/common/utils/orgUtils.js.map +1 -1
- package/lib/common/utils/prePostCommandUtils.d.ts +7 -0
- package/lib/common/utils/prePostCommandUtils.js +310 -0
- package/lib/common/utils/prePostCommandUtils.js.map +1 -0
- package/oclif.lock +17 -17
- package/oclif.manifest.json +741 -741
- package/package.json +6 -6
package/oclif.manifest.json
CHANGED
|
@@ -132,13 +132,12 @@
|
|
|
132
132
|
"clear:cache:hardis"
|
|
133
133
|
]
|
|
134
134
|
},
|
|
135
|
-
"hardis:
|
|
135
|
+
"hardis:config:get": {
|
|
136
136
|
"aliases": [],
|
|
137
137
|
"args": {},
|
|
138
|
-
"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",
|
|
139
139
|
"examples": [
|
|
140
|
-
"$ sf hardis:
|
|
141
|
-
"CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
|
|
140
|
+
"$ sf hardis:project:deploy:sources:metadata"
|
|
142
141
|
],
|
|
143
142
|
"flags": {
|
|
144
143
|
"json": {
|
|
@@ -156,28 +155,20 @@
|
|
|
156
155
|
"multiple": false,
|
|
157
156
|
"type": "option"
|
|
158
157
|
},
|
|
159
|
-
"
|
|
160
|
-
"char": "
|
|
161
|
-
"description": "
|
|
162
|
-
"name": "
|
|
158
|
+
"level": {
|
|
159
|
+
"char": "l",
|
|
160
|
+
"description": "project,branch or user",
|
|
161
|
+
"name": "level",
|
|
162
|
+
"default": "project",
|
|
163
163
|
"hasDynamicHelp": false,
|
|
164
164
|
"multiple": false,
|
|
165
|
+
"options": [
|
|
166
|
+
"project",
|
|
167
|
+
"branch",
|
|
168
|
+
"user"
|
|
169
|
+
],
|
|
165
170
|
"type": "option"
|
|
166
171
|
},
|
|
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
|
-
},
|
|
181
172
|
"debug": {
|
|
182
173
|
"char": "d",
|
|
183
174
|
"description": "Activate debug mode (more logs)",
|
|
@@ -201,38 +192,39 @@
|
|
|
201
192
|
},
|
|
202
193
|
"hasDynamicHelp": false,
|
|
203
194
|
"hiddenAliases": [],
|
|
204
|
-
"id": "hardis:
|
|
195
|
+
"id": "hardis:config:get",
|
|
205
196
|
"pluginAlias": "sfdx-hardis",
|
|
206
197
|
"pluginName": "sfdx-hardis",
|
|
207
198
|
"pluginType": "core",
|
|
208
199
|
"strict": true,
|
|
209
200
|
"enableJsonFlag": true,
|
|
210
|
-
"title": "
|
|
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": {
|
|
@@ -509,7 +509,7 @@
|
|
|
509
509
|
"hardis:doc:mkdocs-to-cf": {
|
|
510
510
|
"aliases": [],
|
|
511
511
|
"args": {},
|
|
512
|
-
"description": "## Command Behavior**Generates MkDocs HTML pages and uploads them to Cloudflare as a static site, secured with Cloudflare Access
|
|
512
|
+
"description": "## Command Behavior\n\n**Generates MkDocs HTML pages and uploads them to Cloudflare as a static site, secured with Cloudflare Access.**\n\nThis command automates the deployment of your project's documentation (built with MkDocs) to Cloudflare Pages, making it accessible and secure. It handles the entire process from HTML generation to Cloudflare configuration.\n\nKey operations performed:\n\n- **MkDocs HTML Generation:** Builds the MkDocs project into static HTML pages. It can use a locally installed `mkdocs-material` or a `mkdocs` Docker image.\n- **Cloudflare Pages Project Creation/Update:** Creates a new Cloudflare Pages project if one doesn't exist for your documentation, or updates an existing one.\n- **Cloudflare Access Policy Assignment:** Assigns a policy to restrict access to the deployed application, ensuring only authorized users can view your documentation.\n- **Cloudflare Access Application Setup:** Configures a Cloudflare Access application for the deployed site, integrating it with your Zero Trust policies.\n- **HTML Page Upload:** Deploys the generated HTML pages to Cloudflare Pages.\n- **Browser Opening (Non-CI):** Opens the newly deployed website in your default browser if the command is not run in a CI/CD environment.\n\n**Prerequisite:** The documentation must have been previously generated using `sf hardis:doc:project2markdown --with-history`.\n\n**Customization:** You can override default styles by customizing your `mkdocs.yml` file.\n\nMore information can be found in the [Documentation section](https://sfdx-hardis.cloudity.com/salesforce-project-documentation/).\n\n**Environment Variables for Cloudflare Configuration:**\n\n| Variable | Description | Default || :---------------------------------------- | :----------------------------------------------------------------------- | :------------------------------------: || `CLOUDFLARE_EMAIL` | Cloudflare account email | _Required_ || `CLOUDFLARE_API_TOKEN` | Cloudflare API token | _Required_ || `CLOUDFLARE_ACCOUNT_ID` | Cloudflare account ID | _Required_ || `CLOUDFLARE_PROJECT_NAME` | Project name, also used for the site URL | Built from Git branch name || `CLOUDFLARE_DEFAULT_LOGIN_METHOD_TYPE` | Cloudflare default login method type | `onetimepin` || `CLOUDFLARE_DEFAULT_ACCESS_EMAIL_DOMAIN` | Cloudflare default access email domain | `@cloudity.com` || `CLOUDFLARE_EXTRA_ACCESS_POLICY_ID_LIST` | Comma-separated list of additional policy IDs to assign to the application | _Optional_ |\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command orchestrates interactions with MkDocs, Cloudflare APIs, and Git:\n\n- **MkDocs Integration:** It calls `generateMkDocsHTML()` to execute the MkDocs build process, which converts Markdown files into static HTML. It checks for the presence of `mkdocs.yml` to ensure it's a valid MkDocs project.\n- **Cloudflare API Interaction:** It uses the `cloudflare` npm package to interact with the Cloudflare API. This involves:\n - **Authentication:** Initializes the Cloudflare client using `CLOUDFLARE_EMAIL`, `CLOUDFLARE_API_TOKEN`, and `CLOUDFLARE_ACCOUNT_ID` environment variables.\n - **Pages Project Management:** Calls `client.pages.projects.get()` to check for an existing project and `client.pages.projects.create()` to create a new one if needed.\n - **Access Policy Management:** Lists existing access policies (`client.zeroTrust.access.policies.list()`) and creates a new one (`client.zeroTrust.access.policies.create()`) if the required policy doesn't exist. It configures the policy with email domain restrictions and a default login method.\n - **Access Application Management:** Lists existing access applications (`client.zeroTrust.access.applications.list()`) and creates a new one (`client.zeroTrust.access.applications.create()`) for the deployed site. It then updates the application to associate it with the created access policy.\n- **Git Integration:** Retrieves the current Git branch name using `getCurrentGitBranch()` to construct the Cloudflare project name and branch for deployment.\n- **Wrangler CLI:** Uses the `wrangler` CLI (Cloudflare's developer tool) to deploy the generated HTML pages to Cloudflare Pages via `wrangler pages deploy`.\n- **Environment Variable Management:** Reads various environment variables to configure Cloudflare settings and project names.\n- **Error Handling:** Includes checks for missing `mkdocs.yml` and Cloudflare environment variables, throwing `SfError` when necessary.\n</details>\n",
|
|
513
513
|
"examples": [
|
|
514
514
|
"$ sf hardis:doc:mkdocs-to-cf"
|
|
515
515
|
],
|
|
@@ -5808,15 +5808,13 @@
|
|
|
5808
5808
|
"import:files:org:hardis"
|
|
5809
5809
|
]
|
|
5810
5810
|
},
|
|
5811
|
-
"hardis:org:
|
|
5811
|
+
"hardis:org:fix:listviewmine": {
|
|
5812
5812
|
"aliases": [],
|
|
5813
5813
|
"args": {},
|
|
5814
|
-
"description": "
|
|
5814
|
+
"description": "Fix listviews whose scope Mine has been replaced by Everything\n\n[](https://nicolas.vuillamy.fr/invalid-scope-mine-not-allowed-deploy-your-listviews-anyway-443aceca8ac7)\n\nList of ListViews can be:\n\n- read from .sfdx-hardis.yml file in property **listViewsToSetToMine**\n- sent in argument listviews\n\nNote: property **listViewsToSetToMine** can be auto-generated by command hardis:work:save if .sfdx-hardis.yml contains the following configuration\n\n```yaml\nautoCleanTypes:\n - listViewsMine\n```\n\n- Example of sfdx-hardis.yml property `listViewsToSetToMine`:\n\n```yaml\nlistViewsToSetToMine:\n - \"force-app/main/default/objects/Operation__c/listViews/MyCurrentOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Operation__c/listViews/MyFinalizedOperations.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/Default_Opportunity_Pipeline.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MyCurrentSubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Opportunity/listViews/MySubscriptions.listView-meta.xml\"\n - \"force-app/main/default/objects/Account/listViews/MyActivePartners.listView-meta.xml\"\n```\n\n- If manually written, this could also be:\n\n```yaml\nlistViewsToSetToMine:\n - \"Operation__c:MyCurrentOperations\"\n - \"Operation__c:MyFinalizedOperations\"\n - \"Opportunity:Default_Opportunity_Pipeline\"\n - \"Opportunity:MyCurrentSubscriptions\"\n - \"Opportunity:MySubscriptions\"\n - \"Account:MyActivePartners\"\n```\n\nTroubleshooting: if you need to run this command from an alpine-linux based docker image, use this workaround in your dockerfile:\n\n```dockerfile\n# Do not use puppeteer embedded chromium\nRUN apk add --update --no-cache chromium\nENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=\"true\"\nENV CHROMIUM_PATH=\"/usr/bin/chromium-browser\"\nENV PUPPETEER_EXECUTABLE_PATH=\"$\\{CHROMIUM_PATH}\" // remove \\ before {\n```\n",
|
|
5815
5815
|
"examples": [
|
|
5816
|
-
"$ sf hardis:org:
|
|
5817
|
-
"$ sf hardis:org:
|
|
5818
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5819
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5816
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
5817
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
5820
5818
|
],
|
|
5821
5819
|
"flags": {
|
|
5822
5820
|
"json": {
|
|
@@ -5834,26 +5832,10 @@
|
|
|
5834
5832
|
"multiple": false,
|
|
5835
5833
|
"type": "option"
|
|
5836
5834
|
},
|
|
5837
|
-
"
|
|
5838
|
-
"char": "
|
|
5839
|
-
"description": "Comma-separated list of
|
|
5840
|
-
"name": "
|
|
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",
|
|
5835
|
+
"listviews": {
|
|
5836
|
+
"char": "l",
|
|
5837
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
5838
|
+
"name": "listviews",
|
|
5857
5839
|
"hasDynamicHelp": false,
|
|
5858
5840
|
"multiple": false,
|
|
5859
5841
|
"type": "option"
|
|
@@ -5896,57 +5878,59 @@
|
|
|
5896
5878
|
},
|
|
5897
5879
|
"hasDynamicHelp": true,
|
|
5898
5880
|
"hiddenAliases": [],
|
|
5899
|
-
"id": "hardis:org:
|
|
5881
|
+
"id": "hardis:org:fix:listviewmine",
|
|
5900
5882
|
"pluginAlias": "sfdx-hardis",
|
|
5901
5883
|
"pluginName": "sfdx-hardis",
|
|
5902
5884
|
"pluginType": "core",
|
|
5903
5885
|
"strict": true,
|
|
5904
5886
|
"enableJsonFlag": true,
|
|
5905
|
-
"title": "
|
|
5906
|
-
"requiresProject":
|
|
5887
|
+
"title": "Fix listviews with ",
|
|
5888
|
+
"requiresProject": true,
|
|
5907
5889
|
"isESM": true,
|
|
5908
5890
|
"relativePath": [
|
|
5909
5891
|
"lib",
|
|
5910
5892
|
"commands",
|
|
5911
5893
|
"hardis",
|
|
5912
5894
|
"org",
|
|
5913
|
-
"
|
|
5914
|
-
"
|
|
5895
|
+
"fix",
|
|
5896
|
+
"listviewmine.js"
|
|
5915
5897
|
],
|
|
5916
5898
|
"aliasPermutations": [],
|
|
5917
5899
|
"permutations": [
|
|
5918
|
-
"hardis:org:
|
|
5919
|
-
"org:hardis:
|
|
5920
|
-
"org:
|
|
5921
|
-
"org:
|
|
5922
|
-
"hardis:
|
|
5923
|
-
"
|
|
5924
|
-
"
|
|
5925
|
-
"
|
|
5926
|
-
"hardis:
|
|
5927
|
-
"
|
|
5928
|
-
"
|
|
5929
|
-
"
|
|
5930
|
-
"hardis:org:
|
|
5931
|
-
"org:hardis:
|
|
5932
|
-
"org:
|
|
5933
|
-
"org:
|
|
5934
|
-
"hardis:
|
|
5935
|
-
"
|
|
5936
|
-
"
|
|
5937
|
-
"
|
|
5938
|
-
"hardis:
|
|
5939
|
-
"
|
|
5940
|
-
"
|
|
5941
|
-
"
|
|
5900
|
+
"hardis:org:fix:listviewmine",
|
|
5901
|
+
"org:hardis:fix:listviewmine",
|
|
5902
|
+
"org:fix:hardis:listviewmine",
|
|
5903
|
+
"org:fix:listviewmine:hardis",
|
|
5904
|
+
"hardis:fix:org:listviewmine",
|
|
5905
|
+
"fix:hardis:org:listviewmine",
|
|
5906
|
+
"fix:org:hardis:listviewmine",
|
|
5907
|
+
"fix:org:listviewmine:hardis",
|
|
5908
|
+
"hardis:fix:listviewmine:org",
|
|
5909
|
+
"fix:hardis:listviewmine:org",
|
|
5910
|
+
"fix:listviewmine:hardis:org",
|
|
5911
|
+
"fix:listviewmine:org:hardis",
|
|
5912
|
+
"hardis:org:listviewmine:fix",
|
|
5913
|
+
"org:hardis:listviewmine:fix",
|
|
5914
|
+
"org:listviewmine:hardis:fix",
|
|
5915
|
+
"org:listviewmine:fix:hardis",
|
|
5916
|
+
"hardis:listviewmine:org:fix",
|
|
5917
|
+
"listviewmine:hardis:org:fix",
|
|
5918
|
+
"listviewmine:org:hardis:fix",
|
|
5919
|
+
"listviewmine:org:fix:hardis",
|
|
5920
|
+
"hardis:listviewmine:fix:org",
|
|
5921
|
+
"listviewmine:hardis:fix:org",
|
|
5922
|
+
"listviewmine:fix:hardis:org",
|
|
5923
|
+
"listviewmine:fix:org:hardis"
|
|
5942
5924
|
]
|
|
5943
5925
|
},
|
|
5944
|
-
"hardis:org:
|
|
5926
|
+
"hardis:org:generate:packagexmlfull": {
|
|
5945
5927
|
"aliases": [],
|
|
5946
5928
|
"args": {},
|
|
5947
|
-
"description": "\n## Command Behavior\n\n**
|
|
5929
|
+
"description": "\n## Command Behavior\n\n**Generates a comprehensive `package.xml` file for a Salesforce org, including all metadata components, even managed ones.**\n\nThis command is essential for various Salesforce development and administration tasks, especially when you need a complete snapshot of an org's metadata. It goes beyond typical source tracking by including managed package components, which is crucial for understanding the full metadata footprint of an org.\n\nKey functionalities:\n\n- **Full Org Metadata Retrieval:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a complete list of all metadata types and their members.\n- **Managed Package Inclusion:** Unlike standard source retrieval, this command explicitly includes metadata from managed packages, providing a truly comprehensive `package.xml`.\n- **Customizable Output:** Allows you to specify the output file path for the generated `package.xml`.\n- **Interactive Org Selection:** If no target org is specified, it interactively prompts the user to choose an org. (or use --no-prompt to skip this step)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce Metadata API Interaction:** It leverages the Salesforce Metadata API to list all available metadata types and then retrieve all components for each type.\n- **`buildOrgManifest` Utility:** The core logic for querying the org's metadata and constructing the `package.xml` is encapsulated within the `buildOrgManifest` utility function.\n- **XML Generation:** It dynamically builds the XML structure of the `package.xml` file, including the `types` and `members` elements for all retrieved metadata.\n- **File System Operations:** It writes the generated `package.xml` file to the specified output path.\n- **Interactive Prompts:** Uses `promptOrgUsernameDefault` to guide the user in selecting the target Salesforce org.\n</details>\n",
|
|
5948
5930
|
"examples": [
|
|
5949
|
-
"$ sf hardis:org:
|
|
5931
|
+
"$ sf hardis:org:generate:packagexmlfull",
|
|
5932
|
+
"$ sf hardis:org:generate:packagexmlfull --outputfile /tmp/packagexmlfull.xml",
|
|
5933
|
+
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
5950
5934
|
],
|
|
5951
5935
|
"flags": {
|
|
5952
5936
|
"json": {
|
|
@@ -5964,6 +5948,13 @@
|
|
|
5964
5948
|
"multiple": false,
|
|
5965
5949
|
"type": "option"
|
|
5966
5950
|
},
|
|
5951
|
+
"outputfile": {
|
|
5952
|
+
"description": "Output package.xml file",
|
|
5953
|
+
"name": "outputfile",
|
|
5954
|
+
"hasDynamicHelp": false,
|
|
5955
|
+
"multiple": false,
|
|
5956
|
+
"type": "option"
|
|
5957
|
+
},
|
|
5967
5958
|
"debug": {
|
|
5968
5959
|
"char": "d",
|
|
5969
5960
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5971,6 +5962,13 @@
|
|
|
5971
5962
|
"allowNo": false,
|
|
5972
5963
|
"type": "boolean"
|
|
5973
5964
|
},
|
|
5965
|
+
"no-prompt": {
|
|
5966
|
+
"char": "n",
|
|
5967
|
+
"description": "Do not prompt for org username, use the default one",
|
|
5968
|
+
"name": "no-prompt",
|
|
5969
|
+
"allowNo": false,
|
|
5970
|
+
"type": "boolean"
|
|
5971
|
+
},
|
|
5974
5972
|
"websocket": {
|
|
5975
5973
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5976
5974
|
"name": "websocket",
|
|
@@ -6002,13 +6000,13 @@
|
|
|
6002
6000
|
},
|
|
6003
6001
|
"hasDynamicHelp": true,
|
|
6004
6002
|
"hiddenAliases": [],
|
|
6005
|
-
"id": "hardis:org:
|
|
6003
|
+
"id": "hardis:org:generate:packagexmlfull",
|
|
6006
6004
|
"pluginAlias": "sfdx-hardis",
|
|
6007
6005
|
"pluginName": "sfdx-hardis",
|
|
6008
6006
|
"pluginType": "core",
|
|
6009
6007
|
"strict": true,
|
|
6010
6008
|
"enableJsonFlag": true,
|
|
6011
|
-
"title": "
|
|
6009
|
+
"title": "Generate Full Org package.xml",
|
|
6012
6010
|
"requiresProject": false,
|
|
6013
6011
|
"isESM": true,
|
|
6014
6012
|
"relativePath": [
|
|
@@ -6016,46 +6014,46 @@
|
|
|
6016
6014
|
"commands",
|
|
6017
6015
|
"hardis",
|
|
6018
6016
|
"org",
|
|
6019
|
-
"
|
|
6020
|
-
"
|
|
6017
|
+
"generate",
|
|
6018
|
+
"packagexmlfull.js"
|
|
6021
6019
|
],
|
|
6022
6020
|
"aliasPermutations": [],
|
|
6023
6021
|
"permutations": [
|
|
6024
|
-
"hardis:org:
|
|
6025
|
-
"org:hardis:
|
|
6026
|
-
"org:
|
|
6027
|
-
"org:
|
|
6028
|
-
"hardis:
|
|
6029
|
-
"
|
|
6030
|
-
"
|
|
6031
|
-
"
|
|
6032
|
-
"hardis:
|
|
6033
|
-
"
|
|
6034
|
-
"
|
|
6035
|
-
"
|
|
6036
|
-
"hardis:org:
|
|
6037
|
-
"org:hardis:
|
|
6038
|
-
"org:
|
|
6039
|
-
"org:
|
|
6040
|
-
"hardis:
|
|
6041
|
-
"
|
|
6042
|
-
"
|
|
6043
|
-
"
|
|
6044
|
-
"hardis:
|
|
6045
|
-
"
|
|
6046
|
-
"
|
|
6047
|
-
"
|
|
6022
|
+
"hardis:org:generate:packagexmlfull",
|
|
6023
|
+
"org:hardis:generate:packagexmlfull",
|
|
6024
|
+
"org:generate:hardis:packagexmlfull",
|
|
6025
|
+
"org:generate:packagexmlfull:hardis",
|
|
6026
|
+
"hardis:generate:org:packagexmlfull",
|
|
6027
|
+
"generate:hardis:org:packagexmlfull",
|
|
6028
|
+
"generate:org:hardis:packagexmlfull",
|
|
6029
|
+
"generate:org:packagexmlfull:hardis",
|
|
6030
|
+
"hardis:generate:packagexmlfull:org",
|
|
6031
|
+
"generate:hardis:packagexmlfull:org",
|
|
6032
|
+
"generate:packagexmlfull:hardis:org",
|
|
6033
|
+
"generate:packagexmlfull:org:hardis",
|
|
6034
|
+
"hardis:org:packagexmlfull:generate",
|
|
6035
|
+
"org:hardis:packagexmlfull:generate",
|
|
6036
|
+
"org:packagexmlfull:hardis:generate",
|
|
6037
|
+
"org:packagexmlfull:generate:hardis",
|
|
6038
|
+
"hardis:packagexmlfull:org:generate",
|
|
6039
|
+
"packagexmlfull:hardis:org:generate",
|
|
6040
|
+
"packagexmlfull:org:hardis:generate",
|
|
6041
|
+
"packagexmlfull:org:generate:hardis",
|
|
6042
|
+
"hardis:packagexmlfull:generate:org",
|
|
6043
|
+
"packagexmlfull:hardis:generate:org",
|
|
6044
|
+
"packagexmlfull:generate:hardis:org",
|
|
6045
|
+
"packagexmlfull:generate:org:hardis"
|
|
6048
6046
|
]
|
|
6049
6047
|
},
|
|
6050
|
-
"hardis:org:diagnose:
|
|
6048
|
+
"hardis:org:diagnose:audittrail": {
|
|
6051
6049
|
"aliases": [],
|
|
6052
6050
|
"args": {},
|
|
6053
|
-
"description": "
|
|
6051
|
+
"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",
|
|
6054
6052
|
"examples": [
|
|
6055
|
-
"$ sf hardis:org:diagnose:
|
|
6056
|
-
"$ sf hardis:org:diagnose:
|
|
6057
|
-
"$ sf hardis:org:diagnose:
|
|
6058
|
-
"$ sf hardis:org:diagnose:
|
|
6053
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
6054
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
6055
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
6056
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
6059
6057
|
],
|
|
6060
6058
|
"flags": {
|
|
6061
6059
|
"json": {
|
|
@@ -6073,20 +6071,18 @@
|
|
|
6073
6071
|
"multiple": false,
|
|
6074
6072
|
"type": "option"
|
|
6075
6073
|
},
|
|
6076
|
-
"
|
|
6074
|
+
"excludeusers": {
|
|
6077
6075
|
"char": "e",
|
|
6078
|
-
"description": "
|
|
6079
|
-
"name": "
|
|
6080
|
-
"default": "ApiTotalUsage",
|
|
6076
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
6077
|
+
"name": "excludeusers",
|
|
6081
6078
|
"hasDynamicHelp": false,
|
|
6082
6079
|
"multiple": false,
|
|
6083
6080
|
"type": "option"
|
|
6084
6081
|
},
|
|
6085
|
-
"
|
|
6086
|
-
"char": "
|
|
6087
|
-
"description": "Number of
|
|
6088
|
-
"name": "
|
|
6089
|
-
"default": 999,
|
|
6082
|
+
"lastndays": {
|
|
6083
|
+
"char": "t",
|
|
6084
|
+
"description": "Number of days to extract from today (included)",
|
|
6085
|
+
"name": "lastndays",
|
|
6090
6086
|
"hasDynamicHelp": false,
|
|
6091
6087
|
"multiple": false,
|
|
6092
6088
|
"type": "option"
|
|
@@ -6137,13 +6133,13 @@
|
|
|
6137
6133
|
},
|
|
6138
6134
|
"hasDynamicHelp": true,
|
|
6139
6135
|
"hiddenAliases": [],
|
|
6140
|
-
"id": "hardis:org:diagnose:
|
|
6136
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
6141
6137
|
"pluginAlias": "sfdx-hardis",
|
|
6142
6138
|
"pluginName": "sfdx-hardis",
|
|
6143
6139
|
"pluginType": "core",
|
|
6144
6140
|
"strict": true,
|
|
6145
6141
|
"enableJsonFlag": true,
|
|
6146
|
-
"title": "
|
|
6142
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
6147
6143
|
"requiresProject": false,
|
|
6148
6144
|
"isESM": true,
|
|
6149
6145
|
"relativePath": [
|
|
@@ -6152,42 +6148,42 @@
|
|
|
6152
6148
|
"hardis",
|
|
6153
6149
|
"org",
|
|
6154
6150
|
"diagnose",
|
|
6155
|
-
"
|
|
6151
|
+
"audittrail.js"
|
|
6156
6152
|
],
|
|
6157
6153
|
"aliasPermutations": [],
|
|
6158
6154
|
"permutations": [
|
|
6159
|
-
"hardis:org:diagnose:
|
|
6160
|
-
"org:hardis:diagnose:
|
|
6161
|
-
"org:diagnose:hardis:
|
|
6162
|
-
"org:diagnose:
|
|
6163
|
-
"hardis:diagnose:org:
|
|
6164
|
-
"diagnose:hardis:org:
|
|
6165
|
-
"diagnose:org:hardis:
|
|
6166
|
-
"diagnose:org:
|
|
6167
|
-
"hardis:diagnose:
|
|
6168
|
-
"diagnose:hardis:
|
|
6169
|
-
"diagnose:
|
|
6170
|
-
"diagnose:
|
|
6171
|
-
"hardis:org:
|
|
6172
|
-
"org:hardis:
|
|
6173
|
-
"org:
|
|
6174
|
-
"org:
|
|
6175
|
-
"hardis:
|
|
6176
|
-
"
|
|
6177
|
-
"
|
|
6178
|
-
"
|
|
6179
|
-
"hardis:
|
|
6180
|
-
"
|
|
6181
|
-
"
|
|
6182
|
-
"
|
|
6155
|
+
"hardis:org:diagnose:audittrail",
|
|
6156
|
+
"org:hardis:diagnose:audittrail",
|
|
6157
|
+
"org:diagnose:hardis:audittrail",
|
|
6158
|
+
"org:diagnose:audittrail:hardis",
|
|
6159
|
+
"hardis:diagnose:org:audittrail",
|
|
6160
|
+
"diagnose:hardis:org:audittrail",
|
|
6161
|
+
"diagnose:org:hardis:audittrail",
|
|
6162
|
+
"diagnose:org:audittrail:hardis",
|
|
6163
|
+
"hardis:diagnose:audittrail:org",
|
|
6164
|
+
"diagnose:hardis:audittrail:org",
|
|
6165
|
+
"diagnose:audittrail:hardis:org",
|
|
6166
|
+
"diagnose:audittrail:org:hardis",
|
|
6167
|
+
"hardis:org:audittrail:diagnose",
|
|
6168
|
+
"org:hardis:audittrail:diagnose",
|
|
6169
|
+
"org:audittrail:hardis:diagnose",
|
|
6170
|
+
"org:audittrail:diagnose:hardis",
|
|
6171
|
+
"hardis:audittrail:org:diagnose",
|
|
6172
|
+
"audittrail:hardis:org:diagnose",
|
|
6173
|
+
"audittrail:org:hardis:diagnose",
|
|
6174
|
+
"audittrail:org:diagnose:hardis",
|
|
6175
|
+
"hardis:audittrail:diagnose:org",
|
|
6176
|
+
"audittrail:hardis:diagnose:org",
|
|
6177
|
+
"audittrail:diagnose:hardis:org",
|
|
6178
|
+
"audittrail:diagnose:org:hardis"
|
|
6183
6179
|
]
|
|
6184
6180
|
},
|
|
6185
|
-
"hardis:org:diagnose:
|
|
6181
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
6186
6182
|
"aliases": [],
|
|
6187
6183
|
"args": {},
|
|
6188
|
-
"description": "\n
|
|
6184
|
+
"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",
|
|
6189
6185
|
"examples": [
|
|
6190
|
-
"$ sf hardis:org:diagnose:
|
|
6186
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
6191
6187
|
],
|
|
6192
6188
|
"flags": {
|
|
6193
6189
|
"json": {
|
|
@@ -6205,21 +6201,6 @@
|
|
|
6205
6201
|
"multiple": false,
|
|
6206
6202
|
"type": "option"
|
|
6207
6203
|
},
|
|
6208
|
-
"outputfile": {
|
|
6209
|
-
"char": "f",
|
|
6210
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6211
|
-
"name": "outputfile",
|
|
6212
|
-
"hasDynamicHelp": false,
|
|
6213
|
-
"multiple": false,
|
|
6214
|
-
"type": "option"
|
|
6215
|
-
},
|
|
6216
|
-
"usedonly": {
|
|
6217
|
-
"char": "u",
|
|
6218
|
-
"description": "Filter to have only used licenses",
|
|
6219
|
-
"name": "usedonly",
|
|
6220
|
-
"allowNo": false,
|
|
6221
|
-
"type": "boolean"
|
|
6222
|
-
},
|
|
6223
6204
|
"debug": {
|
|
6224
6205
|
"char": "d",
|
|
6225
6206
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6258,13 +6239,13 @@
|
|
|
6258
6239
|
},
|
|
6259
6240
|
"hasDynamicHelp": true,
|
|
6260
6241
|
"hiddenAliases": [],
|
|
6261
|
-
"id": "hardis:org:diagnose:
|
|
6242
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
6262
6243
|
"pluginAlias": "sfdx-hardis",
|
|
6263
6244
|
"pluginName": "sfdx-hardis",
|
|
6264
6245
|
"pluginType": "core",
|
|
6265
6246
|
"strict": true,
|
|
6266
6247
|
"enableJsonFlag": true,
|
|
6267
|
-
"title": "
|
|
6248
|
+
"title": "Get Instance Upgrade date",
|
|
6268
6249
|
"requiresProject": false,
|
|
6269
6250
|
"isESM": true,
|
|
6270
6251
|
"relativePath": [
|
|
@@ -6273,42 +6254,45 @@
|
|
|
6273
6254
|
"hardis",
|
|
6274
6255
|
"org",
|
|
6275
6256
|
"diagnose",
|
|
6276
|
-
"
|
|
6257
|
+
"instanceupgrade.js"
|
|
6277
6258
|
],
|
|
6278
6259
|
"aliasPermutations": [],
|
|
6279
6260
|
"permutations": [
|
|
6280
|
-
"hardis:org:diagnose:
|
|
6281
|
-
"org:hardis:diagnose:
|
|
6282
|
-
"org:diagnose:hardis:
|
|
6283
|
-
"org:diagnose:
|
|
6284
|
-
"hardis:diagnose:org:
|
|
6285
|
-
"diagnose:hardis:org:
|
|
6286
|
-
"diagnose:org:hardis:
|
|
6287
|
-
"diagnose:org:
|
|
6288
|
-
"hardis:diagnose:
|
|
6289
|
-
"diagnose:hardis:
|
|
6290
|
-
"diagnose:
|
|
6291
|
-
"diagnose:
|
|
6292
|
-
"hardis:org:
|
|
6293
|
-
"org:hardis:
|
|
6294
|
-
"org:
|
|
6295
|
-
"org:
|
|
6296
|
-
"hardis:
|
|
6297
|
-
"
|
|
6298
|
-
"
|
|
6299
|
-
"
|
|
6300
|
-
"hardis:
|
|
6301
|
-
"
|
|
6302
|
-
"
|
|
6303
|
-
"
|
|
6261
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
6262
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
6263
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
6264
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
6265
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
6266
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
6267
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
6268
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
6269
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
6270
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
6271
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
6272
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
6273
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
6274
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
6275
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
6276
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
6277
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
6278
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
6279
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
6280
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
6281
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
6282
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
6283
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
6284
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
6304
6285
|
]
|
|
6305
6286
|
},
|
|
6306
|
-
"hardis:org:diagnose:
|
|
6287
|
+
"hardis:org:diagnose:legacyapi": {
|
|
6307
6288
|
"aliases": [],
|
|
6308
6289
|
"args": {},
|
|
6309
|
-
"description": "
|
|
6290
|
+
"description": "Checks if an org uses retired or someday retired API version\n\n\nSee article below\n\n[](https://nicolas.vuillamy.fr/handle-salesforce-api-versions-deprecation-like-a-pro-335065f52238)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-deprecated-api-calls/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
6310
6291
|
"examples": [
|
|
6311
|
-
"$ sf hardis:org:diagnose:
|
|
6292
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
6293
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6294
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6295
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6312
6296
|
],
|
|
6313
6297
|
"flags": {
|
|
6314
6298
|
"json": {
|
|
@@ -6326,6 +6310,24 @@
|
|
|
6326
6310
|
"multiple": false,
|
|
6327
6311
|
"type": "option"
|
|
6328
6312
|
},
|
|
6313
|
+
"eventtype": {
|
|
6314
|
+
"char": "e",
|
|
6315
|
+
"description": "Type of EventLogFile event to analyze",
|
|
6316
|
+
"name": "eventtype",
|
|
6317
|
+
"default": "ApiTotalUsage",
|
|
6318
|
+
"hasDynamicHelp": false,
|
|
6319
|
+
"multiple": false,
|
|
6320
|
+
"type": "option"
|
|
6321
|
+
},
|
|
6322
|
+
"limit": {
|
|
6323
|
+
"char": "l",
|
|
6324
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
6325
|
+
"name": "limit",
|
|
6326
|
+
"default": 999,
|
|
6327
|
+
"hasDynamicHelp": false,
|
|
6328
|
+
"multiple": false,
|
|
6329
|
+
"type": "option"
|
|
6330
|
+
},
|
|
6329
6331
|
"outputfile": {
|
|
6330
6332
|
"char": "f",
|
|
6331
6333
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6372,13 +6374,13 @@
|
|
|
6372
6374
|
},
|
|
6373
6375
|
"hasDynamicHelp": true,
|
|
6374
6376
|
"hiddenAliases": [],
|
|
6375
|
-
"id": "hardis:org:diagnose:
|
|
6377
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
6376
6378
|
"pluginAlias": "sfdx-hardis",
|
|
6377
6379
|
"pluginName": "sfdx-hardis",
|
|
6378
6380
|
"pluginType": "core",
|
|
6379
6381
|
"strict": true,
|
|
6380
6382
|
"enableJsonFlag": true,
|
|
6381
|
-
"title": "Check
|
|
6383
|
+
"title": "Check for legacy API use",
|
|
6382
6384
|
"requiresProject": false,
|
|
6383
6385
|
"isESM": true,
|
|
6384
6386
|
"relativePath": [
|
|
@@ -6387,52 +6389,52 @@
|
|
|
6387
6389
|
"hardis",
|
|
6388
6390
|
"org",
|
|
6389
6391
|
"diagnose",
|
|
6390
|
-
"
|
|
6392
|
+
"legacyapi.js"
|
|
6391
6393
|
],
|
|
6392
6394
|
"aliasPermutations": [],
|
|
6393
6395
|
"permutations": [
|
|
6394
|
-
"hardis:org:diagnose:
|
|
6395
|
-
"org:hardis:diagnose:
|
|
6396
|
-
"org:diagnose:hardis:
|
|
6397
|
-
"org:diagnose:
|
|
6398
|
-
"hardis:diagnose:org:
|
|
6399
|
-
"diagnose:hardis:org:
|
|
6400
|
-
"diagnose:org:hardis:
|
|
6401
|
-
"diagnose:org:
|
|
6402
|
-
"hardis:diagnose:
|
|
6403
|
-
"diagnose:hardis:
|
|
6404
|
-
"diagnose:
|
|
6405
|
-
"diagnose:
|
|
6406
|
-
"hardis:org:
|
|
6407
|
-
"org:hardis:
|
|
6408
|
-
"org:
|
|
6409
|
-
"org:
|
|
6410
|
-
"hardis:
|
|
6411
|
-
"
|
|
6412
|
-
"
|
|
6413
|
-
"
|
|
6414
|
-
"hardis:
|
|
6415
|
-
"
|
|
6416
|
-
"
|
|
6417
|
-
"
|
|
6418
|
-
]
|
|
6419
|
-
},
|
|
6420
|
-
"hardis:org:diagnose:
|
|
6421
|
-
"aliases": [],
|
|
6422
|
-
"args": {},
|
|
6423
|
-
"description": "**
|
|
6424
|
-
"examples": [
|
|
6425
|
-
"$ sf hardis:org:diagnose:
|
|
6426
|
-
],
|
|
6427
|
-
"flags": {
|
|
6428
|
-
"json": {
|
|
6429
|
-
"description": "Format output as json.",
|
|
6430
|
-
"helpGroup": "GLOBAL",
|
|
6431
|
-
"name": "json",
|
|
6432
|
-
"allowNo": false,
|
|
6433
|
-
"type": "boolean"
|
|
6434
|
-
},
|
|
6435
|
-
"flags-dir": {
|
|
6396
|
+
"hardis:org:diagnose:legacyapi",
|
|
6397
|
+
"org:hardis:diagnose:legacyapi",
|
|
6398
|
+
"org:diagnose:hardis:legacyapi",
|
|
6399
|
+
"org:diagnose:legacyapi:hardis",
|
|
6400
|
+
"hardis:diagnose:org:legacyapi",
|
|
6401
|
+
"diagnose:hardis:org:legacyapi",
|
|
6402
|
+
"diagnose:org:hardis:legacyapi",
|
|
6403
|
+
"diagnose:org:legacyapi:hardis",
|
|
6404
|
+
"hardis:diagnose:legacyapi:org",
|
|
6405
|
+
"diagnose:hardis:legacyapi:org",
|
|
6406
|
+
"diagnose:legacyapi:hardis:org",
|
|
6407
|
+
"diagnose:legacyapi:org:hardis",
|
|
6408
|
+
"hardis:org:legacyapi:diagnose",
|
|
6409
|
+
"org:hardis:legacyapi:diagnose",
|
|
6410
|
+
"org:legacyapi:hardis:diagnose",
|
|
6411
|
+
"org:legacyapi:diagnose:hardis",
|
|
6412
|
+
"hardis:legacyapi:org:diagnose",
|
|
6413
|
+
"legacyapi:hardis:org:diagnose",
|
|
6414
|
+
"legacyapi:org:hardis:diagnose",
|
|
6415
|
+
"legacyapi:org:diagnose:hardis",
|
|
6416
|
+
"hardis:legacyapi:diagnose:org",
|
|
6417
|
+
"legacyapi:hardis:diagnose:org",
|
|
6418
|
+
"legacyapi:diagnose:hardis:org",
|
|
6419
|
+
"legacyapi:diagnose:org:hardis"
|
|
6420
|
+
]
|
|
6421
|
+
},
|
|
6422
|
+
"hardis:org:diagnose:licenses": {
|
|
6423
|
+
"aliases": [],
|
|
6424
|
+
"args": {},
|
|
6425
|
+
"description": "\n**Lists and analyzes User Licenses and Permission Set Licenses subscribed and used in a Salesforce org.**\n\nThis command provides a comprehensive overview of your Salesforce license consumption. It's particularly useful for:\n\n- **License Management:** Understanding which licenses are active, how many are available, and how many are being used.\n- **Cost Optimization:** Identifying unused or underutilized licenses that could be reallocated or decommissioned.\n- **Compliance:** Ensuring that your organization is compliant with Salesforce licensing agreements.\n- **Monitoring:** Tracking license usage trends over time.\n\nKey functionalities:\n\n- **User License Details:** Retrieves information about standard and custom User Licenses, including `MasterLabel`, `Name`, `TotalLicenses`, and `UsedLicenses`.\n- **Permission Set License Details:** Retrieves information about Permission Set Licenses, including `MasterLabel`, `PermissionSetLicenseKey`, `TotalLicenses`, and `UsedLicenses`.\n- **Used Licenses Filter:** The `--usedonly` flag allows you to filter the report to show only licenses that have at least one `UsedLicenses` count greater than zero.\n- **CSV Report Generation:** Generates a CSV file containing all the retrieved license information, suitable for detailed analysis.\n- **Notifications:** Sends notifications to configured channels (e.g., Grafana, Slack, MS Teams) with a summary of license usage, including lists of active and used licenses.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It executes SOQL queries against the `UserLicense` and `PermissionSetLicense` objects in Salesforce to retrieve license data.\n- **Data Transformation:** It processes the query results, reformatting the data to be more readable and consistent for reporting purposes (e.g., removing `Id` and `attributes`, renaming `PermissionSetLicenseKey` to `Name`).\n- **Data Aggregation:** It aggregates license information, creating a `licensesByKey` object for quick lookups and a `usedLicenses` array for a concise list of actively used licenses.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of license data.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides clear messages to the user about the license extraction process and the used licenses.\n</details>\n",
|
|
6426
|
+
"examples": [
|
|
6427
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
6428
|
+
],
|
|
6429
|
+
"flags": {
|
|
6430
|
+
"json": {
|
|
6431
|
+
"description": "Format output as json.",
|
|
6432
|
+
"helpGroup": "GLOBAL",
|
|
6433
|
+
"name": "json",
|
|
6434
|
+
"allowNo": false,
|
|
6435
|
+
"type": "boolean"
|
|
6436
|
+
},
|
|
6437
|
+
"flags-dir": {
|
|
6436
6438
|
"helpGroup": "GLOBAL",
|
|
6437
6439
|
"name": "flags-dir",
|
|
6438
6440
|
"summary": "Import flag values from a directory.",
|
|
@@ -6448,6 +6450,13 @@
|
|
|
6448
6450
|
"multiple": false,
|
|
6449
6451
|
"type": "option"
|
|
6450
6452
|
},
|
|
6453
|
+
"usedonly": {
|
|
6454
|
+
"char": "u",
|
|
6455
|
+
"description": "Filter to have only used licenses",
|
|
6456
|
+
"name": "usedonly",
|
|
6457
|
+
"allowNo": false,
|
|
6458
|
+
"type": "boolean"
|
|
6459
|
+
},
|
|
6451
6460
|
"debug": {
|
|
6452
6461
|
"char": "d",
|
|
6453
6462
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6486,14 +6495,14 @@
|
|
|
6486
6495
|
},
|
|
6487
6496
|
"hasDynamicHelp": true,
|
|
6488
6497
|
"hiddenAliases": [],
|
|
6489
|
-
"id": "hardis:org:diagnose:
|
|
6498
|
+
"id": "hardis:org:diagnose:licenses",
|
|
6490
6499
|
"pluginAlias": "sfdx-hardis",
|
|
6491
6500
|
"pluginName": "sfdx-hardis",
|
|
6492
6501
|
"pluginType": "core",
|
|
6493
6502
|
"strict": true,
|
|
6494
6503
|
"enableJsonFlag": true,
|
|
6495
|
-
"title": "
|
|
6496
|
-
"requiresProject":
|
|
6504
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6505
|
+
"requiresProject": false,
|
|
6497
6506
|
"isESM": true,
|
|
6498
6507
|
"relativePath": [
|
|
6499
6508
|
"lib",
|
|
@@ -6501,42 +6510,42 @@
|
|
|
6501
6510
|
"hardis",
|
|
6502
6511
|
"org",
|
|
6503
6512
|
"diagnose",
|
|
6504
|
-
"
|
|
6513
|
+
"licenses.js"
|
|
6505
6514
|
],
|
|
6506
6515
|
"aliasPermutations": [],
|
|
6507
6516
|
"permutations": [
|
|
6508
|
-
"hardis:org:diagnose:
|
|
6509
|
-
"org:hardis:diagnose:
|
|
6510
|
-
"org:diagnose:hardis:
|
|
6511
|
-
"org:diagnose:
|
|
6512
|
-
"hardis:diagnose:org:
|
|
6513
|
-
"diagnose:hardis:org:
|
|
6514
|
-
"diagnose:org:hardis:
|
|
6515
|
-
"diagnose:org:
|
|
6516
|
-
"hardis:diagnose:
|
|
6517
|
-
"diagnose:hardis:
|
|
6518
|
-
"diagnose:
|
|
6519
|
-
"diagnose:
|
|
6520
|
-
"hardis:org:
|
|
6521
|
-
"org:hardis:
|
|
6522
|
-
"org:
|
|
6523
|
-
"org:
|
|
6524
|
-
"hardis:
|
|
6525
|
-
"
|
|
6526
|
-
"
|
|
6527
|
-
"
|
|
6528
|
-
"hardis:
|
|
6529
|
-
"
|
|
6530
|
-
"
|
|
6531
|
-
"
|
|
6517
|
+
"hardis:org:diagnose:licenses",
|
|
6518
|
+
"org:hardis:diagnose:licenses",
|
|
6519
|
+
"org:diagnose:hardis:licenses",
|
|
6520
|
+
"org:diagnose:licenses:hardis",
|
|
6521
|
+
"hardis:diagnose:org:licenses",
|
|
6522
|
+
"diagnose:hardis:org:licenses",
|
|
6523
|
+
"diagnose:org:hardis:licenses",
|
|
6524
|
+
"diagnose:org:licenses:hardis",
|
|
6525
|
+
"hardis:diagnose:licenses:org",
|
|
6526
|
+
"diagnose:hardis:licenses:org",
|
|
6527
|
+
"diagnose:licenses:hardis:org",
|
|
6528
|
+
"diagnose:licenses:org:hardis",
|
|
6529
|
+
"hardis:org:licenses:diagnose",
|
|
6530
|
+
"org:hardis:licenses:diagnose",
|
|
6531
|
+
"org:licenses:hardis:diagnose",
|
|
6532
|
+
"org:licenses:diagnose:hardis",
|
|
6533
|
+
"hardis:licenses:org:diagnose",
|
|
6534
|
+
"licenses:hardis:org:diagnose",
|
|
6535
|
+
"licenses:org:hardis:diagnose",
|
|
6536
|
+
"licenses:org:diagnose:hardis",
|
|
6537
|
+
"hardis:licenses:diagnose:org",
|
|
6538
|
+
"licenses:hardis:diagnose:org",
|
|
6539
|
+
"licenses:diagnose:hardis:org",
|
|
6540
|
+
"licenses:diagnose:org:hardis"
|
|
6532
6541
|
]
|
|
6533
6542
|
},
|
|
6534
|
-
"hardis:org:diagnose:
|
|
6543
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6535
6544
|
"aliases": [],
|
|
6536
6545
|
"args": {},
|
|
6537
|
-
"description": "
|
|
6546
|
+
"description": "Export Release Updates into a CSV file with selected criteria, and highlight Release Updates that should be checked.\n\nBefore publishing **Breaking Changes** ❌, Salesforce announce them in the setup menu [**Release Updates**](https://help.salesforce.com/s/articleView?id=sf.release_updates.htm&type=5)\n\n⚠️ Some of them are very important, because if you don't make the related upgrades in time (ex: before Winter 25) , your production org can crash !\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-release-updates/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
6538
6547
|
"examples": [
|
|
6539
|
-
"$ sf hardis:org:diagnose:
|
|
6548
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6540
6549
|
],
|
|
6541
6550
|
"flags": {
|
|
6542
6551
|
"json": {
|
|
@@ -6600,13 +6609,13 @@
|
|
|
6600
6609
|
},
|
|
6601
6610
|
"hasDynamicHelp": true,
|
|
6602
6611
|
"hiddenAliases": [],
|
|
6603
|
-
"id": "hardis:org:diagnose:
|
|
6612
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6604
6613
|
"pluginAlias": "sfdx-hardis",
|
|
6605
6614
|
"pluginName": "sfdx-hardis",
|
|
6606
6615
|
"pluginType": "core",
|
|
6607
6616
|
"strict": true,
|
|
6608
6617
|
"enableJsonFlag": true,
|
|
6609
|
-
"title": "
|
|
6618
|
+
"title": "Check Release Updates of an org",
|
|
6610
6619
|
"requiresProject": false,
|
|
6611
6620
|
"isESM": true,
|
|
6612
6621
|
"relativePath": [
|
|
@@ -6615,43 +6624,42 @@
|
|
|
6615
6624
|
"hardis",
|
|
6616
6625
|
"org",
|
|
6617
6626
|
"diagnose",
|
|
6618
|
-
"
|
|
6627
|
+
"releaseupdates.js"
|
|
6619
6628
|
],
|
|
6620
6629
|
"aliasPermutations": [],
|
|
6621
6630
|
"permutations": [
|
|
6622
|
-
"hardis:org:diagnose:
|
|
6623
|
-
"org:hardis:diagnose:
|
|
6624
|
-
"org:diagnose:hardis:
|
|
6625
|
-
"org:diagnose:
|
|
6626
|
-
"hardis:diagnose:org:
|
|
6627
|
-
"diagnose:hardis:org:
|
|
6628
|
-
"diagnose:org:hardis:
|
|
6629
|
-
"diagnose:org:
|
|
6630
|
-
"hardis:diagnose:
|
|
6631
|
-
"diagnose:hardis:
|
|
6632
|
-
"diagnose:
|
|
6633
|
-
"diagnose:
|
|
6634
|
-
"hardis:org:
|
|
6635
|
-
"org:hardis:
|
|
6636
|
-
"org:
|
|
6637
|
-
"org:
|
|
6638
|
-
"hardis:
|
|
6639
|
-
"
|
|
6640
|
-
"
|
|
6641
|
-
"
|
|
6642
|
-
"hardis:
|
|
6643
|
-
"
|
|
6644
|
-
"
|
|
6645
|
-
"
|
|
6631
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6632
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6633
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6634
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6635
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6636
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6637
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6638
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6639
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6640
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6641
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6642
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6643
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6644
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6645
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6646
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6647
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6648
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6649
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6650
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6651
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6652
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6653
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6654
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6646
6655
|
]
|
|
6647
6656
|
},
|
|
6648
|
-
"hardis:org:diagnose:
|
|
6657
|
+
"hardis:org:diagnose:storage-stats": {
|
|
6649
6658
|
"aliases": [],
|
|
6650
6659
|
"args": {},
|
|
6651
|
-
"description": "
|
|
6660
|
+
"description": "**Extracts and analyzes Data Storage usage for a Salesforce org, providing detailed per-object breakdowns with yearly trends.**\n\nThis command provides a comprehensive overview of your Salesforce data storage consumption. It's particularly useful for:\n\n- **Storage Management:** Understanding which SObjects consume the most storage and how usage has evolved over time.\n- **Cost Optimization:** Identifying storage-heavy objects that could be candidates for data archival or cleanup strategies.\n- **Capacity Planning:** Tracking storage trends to predict when additional capacity will be needed.\n- **Compliance & Governance:** Monitoring data growth patterns to ensure alignment with data retention policies.\n\nKey functionalities:\n\n- **Storage Limits Analysis:** Retrieves and displays org data storage limits, including total capacity, used storage, remaining storage, and percentage used. Detects and alerts on over-usage scenarios.\n- **SObject Discovery & Filtering:** Automatically discovers all SObjects in the org and filters them to focus on production/custom objects (excludes metadata types, platform-only objects, and cached empty objects).\n- **Interactive Selection:** Prompts the user to select which SObjects to analyze and choose between `CreatedDate` or `LastModifiedDate` for temporal breakdown.\n- **Yearly Storage Breakdown:** Executes grouped SOQL queries per object to calculate record counts by year, providing historical growth trends.\n- **Storage Estimation:** Estimates storage usage for each object using an average record size heuristic (2 KB per record) and calculates the percentage of org quota consumed.\n- **Dual CSV Reports:** Generates two CSV files: a detailed by-year breakdown and a totals-per-object summary, both suitable for spreadsheet analysis and reporting.\n- **Empty Objects Cache:** Maintains a per-user cache of objects detected with zero records to optimize subsequent runs by skipping empty tables.\n- **Progress Tracking:** Sends WebSocket progress messages for integration with external UIs and monitoring dashboards.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Limits Retrieval:** Calls `conn.limits()` to retrieve the `DataStorageMB` object containing `Max` and `Remaining` values. Handles negative `Remaining` values (over-usage scenarios) by calculating `overUsageMB` and adjusting display values.\n- **SObject Discovery:** Uses `conn.metadata.list([{ type: 'CustomObject' }])` to get custom objects and `conn.describeGlobal()` to get all SObjects. Filters by object capabilities (`layoutable`, `queryable`, `retrieveable`, `createable`, `updateable`, `deletable`) and excludes metadata types (`__mdt` suffix) and cached empty objects.\n- **User Interaction:** Uses `prompts` for interactive multi-select of SObjects and single-select for date field choice. All objects are pre-selected by default for user convenience.\n- **Yearly Aggregation Queries:** For each selected SObject, executes a grouped SOQL query: `SELECT CALENDAR_YEAR(<DateField>) year, COUNT(Id) total FROM <SObject> GROUP BY CALENDAR_YEAR(<DateField>) ORDER BY CALENDAR_YEAR(<DateField>) DESC`. Handles query errors gracefully (logs error and continues with next object).\n- **Storage Calculation:** Applies a conservative average record size of 2 KB (2048 bytes) to estimate storage consumption. Calculates both MB usage and percentage of org quota for each object and year.\n- **Report Generation:** Uses `generateCsvFile` and `generateReportPath` helpers to create two CSV files in the reports directory:\n - Detailed breakdown: includes all yearly statistics per object\n - Totals summary: includes only aggregate totals per object\n- **Caching Mechanism:** Writes a JSON cache file per authenticated username (sanitized) in the reports directory (`<username>_empty_tables_cache.json`) containing an array of empty object names. The cache is updated after each run with newly detected empty objects.\n- **Progress & UX:** Uses `WebSocketClient` to emit start/step/end progress messages for external monitoring. Outputs summary tables with `uxLogTable` and status messages with `uxLog`.\n- **Return Value:** Returns a JSON object containing `tableStorageInfos` (all rows), `tableStorageInfosTotals` (summary rows), `storageLimits` (org limits object), and `outputFiles` (paths to generated CSV/XLSX reports).\n</details>\n\n\n\n\n",
|
|
6652
6661
|
"examples": [
|
|
6653
|
-
"$ sf hardis:org:diagnose:
|
|
6654
|
-
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6662
|
+
"$ sf hardis:org:diagnose:storage-stats"
|
|
6655
6663
|
],
|
|
6656
6664
|
"flags": {
|
|
6657
6665
|
"json": {
|
|
@@ -6677,14 +6685,6 @@
|
|
|
6677
6685
|
"multiple": false,
|
|
6678
6686
|
"type": "option"
|
|
6679
6687
|
},
|
|
6680
|
-
"days": {
|
|
6681
|
-
"char": "t",
|
|
6682
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6683
|
-
"name": "days",
|
|
6684
|
-
"hasDynamicHelp": false,
|
|
6685
|
-
"multiple": false,
|
|
6686
|
-
"type": "option"
|
|
6687
|
-
},
|
|
6688
6688
|
"debug": {
|
|
6689
6689
|
"char": "d",
|
|
6690
6690
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6723,14 +6723,14 @@
|
|
|
6723
6723
|
},
|
|
6724
6724
|
"hasDynamicHelp": true,
|
|
6725
6725
|
"hiddenAliases": [],
|
|
6726
|
-
"id": "hardis:org:diagnose:
|
|
6726
|
+
"id": "hardis:org:diagnose:storage-stats",
|
|
6727
6727
|
"pluginAlias": "sfdx-hardis",
|
|
6728
6728
|
"pluginName": "sfdx-hardis",
|
|
6729
6729
|
"pluginType": "core",
|
|
6730
6730
|
"strict": true,
|
|
6731
6731
|
"enableJsonFlag": true,
|
|
6732
|
-
"title": "
|
|
6733
|
-
"requiresProject":
|
|
6732
|
+
"title": "Extract Data Storage stats",
|
|
6733
|
+
"requiresProject": true,
|
|
6734
6734
|
"isESM": true,
|
|
6735
6735
|
"relativePath": [
|
|
6736
6736
|
"lib",
|
|
@@ -6738,42 +6738,42 @@
|
|
|
6738
6738
|
"hardis",
|
|
6739
6739
|
"org",
|
|
6740
6740
|
"diagnose",
|
|
6741
|
-
"
|
|
6741
|
+
"storage-stats.js"
|
|
6742
6742
|
],
|
|
6743
6743
|
"aliasPermutations": [],
|
|
6744
6744
|
"permutations": [
|
|
6745
|
-
"hardis:org:diagnose:
|
|
6746
|
-
"org:hardis:diagnose:
|
|
6747
|
-
"org:diagnose:hardis:
|
|
6748
|
-
"org:diagnose:
|
|
6749
|
-
"hardis:diagnose:org:
|
|
6750
|
-
"diagnose:hardis:org:
|
|
6751
|
-
"diagnose:org:hardis:
|
|
6752
|
-
"diagnose:org:
|
|
6753
|
-
"hardis:diagnose:
|
|
6754
|
-
"diagnose:hardis:
|
|
6755
|
-
"diagnose:
|
|
6756
|
-
"diagnose:
|
|
6757
|
-
"hardis:org:
|
|
6758
|
-
"org:hardis:
|
|
6759
|
-
"org:
|
|
6760
|
-
"org:
|
|
6761
|
-
"hardis:
|
|
6762
|
-
"
|
|
6763
|
-
"
|
|
6764
|
-
"
|
|
6765
|
-
"hardis:
|
|
6766
|
-
"
|
|
6767
|
-
"
|
|
6768
|
-
"
|
|
6745
|
+
"hardis:org:diagnose:storage-stats",
|
|
6746
|
+
"org:hardis:diagnose:storage-stats",
|
|
6747
|
+
"org:diagnose:hardis:storage-stats",
|
|
6748
|
+
"org:diagnose:storage-stats:hardis",
|
|
6749
|
+
"hardis:diagnose:org:storage-stats",
|
|
6750
|
+
"diagnose:hardis:org:storage-stats",
|
|
6751
|
+
"diagnose:org:hardis:storage-stats",
|
|
6752
|
+
"diagnose:org:storage-stats:hardis",
|
|
6753
|
+
"hardis:diagnose:storage-stats:org",
|
|
6754
|
+
"diagnose:hardis:storage-stats:org",
|
|
6755
|
+
"diagnose:storage-stats:hardis:org",
|
|
6756
|
+
"diagnose:storage-stats:org:hardis",
|
|
6757
|
+
"hardis:org:storage-stats:diagnose",
|
|
6758
|
+
"org:hardis:storage-stats:diagnose",
|
|
6759
|
+
"org:storage-stats:hardis:diagnose",
|
|
6760
|
+
"org:storage-stats:diagnose:hardis",
|
|
6761
|
+
"hardis:storage-stats:org:diagnose",
|
|
6762
|
+
"storage-stats:hardis:org:diagnose",
|
|
6763
|
+
"storage-stats:org:hardis:diagnose",
|
|
6764
|
+
"storage-stats:org:diagnose:hardis",
|
|
6765
|
+
"hardis:storage-stats:diagnose:org",
|
|
6766
|
+
"storage-stats:hardis:diagnose:org",
|
|
6767
|
+
"storage-stats:diagnose:hardis:org",
|
|
6768
|
+
"storage-stats:diagnose:org:hardis"
|
|
6769
6769
|
]
|
|
6770
6770
|
},
|
|
6771
|
-
"hardis:org:diagnose:
|
|
6771
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
6772
6772
|
"aliases": [],
|
|
6773
6773
|
"args": {},
|
|
6774
|
-
"description": "\n## Command Behavior\n\n**
|
|
6774
|
+
"description": "\n## Command Behavior\n\n**Detects unsecured Connected Apps in a Salesforce org and generates detailed reports for security analysis.**\n\nThis command is a critical security diagnostic tool that helps administrators identify Connected Apps that may pose security risks due to improper configuration. It provides comprehensive analysis of OAuth tokens and Connected App security settings to ensure proper access control.\n\nKey functionalities:\n\n- **OAuth Token Analysis:** Queries all OAuth tokens in the org using SOQL to retrieve comprehensive token information including app names, users, authorization status, and usage statistics.\n- **Security Status Assessment:** Evaluates each Connected App's security configuration by checking the `IsUsingAdminAuthorization` flag to determine if admin pre-approval is required.\n- **Unsecured App Detection:** Identifies Connected Apps that allow users to authorize themselves without admin approval, which can pose security risks.\n- **Detailed Reporting:** Generates two comprehensive CSV reports:\n - **OAuth Tokens Report:** Lists all OAuth tokens with security status, user information, and usage data\n - **Connected Apps Summary:** Aggregates unsecured Connected Apps with counts of associated OAuth tokens\n- **Visual Indicators:** Uses status icons (❌ for unsecured, ✅ for secured) to provide immediate visual feedback on security status.\n- **Security Recommendations:** Provides actionable guidance on how to secure Connected Apps through proper configuration.\n- **Notifications:** Sends alerts to configured channels (Grafana, Slack, MS Teams) with security findings and attached reports.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-security/) and can output Grafana, Slack and MsTeams Notifications.\n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/jHv8yrSK8Dg\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen></iframe>\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query Execution:** Executes a comprehensive SOQL query on the `OauthToken` object, joining with `AppMenuItem` and `User` objects to gather complete security context.\n- **Security Analysis Logic:** Analyzes the `AppMenuItem.IsUsingAdminAuthorization` field to determine if a Connected App requires admin pre-approval for user authorization.\n- **Data Transformation:** Processes raw SOQL results to add security status indicators and reorganize data for optimal reporting and analysis.\n- **Aggregation Processing:** Groups OAuth tokens by Connected App name to provide summary statistics and identify the most problematic applications.\n- **Report Generation:** Uses `generateCsvFile` to create structured CSV reports with proper formatting and metadata for easy analysis and sharing.\n- **Notification Integration:** Integrates with the `NotifProvider` to send security alerts with detailed metrics, including the number of unsecured Connected Apps and associated OAuth tokens.\n- **File Management:** Generates multiple output formats (CSV, XLSX) and manages file paths using `generateReportPath` for consistent report organization.\n- **Connection Management:** Uses `setConnectionVariables` to ensure proper authentication context for notification providers that require org connection details.\n</details>\n",
|
|
6775
6775
|
"examples": [
|
|
6776
|
-
"$ sf hardis:org:diagnose:
|
|
6776
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
6777
6777
|
],
|
|
6778
6778
|
"flags": {
|
|
6779
6779
|
"json": {
|
|
@@ -6837,30 +6837,13 @@
|
|
|
6837
6837
|
},
|
|
6838
6838
|
"hasDynamicHelp": true,
|
|
6839
6839
|
"hiddenAliases": [],
|
|
6840
|
-
"id": "hardis:org:diagnose:
|
|
6840
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
6841
6841
|
"pluginAlias": "sfdx-hardis",
|
|
6842
6842
|
"pluginName": "sfdx-hardis",
|
|
6843
6843
|
"pluginType": "core",
|
|
6844
6844
|
"strict": true,
|
|
6845
6845
|
"enableJsonFlag": true,
|
|
6846
|
-
"title": "
|
|
6847
|
-
"allowedInactiveConnectedApps": [
|
|
6848
|
-
"Ant Migration Tool",
|
|
6849
|
-
"Chatter Desktop",
|
|
6850
|
-
"Chatter Mobile for BlackBerry",
|
|
6851
|
-
"Force.com IDE",
|
|
6852
|
-
"OIQ_Integration",
|
|
6853
|
-
"Salesforce CLI",
|
|
6854
|
-
"Salesforce Files",
|
|
6855
|
-
"Salesforce Mobile Dashboards",
|
|
6856
|
-
"Salesforce Touch",
|
|
6857
|
-
"Salesforce for Outlook",
|
|
6858
|
-
"SalesforceA",
|
|
6859
|
-
"SalesforceA for Android",
|
|
6860
|
-
"SalesforceA for iOS",
|
|
6861
|
-
"SalesforceDX Namespace Registry",
|
|
6862
|
-
"SalesforceIQ"
|
|
6863
|
-
],
|
|
6846
|
+
"title": "Detect Unsecured Connected Apps",
|
|
6864
6847
|
"requiresProject": false,
|
|
6865
6848
|
"isESM": true,
|
|
6866
6849
|
"relativePath": [
|
|
@@ -6869,43 +6852,43 @@
|
|
|
6869
6852
|
"hardis",
|
|
6870
6853
|
"org",
|
|
6871
6854
|
"diagnose",
|
|
6872
|
-
"
|
|
6855
|
+
"unsecure-connected-apps.js"
|
|
6873
6856
|
],
|
|
6874
6857
|
"aliasPermutations": [],
|
|
6875
6858
|
"permutations": [
|
|
6876
|
-
"hardis:org:diagnose:
|
|
6877
|
-
"org:hardis:diagnose:
|
|
6878
|
-
"org:diagnose:hardis:
|
|
6879
|
-
"org:diagnose:
|
|
6880
|
-
"hardis:diagnose:org:
|
|
6881
|
-
"diagnose:hardis:org:
|
|
6882
|
-
"diagnose:org:hardis:
|
|
6883
|
-
"diagnose:org:
|
|
6884
|
-
"hardis:diagnose:
|
|
6885
|
-
"diagnose:hardis:
|
|
6886
|
-
"diagnose:
|
|
6887
|
-
"diagnose:
|
|
6888
|
-
"hardis:org:
|
|
6889
|
-
"org:hardis:
|
|
6890
|
-
"org:
|
|
6891
|
-
"org:
|
|
6892
|
-
"hardis:
|
|
6893
|
-
"
|
|
6894
|
-
"
|
|
6895
|
-
"
|
|
6896
|
-
"hardis:
|
|
6897
|
-
"
|
|
6898
|
-
"
|
|
6899
|
-
"
|
|
6859
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
6860
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
6861
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
6862
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
6863
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
6864
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
6865
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
6866
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
6867
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
6868
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
6869
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
6870
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
6871
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
6872
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
6873
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
6874
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
6875
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
6876
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
6877
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
6878
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
6879
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
6880
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
6881
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
6882
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
6900
6883
|
]
|
|
6901
6884
|
},
|
|
6902
|
-
"hardis:org:diagnose:
|
|
6885
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6903
6886
|
"aliases": [],
|
|
6904
6887
|
"args": {},
|
|
6905
|
-
"description": "
|
|
6888
|
+
"description": "List all async Apex classes (Batch,Queueable,Schedulable) that has not been called for more than 365 days.\n \nThe result class list probably can be removed from the project, and that will improve your test classes performances 😊\n\nThe number of unused day is overridable using --days option. \n\nThe command uses queries on AsyncApexJob and CronTrigger technical tables to build the result.\n\nApex Classes CreatedBy and CreatedOn fields are calculated from MIN(date from git, date from org)\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-apex-classes/) and can output Grafana, Slack and MsTeams Notifications.\n\n\n",
|
|
6906
6889
|
"examples": [
|
|
6907
|
-
"$ sf hardis:org:diagnose:
|
|
6908
|
-
"$ sf hardis:org:diagnose:
|
|
6890
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6891
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6909
6892
|
],
|
|
6910
6893
|
"flags": {
|
|
6911
6894
|
"json": {
|
|
@@ -6931,6 +6914,14 @@
|
|
|
6931
6914
|
"multiple": false,
|
|
6932
6915
|
"type": "option"
|
|
6933
6916
|
},
|
|
6917
|
+
"days": {
|
|
6918
|
+
"char": "t",
|
|
6919
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6920
|
+
"name": "days",
|
|
6921
|
+
"hasDynamicHelp": false,
|
|
6922
|
+
"multiple": false,
|
|
6923
|
+
"type": "option"
|
|
6924
|
+
},
|
|
6934
6925
|
"debug": {
|
|
6935
6926
|
"char": "d",
|
|
6936
6927
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6969,32 +6960,14 @@
|
|
|
6969
6960
|
},
|
|
6970
6961
|
"hasDynamicHelp": true,
|
|
6971
6962
|
"hiddenAliases": [],
|
|
6972
|
-
"id": "hardis:org:diagnose:
|
|
6963
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6973
6964
|
"pluginAlias": "sfdx-hardis",
|
|
6974
6965
|
"pluginName": "sfdx-hardis",
|
|
6975
6966
|
"pluginType": "core",
|
|
6976
6967
|
"strict": true,
|
|
6977
6968
|
"enableJsonFlag": true,
|
|
6978
|
-
"title": "Detect unused
|
|
6969
|
+
"title": "Detect unused Apex classes in an org",
|
|
6979
6970
|
"requiresProject": false,
|
|
6980
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
6981
|
-
"Sales_User"
|
|
6982
|
-
],
|
|
6983
|
-
"permSetsPermSetLicenses": [
|
|
6984
|
-
{
|
|
6985
|
-
"permSet": "Sales_User",
|
|
6986
|
-
"permSetLicense": "SalesUserPsl"
|
|
6987
|
-
}
|
|
6988
|
-
],
|
|
6989
|
-
"profilesPermissionSetLicenses": [
|
|
6990
|
-
{
|
|
6991
|
-
"profile": "Salesforce API Only",
|
|
6992
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6993
|
-
}
|
|
6994
|
-
],
|
|
6995
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6996
|
-
"IdentityConnect"
|
|
6997
|
-
],
|
|
6998
6971
|
"isESM": true,
|
|
6999
6972
|
"relativePath": [
|
|
7000
6973
|
"lib",
|
|
@@ -7002,46 +6975,42 @@
|
|
|
7002
6975
|
"hardis",
|
|
7003
6976
|
"org",
|
|
7004
6977
|
"diagnose",
|
|
7005
|
-
"
|
|
6978
|
+
"unused-apex-classes.js"
|
|
7006
6979
|
],
|
|
7007
6980
|
"aliasPermutations": [],
|
|
7008
6981
|
"permutations": [
|
|
7009
|
-
"hardis:org:diagnose:
|
|
7010
|
-
"org:hardis:diagnose:
|
|
7011
|
-
"org:diagnose:hardis:
|
|
7012
|
-
"org:diagnose:
|
|
7013
|
-
"hardis:diagnose:org:
|
|
7014
|
-
"diagnose:hardis:org:
|
|
7015
|
-
"diagnose:org:hardis:
|
|
7016
|
-
"diagnose:org:
|
|
7017
|
-
"hardis:diagnose:
|
|
7018
|
-
"diagnose:hardis:
|
|
7019
|
-
"diagnose:
|
|
7020
|
-
"diagnose:
|
|
7021
|
-
"hardis:org:
|
|
7022
|
-
"org:hardis:
|
|
7023
|
-
"org:
|
|
7024
|
-
"org:
|
|
7025
|
-
"hardis:
|
|
7026
|
-
"
|
|
7027
|
-
"
|
|
7028
|
-
"
|
|
7029
|
-
"hardis:
|
|
7030
|
-
"
|
|
7031
|
-
"
|
|
7032
|
-
"
|
|
6982
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6983
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6984
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6985
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6986
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6987
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6988
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6989
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6990
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6991
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6992
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6993
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6994
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6995
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6996
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6997
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6998
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6999
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
7000
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
7001
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
7002
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
7003
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
7004
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
7005
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
7033
7006
|
]
|
|
7034
7007
|
},
|
|
7035
|
-
"hardis:org:diagnose:
|
|
7008
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
7036
7009
|
"aliases": [],
|
|
7037
7010
|
"args": {},
|
|
7038
|
-
"description": "\n## Command Behavior\n\n**
|
|
7011
|
+
"description": "\n## Command Behavior\n\n**Identifies and reports on potentially unused Connected Apps in a Salesforce org, suggesting candidates for deletion or deactivation.**\n\nThis command helps improve org security and reduce technical debt by pinpointing Connected Apps that are no longer actively used. Connected Apps can pose security risks if left unmonitored, and cleaning them up contributes to a healthier Salesforce environment.\n\nKey functionalities:\n\n- **Connected App Data Collection:** Gathers information about all Connected Apps in the org, including creation and last modified dates, and associated users.\n- **Usage Analysis:** Analyzes `LoginHistory` and `OAuthToken` records to determine the last usage date of each Connected App.\n- **Inactivity Detection:** Flags Connected Apps as potentially unused if they have no recent login history or OAuth token usage.\n- **Accessibility Check:** Examines Connected App metadata to identify if they are accessible (e.g., if they require admin approval and have no profiles or permission sets assigned).\n- **Ignored Apps:** Automatically ignores a predefined list of common Salesforce Connected Apps (e.g., `Salesforce CLI`, `Salesforce Mobile Dashboards`). You can extend this list by defining the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n- **CSV Report Generation:** Generates a CSV file containing details of all analyzed Connected Apps, including their usage status, last usage date, and reasons for being flagged as potentially unused.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of potentially unused Connected Apps.\n\n**Default Ignored Connected Apps:**\n\n- Ant Migration Tool\n- Chatter Desktop\n- Chatter Mobile for BlackBerry\n- Force.com IDE\n- OIQ_Integration\n- Salesforce CLI\n- Salesforce Files\n- Salesforce Mobile Dashboards\n- Salesforce Touch\n- Salesforce for Outlook\n- SalesforceA\n- SalesforceA for Android\n- SalesforceA for iOS\n- SalesforceDX Namespace Registry\n- SalesforceIQ\n\nYou can add more ignored apps by defining a comma-separated list of names in the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable.\n\n_Example: \nALLOWED_INACTIVE_CONNECTED_APPS=My App 1,My App 2, My App 3_\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-connected-apps/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce SOQL Queries:** It performs SOQL queries against `ConnectedApplication`, `LoginHistory`, and `OAuthToken` objects to gather comprehensive data about Connected Apps and their usage.\n- **Temporary SFDX Project:** It creates a temporary SFDX project to retrieve Connected App metadata, allowing for local parsing and analysis of their XML files.\n- **Metadata Parsing:** It parses the `connectedApp-meta.xml` files to check for `isAdminApproved` and the presence of `profileName` or `permissionsetName` to determine accessibility.\n- **Data Correlation:** It correlates data from various Salesforce objects to build a complete picture of each Connected App's usage and status.\n- **Date Calculation:** Uses `moment` to calculate the time since the last OAuth token usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused Connected Apps.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **File System Operations:** Uses `fs-extra` for creating and removing temporary directories and files.\n- **Environment Variable Reading:** Reads the `ALLOWED_INACTIVE_CONNECTED_APPS` environment variable to customize the list of ignored Connected Apps.\n</details>\n",
|
|
7039
7012
|
"examples": [
|
|
7040
|
-
"$ sf hardis:org:diagnose:
|
|
7041
|
-
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
7042
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
7043
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
7044
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7013
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
7045
7014
|
],
|
|
7046
7015
|
"flags": {
|
|
7047
7016
|
"json": {
|
|
@@ -7067,41 +7036,6 @@
|
|
|
7067
7036
|
"multiple": false,
|
|
7068
7037
|
"type": "option"
|
|
7069
7038
|
},
|
|
7070
|
-
"days": {
|
|
7071
|
-
"char": "t",
|
|
7072
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7073
|
-
"name": "days",
|
|
7074
|
-
"hasDynamicHelp": false,
|
|
7075
|
-
"multiple": false,
|
|
7076
|
-
"type": "option"
|
|
7077
|
-
},
|
|
7078
|
-
"licensetypes": {
|
|
7079
|
-
"char": "l",
|
|
7080
|
-
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
7081
|
-
"name": "licensetypes",
|
|
7082
|
-
"hasDynamicHelp": false,
|
|
7083
|
-
"multiple": false,
|
|
7084
|
-
"options": [
|
|
7085
|
-
"all",
|
|
7086
|
-
"all-crm",
|
|
7087
|
-
"all-paying"
|
|
7088
|
-
],
|
|
7089
|
-
"type": "option"
|
|
7090
|
-
},
|
|
7091
|
-
"licenseidentifiers": {
|
|
7092
|
-
"char": "i",
|
|
7093
|
-
"description": "Comma-separated list of license identifiers, in case licensetypes is not used.. Identifiers available at https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm",
|
|
7094
|
-
"name": "licenseidentifiers",
|
|
7095
|
-
"hasDynamicHelp": false,
|
|
7096
|
-
"multiple": false,
|
|
7097
|
-
"type": "option"
|
|
7098
|
-
},
|
|
7099
|
-
"returnactiveusers": {
|
|
7100
|
-
"description": "Inverts the command by returning the active users",
|
|
7101
|
-
"name": "returnactiveusers",
|
|
7102
|
-
"allowNo": false,
|
|
7103
|
-
"type": "boolean"
|
|
7104
|
-
},
|
|
7105
7039
|
"debug": {
|
|
7106
7040
|
"char": "d",
|
|
7107
7041
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7140,13 +7074,30 @@
|
|
|
7140
7074
|
},
|
|
7141
7075
|
"hasDynamicHelp": true,
|
|
7142
7076
|
"hiddenAliases": [],
|
|
7143
|
-
"id": "hardis:org:diagnose:
|
|
7077
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
7144
7078
|
"pluginAlias": "sfdx-hardis",
|
|
7145
7079
|
"pluginName": "sfdx-hardis",
|
|
7146
7080
|
"pluginType": "core",
|
|
7147
7081
|
"strict": true,
|
|
7148
7082
|
"enableJsonFlag": true,
|
|
7149
|
-
"title": "
|
|
7083
|
+
"title": "Unused Connected Apps in an org",
|
|
7084
|
+
"allowedInactiveConnectedApps": [
|
|
7085
|
+
"Ant Migration Tool",
|
|
7086
|
+
"Chatter Desktop",
|
|
7087
|
+
"Chatter Mobile for BlackBerry",
|
|
7088
|
+
"Force.com IDE",
|
|
7089
|
+
"OIQ_Integration",
|
|
7090
|
+
"Salesforce CLI",
|
|
7091
|
+
"Salesforce Files",
|
|
7092
|
+
"Salesforce Mobile Dashboards",
|
|
7093
|
+
"Salesforce Touch",
|
|
7094
|
+
"Salesforce for Outlook",
|
|
7095
|
+
"SalesforceA",
|
|
7096
|
+
"SalesforceA for Android",
|
|
7097
|
+
"SalesforceA for iOS",
|
|
7098
|
+
"SalesforceDX Namespace Registry",
|
|
7099
|
+
"SalesforceIQ"
|
|
7100
|
+
],
|
|
7150
7101
|
"requiresProject": false,
|
|
7151
7102
|
"isESM": true,
|
|
7152
7103
|
"relativePath": [
|
|
@@ -7155,43 +7106,43 @@
|
|
|
7155
7106
|
"hardis",
|
|
7156
7107
|
"org",
|
|
7157
7108
|
"diagnose",
|
|
7158
|
-
"
|
|
7109
|
+
"unused-connected-apps.js"
|
|
7159
7110
|
],
|
|
7160
7111
|
"aliasPermutations": [],
|
|
7161
7112
|
"permutations": [
|
|
7162
|
-
"hardis:org:diagnose:
|
|
7163
|
-
"org:hardis:diagnose:
|
|
7164
|
-
"org:diagnose:hardis:
|
|
7165
|
-
"org:diagnose:
|
|
7166
|
-
"hardis:diagnose:org:
|
|
7167
|
-
"diagnose:hardis:org:
|
|
7168
|
-
"diagnose:org:hardis:
|
|
7169
|
-
"diagnose:org:
|
|
7170
|
-
"hardis:diagnose:
|
|
7171
|
-
"diagnose:hardis:
|
|
7172
|
-
"diagnose:
|
|
7173
|
-
"diagnose:
|
|
7174
|
-
"hardis:org:
|
|
7175
|
-
"org:hardis:
|
|
7176
|
-
"org:
|
|
7177
|
-
"org:
|
|
7178
|
-
"hardis:
|
|
7179
|
-
"
|
|
7180
|
-
"
|
|
7181
|
-
"
|
|
7182
|
-
"hardis:
|
|
7183
|
-
"
|
|
7184
|
-
"
|
|
7185
|
-
"
|
|
7113
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
7114
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
7115
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
7116
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
7117
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
7118
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
7119
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
7120
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
7121
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
7122
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
7123
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
7124
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
7125
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
7126
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
7127
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
7128
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
7129
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
7130
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
7131
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
7132
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
7133
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
7134
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
7135
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
7136
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
7186
7137
|
]
|
|
7187
7138
|
},
|
|
7188
|
-
"hardis:org:
|
|
7139
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
7189
7140
|
"aliases": [],
|
|
7190
7141
|
"args": {},
|
|
7191
|
-
"description": "
|
|
7142
|
+
"description": "\n## Command Behavior\n\n**Detects and suggests the deletion of unused Permission Set License Assignments in a Salesforce org.**\n\nWhen a Permission Set (PS) linked to a Permission Set License (PSL) is assigned to a user, a Permission Set License Assignment (PSLA) is automatically created. However, when that PS is unassigned from the user, the PSLA is *not* automatically deleted. This can lead to organizations being charged for unused PSLAs, representing a hidden cost and technical debt.\n\nThis command identifies such useless PSLAs and provides options to delete them, helping to optimize license usage and reduce unnecessary expenses.\n\nKey functionalities:\n\n- **PSLA Detection:** Queries the Salesforce org to find all active PSLAs.\n- **Usage Verification:** Correlates PSLAs with actual Permission Set Assignments and Permission Set Group Assignments to determine if the underlying Permission Sets are still assigned to the user.\n- **Special Case Handling:** Accounts for specific scenarios where profiles might implicitly assign PSLAs (e.g., `Salesforce API Only` profile assigning `SalesforceAPIIntegrationPsl`) and allows for always excluding certain PSLAs from the unused check.\n- **Reporting:** Generates a CSV report of all identified unused PSLAs, including the user and the associated Permission Set License.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of unused PSLAs.\n- **Interactive Deletion:** In non-CI environments, it offers an interactive prompt to bulk delete the identified unused PSLAs.\n\nMany thanks to [Vincent Finet](https://www.linkedin.com/in/vincentfinet/) for the inspiration during his great speaker session at [French Touch Dreamin '23](https://frenchtouchdreamin.com/), and his kind agreement for reusing such inspiration in this command 😊\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-unused-licenses/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves extensive querying of Salesforce objects and data correlation:\n\n- **SOQL Queries (Bulk API):** It uses `bulkQuery` and `bulkQueryChunksIn` to efficiently retrieve large volumes of data from `PermissionSetLicenseAssign`, `PermissionSetLicense`, `PermissionSet`, `PermissionSetGroupComponent`, and `PermissionSetAssignment` objects.\n- **Data Correlation:** It meticulously correlates data across these objects to determine if a `PermissionSetLicenseAssign` record has a corresponding active assignment to a Permission Set or Permission Set Group for the same user.\n- **Filtering Logic:** It applies complex filtering logic to exclude PSLAs that are genuinely in use or are part of predefined exceptions (e.g., `alwaysExcludeForActiveUsersPermissionSetLicenses`).\n- **Bulk Deletion:** If the user opts to delete unused PSLAs, it uses `bulkUpdate` with the `delete` operation to efficiently remove multiple records.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of unused PSLAs.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Interaction:** Uses `prompts` for interactive confirmation before performing deletion operations.\n</details>\n",
|
|
7192
7143
|
"examples": [
|
|
7193
|
-
"$ sf hardis:org:
|
|
7194
|
-
"$ sf hardis:org:
|
|
7144
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
7145
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
7195
7146
|
],
|
|
7196
7147
|
"flags": {
|
|
7197
7148
|
"json": {
|
|
@@ -7209,10 +7160,10 @@
|
|
|
7209
7160
|
"multiple": false,
|
|
7210
7161
|
"type": "option"
|
|
7211
7162
|
},
|
|
7212
|
-
"
|
|
7213
|
-
"char": "
|
|
7214
|
-
"description": "
|
|
7215
|
-
"name": "
|
|
7163
|
+
"outputfile": {
|
|
7164
|
+
"char": "f",
|
|
7165
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7166
|
+
"name": "outputfile",
|
|
7216
7167
|
"hasDynamicHelp": false,
|
|
7217
7168
|
"multiple": false,
|
|
7218
7169
|
"type": "option"
|
|
@@ -7255,59 +7206,79 @@
|
|
|
7255
7206
|
},
|
|
7256
7207
|
"hasDynamicHelp": true,
|
|
7257
7208
|
"hiddenAliases": [],
|
|
7258
|
-
"id": "hardis:org:
|
|
7209
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
7259
7210
|
"pluginAlias": "sfdx-hardis",
|
|
7260
7211
|
"pluginName": "sfdx-hardis",
|
|
7261
7212
|
"pluginType": "core",
|
|
7262
7213
|
"strict": true,
|
|
7263
7214
|
"enableJsonFlag": true,
|
|
7264
|
-
"title": "
|
|
7265
|
-
"requiresProject":
|
|
7215
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
7216
|
+
"requiresProject": false,
|
|
7217
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
7218
|
+
"Sales_User"
|
|
7219
|
+
],
|
|
7220
|
+
"permSetsPermSetLicenses": [
|
|
7221
|
+
{
|
|
7222
|
+
"permSet": "Sales_User",
|
|
7223
|
+
"permSetLicense": "SalesUserPsl"
|
|
7224
|
+
}
|
|
7225
|
+
],
|
|
7226
|
+
"profilesPermissionSetLicenses": [
|
|
7227
|
+
{
|
|
7228
|
+
"profile": "Salesforce API Only",
|
|
7229
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
7230
|
+
}
|
|
7231
|
+
],
|
|
7232
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
7233
|
+
"IdentityConnect"
|
|
7234
|
+
],
|
|
7266
7235
|
"isESM": true,
|
|
7267
7236
|
"relativePath": [
|
|
7268
7237
|
"lib",
|
|
7269
7238
|
"commands",
|
|
7270
7239
|
"hardis",
|
|
7271
7240
|
"org",
|
|
7272
|
-
"
|
|
7273
|
-
"
|
|
7241
|
+
"diagnose",
|
|
7242
|
+
"unusedlicenses.js"
|
|
7274
7243
|
],
|
|
7275
7244
|
"aliasPermutations": [],
|
|
7276
7245
|
"permutations": [
|
|
7277
|
-
"hardis:org:
|
|
7278
|
-
"org:hardis:
|
|
7279
|
-
"org:
|
|
7280
|
-
"org:
|
|
7281
|
-
"hardis:
|
|
7282
|
-
"
|
|
7283
|
-
"
|
|
7284
|
-
"
|
|
7285
|
-
"hardis:
|
|
7286
|
-
"
|
|
7287
|
-
"
|
|
7288
|
-
"
|
|
7289
|
-
"hardis:org:
|
|
7290
|
-
"org:hardis:
|
|
7291
|
-
"org:
|
|
7292
|
-
"org:
|
|
7293
|
-
"hardis:
|
|
7294
|
-
"
|
|
7295
|
-
"
|
|
7296
|
-
"
|
|
7297
|
-
"hardis:
|
|
7298
|
-
"
|
|
7299
|
-
"
|
|
7300
|
-
"
|
|
7246
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
7247
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
7248
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
7249
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
7250
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
7251
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
7252
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
7253
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
7254
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
7255
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
7256
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
7257
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
7258
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
7259
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
7260
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
7261
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
7262
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
7263
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
7264
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
7265
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
7266
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
7267
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
7268
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
7269
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
7301
7270
|
]
|
|
7302
7271
|
},
|
|
7303
|
-
"hardis:org:
|
|
7272
|
+
"hardis:org:diagnose:unusedusers": {
|
|
7304
7273
|
"aliases": [],
|
|
7305
7274
|
"args": {},
|
|
7306
|
-
"description": "\n## Command Behavior\n\n**
|
|
7275
|
+
"description": "\n## Command Behavior\n\n**Detects and reports on inactive or unused Salesforce user accounts, helping to optimize license usage and enhance security.**\n\nEfficient user management is vital in Salesforce to ensure resources are optimized and costs are controlled. However, inactive or unused user accounts can often go unnoticed, leading to wasted licenses and potential security risks. This tool addresses this challenge by enabling administrators to identify users who haven't logged in within a specified period.\n\nBy analyzing user login activity and last login timestamps, this feature highlights inactive user accounts, allowing administrators to take appropriate action. Whether it's deactivating dormant accounts, freeing up licenses, or ensuring compliance with security policies, this functionality empowers administrators to maintain a lean and secure Salesforce environment.\n\nKey functionalities:\n\n- **Inactivity Detection:** Identifies users who have not logged in for a specified number of days (`--days` flag, default 180 days in CI, 365 days otherwise).\n- **License Type Filtering:** Allows filtering users by license type using `--licensetypes` (e.g., `all-crm`, `all-paying`) or specific license identifiers using `--licenseidentifiers`.\n - `all-crm`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT` licenses.\n - `all-paying`: Includes `SFDC`, `AUL`, `AUL1`, `AULL_IGHT`, `PID_Customer_Community`, `PID_Customer_Community_Login`, `PID_Partner_Community`, `PID_Partner_Community_Login` licenses.\n - Note: You can see the full list of available license identifiers in [Salesforce Documentation](https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/sfdx_cli_reference/sforce_api_objects_userlicense.htm).\n- **Active User Retrieval:** The `--returnactiveusers` flag inverts the command, allowing you to retrieve active users who *have* logged in during the specified period.\n- **CSV Report Generation:** Generates a CSV file containing details of all identified users (inactive or active), including their last login date, profile, and license information.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of inactive or active users.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-inactive-users/) and can output Grafana, Slack and MsTeams Notifications.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query (Bulk API):** It uses `bulkQuery` to efficiently retrieve user records from the Salesforce `User` object. The SOQL query dynamically constructs its WHERE clause based on the `--days`, `--licensetypes`, `--licenseidentifiers`, and `--returnactiveusers` flags.\n- **Interactive Prompts:** Uses `prompts` to interactively ask the user for the number of inactive days and license types if not provided via flags.\n- **License Mapping:** Internally maps common license type aliases (e.g., `all-crm`) to their corresponding Salesforce `LicenseDefinitionKey` values.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of users.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and metrics for monitoring dashboards.\n- **User Feedback:** Provides a summary of the findings in the console, indicating the number of inactive or active users found.\n</details>",
|
|
7307
7276
|
"examples": [
|
|
7308
|
-
"$ sf hardis:org:
|
|
7309
|
-
"$ sf hardis:org:
|
|
7310
|
-
"$ sf hardis:org:
|
|
7277
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
7278
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
7279
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
7280
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
7281
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7311
7282
|
],
|
|
7312
7283
|
"flags": {
|
|
7313
7284
|
"json": {
|
|
@@ -7326,12 +7297,48 @@
|
|
|
7326
7297
|
"type": "option"
|
|
7327
7298
|
},
|
|
7328
7299
|
"outputfile": {
|
|
7329
|
-
"
|
|
7300
|
+
"char": "f",
|
|
7301
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7330
7302
|
"name": "outputfile",
|
|
7331
7303
|
"hasDynamicHelp": false,
|
|
7332
7304
|
"multiple": false,
|
|
7333
7305
|
"type": "option"
|
|
7334
7306
|
},
|
|
7307
|
+
"days": {
|
|
7308
|
+
"char": "t",
|
|
7309
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7310
|
+
"name": "days",
|
|
7311
|
+
"hasDynamicHelp": false,
|
|
7312
|
+
"multiple": false,
|
|
7313
|
+
"type": "option"
|
|
7314
|
+
},
|
|
7315
|
+
"licensetypes": {
|
|
7316
|
+
"char": "l",
|
|
7317
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
7318
|
+
"name": "licensetypes",
|
|
7319
|
+
"hasDynamicHelp": false,
|
|
7320
|
+
"multiple": false,
|
|
7321
|
+
"options": [
|
|
7322
|
+
"all",
|
|
7323
|
+
"all-crm",
|
|
7324
|
+
"all-paying"
|
|
7325
|
+
],
|
|
7326
|
+
"type": "option"
|
|
7327
|
+
},
|
|
7328
|
+
"licenseidentifiers": {
|
|
7329
|
+
"char": "i",
|
|
7330
|
+
"description": "Comma-separated list of license identifiers, in case licensetypes is not used.. Identifiers available at https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_userlicense.htm",
|
|
7331
|
+
"name": "licenseidentifiers",
|
|
7332
|
+
"hasDynamicHelp": false,
|
|
7333
|
+
"multiple": false,
|
|
7334
|
+
"type": "option"
|
|
7335
|
+
},
|
|
7336
|
+
"returnactiveusers": {
|
|
7337
|
+
"description": "Inverts the command by returning the active users",
|
|
7338
|
+
"name": "returnactiveusers",
|
|
7339
|
+
"allowNo": false,
|
|
7340
|
+
"type": "boolean"
|
|
7341
|
+
},
|
|
7335
7342
|
"debug": {
|
|
7336
7343
|
"char": "d",
|
|
7337
7344
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7339,13 +7346,6 @@
|
|
|
7339
7346
|
"allowNo": false,
|
|
7340
7347
|
"type": "boolean"
|
|
7341
7348
|
},
|
|
7342
|
-
"no-prompt": {
|
|
7343
|
-
"char": "n",
|
|
7344
|
-
"description": "Do not prompt for org username, use the default one",
|
|
7345
|
-
"name": "no-prompt",
|
|
7346
|
-
"allowNo": false,
|
|
7347
|
-
"type": "boolean"
|
|
7348
|
-
},
|
|
7349
7349
|
"websocket": {
|
|
7350
7350
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7351
7351
|
"name": "websocket",
|
|
@@ -7377,49 +7377,49 @@
|
|
|
7377
7377
|
},
|
|
7378
7378
|
"hasDynamicHelp": true,
|
|
7379
7379
|
"hiddenAliases": [],
|
|
7380
|
-
"id": "hardis:org:
|
|
7381
|
-
"pluginAlias": "sfdx-hardis",
|
|
7382
|
-
"pluginName": "sfdx-hardis",
|
|
7383
|
-
"pluginType": "core",
|
|
7384
|
-
"strict": true,
|
|
7385
|
-
"enableJsonFlag": true,
|
|
7386
|
-
"title": "
|
|
7387
|
-
"requiresProject": false,
|
|
7388
|
-
"isESM": true,
|
|
7389
|
-
"relativePath": [
|
|
7390
|
-
"lib",
|
|
7391
|
-
"commands",
|
|
7392
|
-
"hardis",
|
|
7393
|
-
"org",
|
|
7394
|
-
"
|
|
7395
|
-
"
|
|
7396
|
-
],
|
|
7397
|
-
"aliasPermutations": [],
|
|
7398
|
-
"permutations": [
|
|
7399
|
-
"hardis:org:
|
|
7400
|
-
"org:hardis:
|
|
7401
|
-
"org:
|
|
7402
|
-
"org:
|
|
7403
|
-
"hardis:
|
|
7404
|
-
"
|
|
7405
|
-
"
|
|
7406
|
-
"
|
|
7407
|
-
"hardis:
|
|
7408
|
-
"
|
|
7409
|
-
"
|
|
7410
|
-
"
|
|
7411
|
-
"hardis:org:
|
|
7412
|
-
"org:hardis:
|
|
7413
|
-
"org:
|
|
7414
|
-
"org:
|
|
7415
|
-
"hardis:
|
|
7416
|
-
"
|
|
7417
|
-
"
|
|
7418
|
-
"
|
|
7419
|
-
"hardis:
|
|
7420
|
-
"
|
|
7421
|
-
"
|
|
7422
|
-
"
|
|
7380
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
7381
|
+
"pluginAlias": "sfdx-hardis",
|
|
7382
|
+
"pluginName": "sfdx-hardis",
|
|
7383
|
+
"pluginType": "core",
|
|
7384
|
+
"strict": true,
|
|
7385
|
+
"enableJsonFlag": true,
|
|
7386
|
+
"title": "Detect unused Users in Salesforce",
|
|
7387
|
+
"requiresProject": false,
|
|
7388
|
+
"isESM": true,
|
|
7389
|
+
"relativePath": [
|
|
7390
|
+
"lib",
|
|
7391
|
+
"commands",
|
|
7392
|
+
"hardis",
|
|
7393
|
+
"org",
|
|
7394
|
+
"diagnose",
|
|
7395
|
+
"unusedusers.js"
|
|
7396
|
+
],
|
|
7397
|
+
"aliasPermutations": [],
|
|
7398
|
+
"permutations": [
|
|
7399
|
+
"hardis:org:diagnose:unusedusers",
|
|
7400
|
+
"org:hardis:diagnose:unusedusers",
|
|
7401
|
+
"org:diagnose:hardis:unusedusers",
|
|
7402
|
+
"org:diagnose:unusedusers:hardis",
|
|
7403
|
+
"hardis:diagnose:org:unusedusers",
|
|
7404
|
+
"diagnose:hardis:org:unusedusers",
|
|
7405
|
+
"diagnose:org:hardis:unusedusers",
|
|
7406
|
+
"diagnose:org:unusedusers:hardis",
|
|
7407
|
+
"hardis:diagnose:unusedusers:org",
|
|
7408
|
+
"diagnose:hardis:unusedusers:org",
|
|
7409
|
+
"diagnose:unusedusers:hardis:org",
|
|
7410
|
+
"diagnose:unusedusers:org:hardis",
|
|
7411
|
+
"hardis:org:unusedusers:diagnose",
|
|
7412
|
+
"org:hardis:unusedusers:diagnose",
|
|
7413
|
+
"org:unusedusers:hardis:diagnose",
|
|
7414
|
+
"org:unusedusers:diagnose:hardis",
|
|
7415
|
+
"hardis:unusedusers:org:diagnose",
|
|
7416
|
+
"unusedusers:hardis:org:diagnose",
|
|
7417
|
+
"unusedusers:org:hardis:diagnose",
|
|
7418
|
+
"unusedusers:org:diagnose:hardis",
|
|
7419
|
+
"hardis:unusedusers:diagnose:org",
|
|
7420
|
+
"unusedusers:hardis:diagnose:org",
|
|
7421
|
+
"unusedusers:diagnose:hardis:org",
|
|
7422
|
+
"unusedusers:diagnose:org:hardis"
|
|
7423
7423
|
]
|
|
7424
7424
|
},
|
|
7425
7425
|
"hardis:org:monitor:all": {
|
|
@@ -8171,6 +8171,113 @@
|
|
|
8171
8171
|
"flow:purge:org:hardis"
|
|
8172
8172
|
]
|
|
8173
8173
|
},
|
|
8174
|
+
"hardis:org:retrieve:packageconfig": {
|
|
8175
|
+
"aliases": [],
|
|
8176
|
+
"args": {},
|
|
8177
|
+
"description": "\n**Retrieves the installed package configuration from a Salesforce org and optionally updates the local project configuration.**\n\nThis command is useful for maintaining an accurate record of installed packages within your Salesforce project, which is crucial for managing dependencies and ensuring consistent deployments across environments.\n\nKey functionalities:\n\n- **Package Listing:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a list of all installed packages.\n- **Configuration Update:** Offers the option to update your local project's configuration with the retrieved list of installed packages. This can be beneficial for automating package installations during environment setup or CI/CD processes.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Org Connection:** It establishes a connection to the target Salesforce org using the provided or prompted username.\n- **Metadata Retrieval:** It utilizes `MetadataUtils.listInstalledPackages` to query the Salesforce org and obtain details about the installed packages.\n- **Interactive Prompt:** It uses the `prompts` library to ask the user whether they want to update their local project configuration with the retrieved package list.\n- **Configuration Management:** If the user confirms, it calls `managePackageConfig` to update the project's configuration file (likely `.sfdx-hardis.yml`) with the new package information.\n- **User Feedback:** Provides clear messages to the user about the success of the package retrieval and configuration update.\n</details>\n",
|
|
8178
|
+
"examples": [
|
|
8179
|
+
"$ sf hardis:org:retrieve:packageconfig",
|
|
8180
|
+
"sf hardis:org:retrieve:packageconfig -u myOrg"
|
|
8181
|
+
],
|
|
8182
|
+
"flags": {
|
|
8183
|
+
"json": {
|
|
8184
|
+
"description": "Format output as json.",
|
|
8185
|
+
"helpGroup": "GLOBAL",
|
|
8186
|
+
"name": "json",
|
|
8187
|
+
"allowNo": false,
|
|
8188
|
+
"type": "boolean"
|
|
8189
|
+
},
|
|
8190
|
+
"flags-dir": {
|
|
8191
|
+
"helpGroup": "GLOBAL",
|
|
8192
|
+
"name": "flags-dir",
|
|
8193
|
+
"summary": "Import flag values from a directory.",
|
|
8194
|
+
"hasDynamicHelp": false,
|
|
8195
|
+
"multiple": false,
|
|
8196
|
+
"type": "option"
|
|
8197
|
+
},
|
|
8198
|
+
"debug": {
|
|
8199
|
+
"char": "d",
|
|
8200
|
+
"description": "Activate debug mode (more logs)",
|
|
8201
|
+
"name": "debug",
|
|
8202
|
+
"allowNo": false,
|
|
8203
|
+
"type": "boolean"
|
|
8204
|
+
},
|
|
8205
|
+
"websocket": {
|
|
8206
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8207
|
+
"name": "websocket",
|
|
8208
|
+
"hasDynamicHelp": false,
|
|
8209
|
+
"multiple": false,
|
|
8210
|
+
"type": "option"
|
|
8211
|
+
},
|
|
8212
|
+
"skipauth": {
|
|
8213
|
+
"description": "Skip authentication check when a default username is required",
|
|
8214
|
+
"name": "skipauth",
|
|
8215
|
+
"allowNo": false,
|
|
8216
|
+
"type": "boolean"
|
|
8217
|
+
},
|
|
8218
|
+
"target-org": {
|
|
8219
|
+
"aliases": [
|
|
8220
|
+
"targetusername",
|
|
8221
|
+
"u"
|
|
8222
|
+
],
|
|
8223
|
+
"char": "o",
|
|
8224
|
+
"deprecateAliases": true,
|
|
8225
|
+
"name": "target-org",
|
|
8226
|
+
"noCacheDefault": true,
|
|
8227
|
+
"required": true,
|
|
8228
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8229
|
+
"hasDynamicHelp": true,
|
|
8230
|
+
"multiple": false,
|
|
8231
|
+
"type": "option"
|
|
8232
|
+
}
|
|
8233
|
+
},
|
|
8234
|
+
"hasDynamicHelp": true,
|
|
8235
|
+
"hiddenAliases": [],
|
|
8236
|
+
"id": "hardis:org:retrieve:packageconfig",
|
|
8237
|
+
"pluginAlias": "sfdx-hardis",
|
|
8238
|
+
"pluginName": "sfdx-hardis",
|
|
8239
|
+
"pluginType": "core",
|
|
8240
|
+
"strict": true,
|
|
8241
|
+
"enableJsonFlag": true,
|
|
8242
|
+
"title": "Retrieve package configuration from an org",
|
|
8243
|
+
"requiresProject": false,
|
|
8244
|
+
"isESM": true,
|
|
8245
|
+
"relativePath": [
|
|
8246
|
+
"lib",
|
|
8247
|
+
"commands",
|
|
8248
|
+
"hardis",
|
|
8249
|
+
"org",
|
|
8250
|
+
"retrieve",
|
|
8251
|
+
"packageconfig.js"
|
|
8252
|
+
],
|
|
8253
|
+
"aliasPermutations": [],
|
|
8254
|
+
"permutations": [
|
|
8255
|
+
"hardis:org:retrieve:packageconfig",
|
|
8256
|
+
"org:hardis:retrieve:packageconfig",
|
|
8257
|
+
"org:retrieve:hardis:packageconfig",
|
|
8258
|
+
"org:retrieve:packageconfig:hardis",
|
|
8259
|
+
"hardis:retrieve:org:packageconfig",
|
|
8260
|
+
"retrieve:hardis:org:packageconfig",
|
|
8261
|
+
"retrieve:org:hardis:packageconfig",
|
|
8262
|
+
"retrieve:org:packageconfig:hardis",
|
|
8263
|
+
"hardis:retrieve:packageconfig:org",
|
|
8264
|
+
"retrieve:hardis:packageconfig:org",
|
|
8265
|
+
"retrieve:packageconfig:hardis:org",
|
|
8266
|
+
"retrieve:packageconfig:org:hardis",
|
|
8267
|
+
"hardis:org:packageconfig:retrieve",
|
|
8268
|
+
"org:hardis:packageconfig:retrieve",
|
|
8269
|
+
"org:packageconfig:hardis:retrieve",
|
|
8270
|
+
"org:packageconfig:retrieve:hardis",
|
|
8271
|
+
"hardis:packageconfig:org:retrieve",
|
|
8272
|
+
"packageconfig:hardis:org:retrieve",
|
|
8273
|
+
"packageconfig:org:hardis:retrieve",
|
|
8274
|
+
"packageconfig:org:retrieve:hardis",
|
|
8275
|
+
"hardis:packageconfig:retrieve:org",
|
|
8276
|
+
"packageconfig:hardis:retrieve:org",
|
|
8277
|
+
"packageconfig:retrieve:hardis:org",
|
|
8278
|
+
"packageconfig:retrieve:org:hardis"
|
|
8279
|
+
]
|
|
8280
|
+
},
|
|
8174
8281
|
"hardis:org:refresh:after-refresh": {
|
|
8175
8282
|
"aliases": [],
|
|
8176
8283
|
"args": {},
|
|
@@ -8410,113 +8517,6 @@
|
|
|
8410
8517
|
"before-refresh:refresh:org:hardis"
|
|
8411
8518
|
]
|
|
8412
8519
|
},
|
|
8413
|
-
"hardis:org:retrieve:packageconfig": {
|
|
8414
|
-
"aliases": [],
|
|
8415
|
-
"args": {},
|
|
8416
|
-
"description": "\n**Retrieves the installed package configuration from a Salesforce org and optionally updates the local project configuration.**\n\nThis command is useful for maintaining an accurate record of installed packages within your Salesforce project, which is crucial for managing dependencies and ensuring consistent deployments across environments.\n\nKey functionalities:\n\n- **Package Listing:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a list of all installed packages.\n- **Configuration Update:** Offers the option to update your local project's configuration with the retrieved list of installed packages. This can be beneficial for automating package installations during environment setup or CI/CD processes.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Org Connection:** It establishes a connection to the target Salesforce org using the provided or prompted username.\n- **Metadata Retrieval:** It utilizes `MetadataUtils.listInstalledPackages` to query the Salesforce org and obtain details about the installed packages.\n- **Interactive Prompt:** It uses the `prompts` library to ask the user whether they want to update their local project configuration with the retrieved package list.\n- **Configuration Management:** If the user confirms, it calls `managePackageConfig` to update the project's configuration file (likely `.sfdx-hardis.yml`) with the new package information.\n- **User Feedback:** Provides clear messages to the user about the success of the package retrieval and configuration update.\n</details>\n",
|
|
8417
|
-
"examples": [
|
|
8418
|
-
"$ sf hardis:org:retrieve:packageconfig",
|
|
8419
|
-
"sf hardis:org:retrieve:packageconfig -u myOrg"
|
|
8420
|
-
],
|
|
8421
|
-
"flags": {
|
|
8422
|
-
"json": {
|
|
8423
|
-
"description": "Format output as json.",
|
|
8424
|
-
"helpGroup": "GLOBAL",
|
|
8425
|
-
"name": "json",
|
|
8426
|
-
"allowNo": false,
|
|
8427
|
-
"type": "boolean"
|
|
8428
|
-
},
|
|
8429
|
-
"flags-dir": {
|
|
8430
|
-
"helpGroup": "GLOBAL",
|
|
8431
|
-
"name": "flags-dir",
|
|
8432
|
-
"summary": "Import flag values from a directory.",
|
|
8433
|
-
"hasDynamicHelp": false,
|
|
8434
|
-
"multiple": false,
|
|
8435
|
-
"type": "option"
|
|
8436
|
-
},
|
|
8437
|
-
"debug": {
|
|
8438
|
-
"char": "d",
|
|
8439
|
-
"description": "Activate debug mode (more logs)",
|
|
8440
|
-
"name": "debug",
|
|
8441
|
-
"allowNo": false,
|
|
8442
|
-
"type": "boolean"
|
|
8443
|
-
},
|
|
8444
|
-
"websocket": {
|
|
8445
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8446
|
-
"name": "websocket",
|
|
8447
|
-
"hasDynamicHelp": false,
|
|
8448
|
-
"multiple": false,
|
|
8449
|
-
"type": "option"
|
|
8450
|
-
},
|
|
8451
|
-
"skipauth": {
|
|
8452
|
-
"description": "Skip authentication check when a default username is required",
|
|
8453
|
-
"name": "skipauth",
|
|
8454
|
-
"allowNo": false,
|
|
8455
|
-
"type": "boolean"
|
|
8456
|
-
},
|
|
8457
|
-
"target-org": {
|
|
8458
|
-
"aliases": [
|
|
8459
|
-
"targetusername",
|
|
8460
|
-
"u"
|
|
8461
|
-
],
|
|
8462
|
-
"char": "o",
|
|
8463
|
-
"deprecateAliases": true,
|
|
8464
|
-
"name": "target-org",
|
|
8465
|
-
"noCacheDefault": true,
|
|
8466
|
-
"required": true,
|
|
8467
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8468
|
-
"hasDynamicHelp": true,
|
|
8469
|
-
"multiple": false,
|
|
8470
|
-
"type": "option"
|
|
8471
|
-
}
|
|
8472
|
-
},
|
|
8473
|
-
"hasDynamicHelp": true,
|
|
8474
|
-
"hiddenAliases": [],
|
|
8475
|
-
"id": "hardis:org:retrieve:packageconfig",
|
|
8476
|
-
"pluginAlias": "sfdx-hardis",
|
|
8477
|
-
"pluginName": "sfdx-hardis",
|
|
8478
|
-
"pluginType": "core",
|
|
8479
|
-
"strict": true,
|
|
8480
|
-
"enableJsonFlag": true,
|
|
8481
|
-
"title": "Retrieve package configuration from an org",
|
|
8482
|
-
"requiresProject": false,
|
|
8483
|
-
"isESM": true,
|
|
8484
|
-
"relativePath": [
|
|
8485
|
-
"lib",
|
|
8486
|
-
"commands",
|
|
8487
|
-
"hardis",
|
|
8488
|
-
"org",
|
|
8489
|
-
"retrieve",
|
|
8490
|
-
"packageconfig.js"
|
|
8491
|
-
],
|
|
8492
|
-
"aliasPermutations": [],
|
|
8493
|
-
"permutations": [
|
|
8494
|
-
"hardis:org:retrieve:packageconfig",
|
|
8495
|
-
"org:hardis:retrieve:packageconfig",
|
|
8496
|
-
"org:retrieve:hardis:packageconfig",
|
|
8497
|
-
"org:retrieve:packageconfig:hardis",
|
|
8498
|
-
"hardis:retrieve:org:packageconfig",
|
|
8499
|
-
"retrieve:hardis:org:packageconfig",
|
|
8500
|
-
"retrieve:org:hardis:packageconfig",
|
|
8501
|
-
"retrieve:org:packageconfig:hardis",
|
|
8502
|
-
"hardis:retrieve:packageconfig:org",
|
|
8503
|
-
"retrieve:hardis:packageconfig:org",
|
|
8504
|
-
"retrieve:packageconfig:hardis:org",
|
|
8505
|
-
"retrieve:packageconfig:org:hardis",
|
|
8506
|
-
"hardis:org:packageconfig:retrieve",
|
|
8507
|
-
"org:hardis:packageconfig:retrieve",
|
|
8508
|
-
"org:packageconfig:hardis:retrieve",
|
|
8509
|
-
"org:packageconfig:retrieve:hardis",
|
|
8510
|
-
"hardis:packageconfig:org:retrieve",
|
|
8511
|
-
"packageconfig:hardis:org:retrieve",
|
|
8512
|
-
"packageconfig:org:hardis:retrieve",
|
|
8513
|
-
"packageconfig:org:retrieve:hardis",
|
|
8514
|
-
"hardis:packageconfig:retrieve:org",
|
|
8515
|
-
"packageconfig:hardis:retrieve:org",
|
|
8516
|
-
"packageconfig:retrieve:hardis:org",
|
|
8517
|
-
"packageconfig:retrieve:org:hardis"
|
|
8518
|
-
]
|
|
8519
|
-
},
|
|
8520
8520
|
"hardis:org:test:apex": {
|
|
8521
8521
|
"aliases": [],
|
|
8522
8522
|
"args": {},
|
|
@@ -15484,5 +15484,5 @@
|
|
|
15484
15484
|
]
|
|
15485
15485
|
}
|
|
15486
15486
|
},
|
|
15487
|
-
"version": "6.10.0"
|
|
15487
|
+
"version": "6.10.1-alpha202511021135.0"
|
|
15488
15488
|
}
|