sfdx-hardis 6.10.0 → 6.10.1-alpha202511021043.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 +48 -29
- 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 +299 -0
- package/lib/common/utils/prePostCommandUtils.js.map +1 -0
- package/oclif.lock +17 -17
- package/oclif.manifest.json +1384 -1384
- 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
|
],
|
|
@@ -4422,6 +4422,135 @@
|
|
|
4422
4422
|
"ws:work:hardis"
|
|
4423
4423
|
]
|
|
4424
4424
|
},
|
|
4425
|
+
"hardis:git:pull-requests:extract": {
|
|
4426
|
+
"aliases": [],
|
|
4427
|
+
"args": {},
|
|
4428
|
+
"description": "\n## Command Behavior\n\n**Extracts pull request information from your Git server based on specified filtering criteria.**\n\nThis command provides a powerful way to query and retrieve details about pull requests (or merge requests, depending on your Git provider) in your repository. It's highly useful for reporting, auditing, and analyzing development workflows.\n\nKey functionalities include:\n\n- **Target Branch Filtering:** You can filter pull requests by their target branch using the `--target-branch` flag. If not specified, the command will prompt you to select one.\n- **Status Filtering:** Filter pull requests by their status: `open`, `merged`, or `abandoned` using the `--status` flag. An interactive prompt is provided if no status is specified.\n- **Minimum Date Filtering:** Use the `--min-date` flag to retrieve pull requests created or updated after a specific date.\n- **CSV Output:** The extracted pull request data is generated into a CSV file, which can be used for further analysis in spreadsheet software.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves interacting with a Git provider's API:\n\n- **Git Provider Abstraction:** It uses the `GitProvider.getInstance(true)` to abstract away the specifics of different Git platforms (e.g., GitHub, GitLab, Azure DevOps). This ensures the command can work across various environments.\n- **API Calls:** The `gitProvider.listPullRequests()` method is called with a `prConstraint` object that encapsulates the filtering criteria (target branch, minimum date, status).\n- **Interactive Prompts:** The `prompts` library is used to interactively gather input from the user for the target branch and pull request status if they are not provided as command-line flags.\n- **Date Handling:** The `moment` library is used to parse and handle date inputs for the `--min-date` flag.\n- **CSV Generation:** The `generateCsvFile` utility is responsible for converting the retrieved pull request data into a CSV format, and `generateReportPath` determines the output file location.\n- **Error Handling:** It includes error handling for cases where a Git provider cannot be identified.\n</details>\n",
|
|
4429
|
+
"examples": [
|
|
4430
|
+
"$ sf hardis:git:pull-requests:extract",
|
|
4431
|
+
"$ sf hardis:git:pull-requests:extract --target-branch main --status merged"
|
|
4432
|
+
],
|
|
4433
|
+
"flags": {
|
|
4434
|
+
"json": {
|
|
4435
|
+
"description": "Format output as json.",
|
|
4436
|
+
"helpGroup": "GLOBAL",
|
|
4437
|
+
"name": "json",
|
|
4438
|
+
"allowNo": false,
|
|
4439
|
+
"type": "boolean"
|
|
4440
|
+
},
|
|
4441
|
+
"flags-dir": {
|
|
4442
|
+
"helpGroup": "GLOBAL",
|
|
4443
|
+
"name": "flags-dir",
|
|
4444
|
+
"summary": "Import flag values from a directory.",
|
|
4445
|
+
"hasDynamicHelp": false,
|
|
4446
|
+
"multiple": false,
|
|
4447
|
+
"type": "option"
|
|
4448
|
+
},
|
|
4449
|
+
"target-branch": {
|
|
4450
|
+
"char": "t",
|
|
4451
|
+
"description": "Target branch of PRs",
|
|
4452
|
+
"name": "target-branch",
|
|
4453
|
+
"hasDynamicHelp": false,
|
|
4454
|
+
"multiple": false,
|
|
4455
|
+
"type": "option"
|
|
4456
|
+
},
|
|
4457
|
+
"status": {
|
|
4458
|
+
"char": "x",
|
|
4459
|
+
"description": "Status of the PR",
|
|
4460
|
+
"name": "status",
|
|
4461
|
+
"hasDynamicHelp": false,
|
|
4462
|
+
"multiple": false,
|
|
4463
|
+
"options": [
|
|
4464
|
+
"open",
|
|
4465
|
+
"merged",
|
|
4466
|
+
"abandoned"
|
|
4467
|
+
],
|
|
4468
|
+
"type": "option"
|
|
4469
|
+
},
|
|
4470
|
+
"min-date": {
|
|
4471
|
+
"char": "m",
|
|
4472
|
+
"description": "Minimum date for PR",
|
|
4473
|
+
"name": "min-date",
|
|
4474
|
+
"hasDynamicHelp": false,
|
|
4475
|
+
"multiple": false,
|
|
4476
|
+
"type": "option"
|
|
4477
|
+
},
|
|
4478
|
+
"outputfile": {
|
|
4479
|
+
"char": "f",
|
|
4480
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
4481
|
+
"name": "outputfile",
|
|
4482
|
+
"hasDynamicHelp": false,
|
|
4483
|
+
"multiple": false,
|
|
4484
|
+
"type": "option"
|
|
4485
|
+
},
|
|
4486
|
+
"debug": {
|
|
4487
|
+
"char": "d",
|
|
4488
|
+
"description": "Activate debug mode (more logs)",
|
|
4489
|
+
"name": "debug",
|
|
4490
|
+
"allowNo": false,
|
|
4491
|
+
"type": "boolean"
|
|
4492
|
+
},
|
|
4493
|
+
"websocket": {
|
|
4494
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
4495
|
+
"name": "websocket",
|
|
4496
|
+
"hasDynamicHelp": false,
|
|
4497
|
+
"multiple": false,
|
|
4498
|
+
"type": "option"
|
|
4499
|
+
},
|
|
4500
|
+
"skipauth": {
|
|
4501
|
+
"description": "Skip authentication check when a default username is required",
|
|
4502
|
+
"name": "skipauth",
|
|
4503
|
+
"allowNo": false,
|
|
4504
|
+
"type": "boolean"
|
|
4505
|
+
}
|
|
4506
|
+
},
|
|
4507
|
+
"hasDynamicHelp": false,
|
|
4508
|
+
"hiddenAliases": [],
|
|
4509
|
+
"id": "hardis:git:pull-requests:extract",
|
|
4510
|
+
"pluginAlias": "sfdx-hardis",
|
|
4511
|
+
"pluginName": "sfdx-hardis",
|
|
4512
|
+
"pluginType": "core",
|
|
4513
|
+
"strict": true,
|
|
4514
|
+
"enableJsonFlag": true,
|
|
4515
|
+
"title": "Extract pull requests",
|
|
4516
|
+
"requiresProject": true,
|
|
4517
|
+
"isESM": true,
|
|
4518
|
+
"relativePath": [
|
|
4519
|
+
"lib",
|
|
4520
|
+
"commands",
|
|
4521
|
+
"hardis",
|
|
4522
|
+
"git",
|
|
4523
|
+
"pull-requests",
|
|
4524
|
+
"extract.js"
|
|
4525
|
+
],
|
|
4526
|
+
"aliasPermutations": [],
|
|
4527
|
+
"permutations": [
|
|
4528
|
+
"hardis:git:pull-requests:extract",
|
|
4529
|
+
"git:hardis:pull-requests:extract",
|
|
4530
|
+
"git:pull-requests:hardis:extract",
|
|
4531
|
+
"git:pull-requests:extract:hardis",
|
|
4532
|
+
"hardis:pull-requests:git:extract",
|
|
4533
|
+
"pull-requests:hardis:git:extract",
|
|
4534
|
+
"pull-requests:git:hardis:extract",
|
|
4535
|
+
"pull-requests:git:extract:hardis",
|
|
4536
|
+
"hardis:pull-requests:extract:git",
|
|
4537
|
+
"pull-requests:hardis:extract:git",
|
|
4538
|
+
"pull-requests:extract:hardis:git",
|
|
4539
|
+
"pull-requests:extract:git:hardis",
|
|
4540
|
+
"hardis:git:extract:pull-requests",
|
|
4541
|
+
"git:hardis:extract:pull-requests",
|
|
4542
|
+
"git:extract:hardis:pull-requests",
|
|
4543
|
+
"git:extract:pull-requests:hardis",
|
|
4544
|
+
"hardis:extract:git:pull-requests",
|
|
4545
|
+
"extract:hardis:git:pull-requests",
|
|
4546
|
+
"extract:git:hardis:pull-requests",
|
|
4547
|
+
"extract:git:pull-requests:hardis",
|
|
4548
|
+
"hardis:extract:pull-requests:git",
|
|
4549
|
+
"extract:hardis:pull-requests:git",
|
|
4550
|
+
"extract:pull-requests:hardis:git",
|
|
4551
|
+
"extract:pull-requests:git:hardis"
|
|
4552
|
+
]
|
|
4553
|
+
},
|
|
4425
4554
|
"hardis:doc:extract:permsetgroups": {
|
|
4426
4555
|
"aliases": [],
|
|
4427
4556
|
"args": {},
|
|
@@ -4612,252 +4741,12 @@
|
|
|
4612
4741
|
"generate:plugin:doc:hardis"
|
|
4613
4742
|
]
|
|
4614
4743
|
},
|
|
4615
|
-
"hardis:
|
|
4744
|
+
"hardis:org:configure:data": {
|
|
4616
4745
|
"aliases": [],
|
|
4617
4746
|
"args": {},
|
|
4618
|
-
"description": "\n## Command Behavior\n\n**
|
|
4747
|
+
"description": "\n## Command Behavior\n\n**Configures a Salesforce Data Migration Utility (SFDMU) project for data export and import operations.**\n\nThis command assists in setting up SFDMU workspaces, which are essential for managing data within your Salesforce environments. It streamlines the creation of `export.json` files and related configurations, enabling efficient data seeding, migration, and synchronization.\n\nKey functionalities:\n\n- **Template-Based Configuration:** Allows you to choose from predefined SFDMU templates or start with a blank configuration. Templates can pre-populate `export.json` with common data migration scenarios.\n- **Interactive Setup:** Guides you through the process of defining the SFDMU project folder name, label, and description.\n- **`export.json` Generation:** Creates the `export.json` file, which is the core configuration file for SFDMU, defining objects to export/import, queries, and operations.\n- **Additional File Generation:** Can generate additional configuration files, such as a `badwords.json` file for data filtering scenarios.\n- **Scratch Org Integration:** Offers to automatically configure the SFDMU project to be used for data import when initializing a new scratch org, ensuring consistent test data across development environments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-detect-bad-words-in-salesforce-records-using-sfdx-data-loader-and-sfdx-hardis-171db40a9bac)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SFDMU Integration:** It acts as a setup wizard for SFDMU, generating the necessary configuration files that the `sfdmu` plugin consumes.\n- **Interactive Prompts:** Uses the `prompts` library to gather user input for various configuration parameters, such as the data path, label, and description.\n- **File System Operations:** Employs `fs-extra` to create directories (e.g., `data/your-project-name/`) and write the `export.json` and any additional configuration files.\n- **JSON Manipulation:** Constructs the `export.json` content dynamically based on user input and selected templates, including defining objects, queries, and operations.\n- **PascalCase Conversion:** Uses `pascalcase` to format the SFDMU folder name consistently.\n- **Configuration Persistence:** Updates the project's `sfdx-hardis.yml` file (via `setConfig`) to include the newly configured data package if it's intended for scratch org initialization.\n- **WebSocket Communication:** Uses `WebSocketClient.requestOpenFile` to open the generated `export.json` file in VS Code, facilitating immediate configuration.\n- **Required Plugin Check:** Explicitly lists `sfdmu` as a required plugin, ensuring the necessary dependency is present.\n</details>\n",
|
|
4619
4748
|
"examples": [
|
|
4620
|
-
"$ sf hardis:
|
|
4621
|
-
"$ sf hardis:git:pull-requests:extract --target-branch main --status merged"
|
|
4622
|
-
],
|
|
4623
|
-
"flags": {
|
|
4624
|
-
"json": {
|
|
4625
|
-
"description": "Format output as json.",
|
|
4626
|
-
"helpGroup": "GLOBAL",
|
|
4627
|
-
"name": "json",
|
|
4628
|
-
"allowNo": false,
|
|
4629
|
-
"type": "boolean"
|
|
4630
|
-
},
|
|
4631
|
-
"flags-dir": {
|
|
4632
|
-
"helpGroup": "GLOBAL",
|
|
4633
|
-
"name": "flags-dir",
|
|
4634
|
-
"summary": "Import flag values from a directory.",
|
|
4635
|
-
"hasDynamicHelp": false,
|
|
4636
|
-
"multiple": false,
|
|
4637
|
-
"type": "option"
|
|
4638
|
-
},
|
|
4639
|
-
"target-branch": {
|
|
4640
|
-
"char": "t",
|
|
4641
|
-
"description": "Target branch of PRs",
|
|
4642
|
-
"name": "target-branch",
|
|
4643
|
-
"hasDynamicHelp": false,
|
|
4644
|
-
"multiple": false,
|
|
4645
|
-
"type": "option"
|
|
4646
|
-
},
|
|
4647
|
-
"status": {
|
|
4648
|
-
"char": "x",
|
|
4649
|
-
"description": "Status of the PR",
|
|
4650
|
-
"name": "status",
|
|
4651
|
-
"hasDynamicHelp": false,
|
|
4652
|
-
"multiple": false,
|
|
4653
|
-
"options": [
|
|
4654
|
-
"open",
|
|
4655
|
-
"merged",
|
|
4656
|
-
"abandoned"
|
|
4657
|
-
],
|
|
4658
|
-
"type": "option"
|
|
4659
|
-
},
|
|
4660
|
-
"min-date": {
|
|
4661
|
-
"char": "m",
|
|
4662
|
-
"description": "Minimum date for PR",
|
|
4663
|
-
"name": "min-date",
|
|
4664
|
-
"hasDynamicHelp": false,
|
|
4665
|
-
"multiple": false,
|
|
4666
|
-
"type": "option"
|
|
4667
|
-
},
|
|
4668
|
-
"outputfile": {
|
|
4669
|
-
"char": "f",
|
|
4670
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
4671
|
-
"name": "outputfile",
|
|
4672
|
-
"hasDynamicHelp": false,
|
|
4673
|
-
"multiple": false,
|
|
4674
|
-
"type": "option"
|
|
4675
|
-
},
|
|
4676
|
-
"debug": {
|
|
4677
|
-
"char": "d",
|
|
4678
|
-
"description": "Activate debug mode (more logs)",
|
|
4679
|
-
"name": "debug",
|
|
4680
|
-
"allowNo": false,
|
|
4681
|
-
"type": "boolean"
|
|
4682
|
-
},
|
|
4683
|
-
"websocket": {
|
|
4684
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
4685
|
-
"name": "websocket",
|
|
4686
|
-
"hasDynamicHelp": false,
|
|
4687
|
-
"multiple": false,
|
|
4688
|
-
"type": "option"
|
|
4689
|
-
},
|
|
4690
|
-
"skipauth": {
|
|
4691
|
-
"description": "Skip authentication check when a default username is required",
|
|
4692
|
-
"name": "skipauth",
|
|
4693
|
-
"allowNo": false,
|
|
4694
|
-
"type": "boolean"
|
|
4695
|
-
}
|
|
4696
|
-
},
|
|
4697
|
-
"hasDynamicHelp": false,
|
|
4698
|
-
"hiddenAliases": [],
|
|
4699
|
-
"id": "hardis:git:pull-requests:extract",
|
|
4700
|
-
"pluginAlias": "sfdx-hardis",
|
|
4701
|
-
"pluginName": "sfdx-hardis",
|
|
4702
|
-
"pluginType": "core",
|
|
4703
|
-
"strict": true,
|
|
4704
|
-
"enableJsonFlag": true,
|
|
4705
|
-
"title": "Extract pull requests",
|
|
4706
|
-
"requiresProject": true,
|
|
4707
|
-
"isESM": true,
|
|
4708
|
-
"relativePath": [
|
|
4709
|
-
"lib",
|
|
4710
|
-
"commands",
|
|
4711
|
-
"hardis",
|
|
4712
|
-
"git",
|
|
4713
|
-
"pull-requests",
|
|
4714
|
-
"extract.js"
|
|
4715
|
-
],
|
|
4716
|
-
"aliasPermutations": [],
|
|
4717
|
-
"permutations": [
|
|
4718
|
-
"hardis:git:pull-requests:extract",
|
|
4719
|
-
"git:hardis:pull-requests:extract",
|
|
4720
|
-
"git:pull-requests:hardis:extract",
|
|
4721
|
-
"git:pull-requests:extract:hardis",
|
|
4722
|
-
"hardis:pull-requests:git:extract",
|
|
4723
|
-
"pull-requests:hardis:git:extract",
|
|
4724
|
-
"pull-requests:git:hardis:extract",
|
|
4725
|
-
"pull-requests:git:extract:hardis",
|
|
4726
|
-
"hardis:pull-requests:extract:git",
|
|
4727
|
-
"pull-requests:hardis:extract:git",
|
|
4728
|
-
"pull-requests:extract:hardis:git",
|
|
4729
|
-
"pull-requests:extract:git:hardis",
|
|
4730
|
-
"hardis:git:extract:pull-requests",
|
|
4731
|
-
"git:hardis:extract:pull-requests",
|
|
4732
|
-
"git:extract:hardis:pull-requests",
|
|
4733
|
-
"git:extract:pull-requests:hardis",
|
|
4734
|
-
"hardis:extract:git:pull-requests",
|
|
4735
|
-
"extract:hardis:git:pull-requests",
|
|
4736
|
-
"extract:git:hardis:pull-requests",
|
|
4737
|
-
"extract:git:pull-requests:hardis",
|
|
4738
|
-
"hardis:extract:pull-requests:git",
|
|
4739
|
-
"extract:hardis:pull-requests:git",
|
|
4740
|
-
"extract:pull-requests:hardis:git",
|
|
4741
|
-
"extract:pull-requests:git:hardis"
|
|
4742
|
-
]
|
|
4743
|
-
},
|
|
4744
|
-
"hardis:org:community:update": {
|
|
4745
|
-
"aliases": [],
|
|
4746
|
-
"args": {},
|
|
4747
|
-
"description": "\n## Command Behavior\n\n**Updates the status of one or more Salesforce Experience Cloud (Community) networks.**\n\nThis command provides a way to programmatically change the status of your Salesforce Communities, allowing you to manage their availability. This is particularly useful for:\n\n- **Maintenance:** Taking communities offline for planned maintenance (`DownForMaintenance`).\n- **Activation/Deactivation:** Bringing communities online or offline (`Live`, `DownForMaintenance`).\n- **Automation:** Integrating community status changes into CI/CD pipelines or scheduled jobs.\n\nKey functionalities:\n\n- **Network Selection:** You can specify one or more community network names (separated by commas) using the `--name` flag.\n- **Status Update:** You can set the new status for the selected communities using the `--status` flag. Supported values are `Live` and `DownForMaintenance`.\n- **Confirmation Prompt:** In non-CI environments, it provides a confirmation prompt before executing the update, ensuring intentional changes.\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 Salesforce `Network` object using SOQL to retrieve the `Id`, `Name`, and `Status` of the specified communities. This ensures that only existing communities are targeted.\n- **SObject Update:** It then constructs an array of `Network` sObjects with their `Id` and the new `Status` and performs a DML update operation using `conn.sobject(\"Network\").update()`. The `allOrNone: false` option is used to allow partial success in case some updates fail.\n- **Error Handling and Reporting:** It iterates through the update results, logging success or failure for each community. It also provides a summary of successful and erroneous updates.\n- **User Interaction:** Uses `prompts` to confirm the update action with the user when not running in a CI environment.\n- **Salesforce Connection:** Establishes a connection to the target Salesforce org using the `target-org` flag.\n</details>\n",
|
|
4748
|
-
"examples": [
|
|
4749
|
-
"$ sf hardis:org:community:update --name 'MyNetworkName' --status DownForMaintenance",
|
|
4750
|
-
"$ sf hardis:org:community:update --name 'MyNetworkName,MySecondNetworkName' --status Live"
|
|
4751
|
-
],
|
|
4752
|
-
"flags": {
|
|
4753
|
-
"json": {
|
|
4754
|
-
"description": "Format output as json.",
|
|
4755
|
-
"helpGroup": "GLOBAL",
|
|
4756
|
-
"name": "json",
|
|
4757
|
-
"allowNo": false,
|
|
4758
|
-
"type": "boolean"
|
|
4759
|
-
},
|
|
4760
|
-
"flags-dir": {
|
|
4761
|
-
"helpGroup": "GLOBAL",
|
|
4762
|
-
"name": "flags-dir",
|
|
4763
|
-
"summary": "Import flag values from a directory.",
|
|
4764
|
-
"hasDynamicHelp": false,
|
|
4765
|
-
"multiple": false,
|
|
4766
|
-
"type": "option"
|
|
4767
|
-
},
|
|
4768
|
-
"name": {
|
|
4769
|
-
"char": "n",
|
|
4770
|
-
"description": "List of Networks Names that you want to update, separated by comma",
|
|
4771
|
-
"name": "name",
|
|
4772
|
-
"required": true,
|
|
4773
|
-
"hasDynamicHelp": false,
|
|
4774
|
-
"multiple": false,
|
|
4775
|
-
"type": "option"
|
|
4776
|
-
},
|
|
4777
|
-
"status": {
|
|
4778
|
-
"char": "s",
|
|
4779
|
-
"description": "New status for the community, available values are: Live, DownForMaintenance",
|
|
4780
|
-
"name": "status",
|
|
4781
|
-
"required": true,
|
|
4782
|
-
"hasDynamicHelp": false,
|
|
4783
|
-
"multiple": false,
|
|
4784
|
-
"type": "option"
|
|
4785
|
-
},
|
|
4786
|
-
"debug": {
|
|
4787
|
-
"char": "d",
|
|
4788
|
-
"description": "Activate debug mode (more logs)",
|
|
4789
|
-
"name": "debug",
|
|
4790
|
-
"allowNo": false,
|
|
4791
|
-
"type": "boolean"
|
|
4792
|
-
},
|
|
4793
|
-
"target-org": {
|
|
4794
|
-
"aliases": [
|
|
4795
|
-
"targetusername",
|
|
4796
|
-
"u"
|
|
4797
|
-
],
|
|
4798
|
-
"char": "o",
|
|
4799
|
-
"deprecateAliases": true,
|
|
4800
|
-
"name": "target-org",
|
|
4801
|
-
"noCacheDefault": true,
|
|
4802
|
-
"required": true,
|
|
4803
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
4804
|
-
"hasDynamicHelp": true,
|
|
4805
|
-
"multiple": false,
|
|
4806
|
-
"type": "option"
|
|
4807
|
-
}
|
|
4808
|
-
},
|
|
4809
|
-
"hasDynamicHelp": true,
|
|
4810
|
-
"hiddenAliases": [],
|
|
4811
|
-
"id": "hardis:org:community:update",
|
|
4812
|
-
"pluginAlias": "sfdx-hardis",
|
|
4813
|
-
"pluginName": "sfdx-hardis",
|
|
4814
|
-
"pluginType": "core",
|
|
4815
|
-
"strict": true,
|
|
4816
|
-
"summary": "Update a community status.",
|
|
4817
|
-
"enableJsonFlag": true,
|
|
4818
|
-
"isESM": true,
|
|
4819
|
-
"relativePath": [
|
|
4820
|
-
"lib",
|
|
4821
|
-
"commands",
|
|
4822
|
-
"hardis",
|
|
4823
|
-
"org",
|
|
4824
|
-
"community",
|
|
4825
|
-
"update.js"
|
|
4826
|
-
],
|
|
4827
|
-
"aliasPermutations": [],
|
|
4828
|
-
"permutations": [
|
|
4829
|
-
"hardis:org:community:update",
|
|
4830
|
-
"org:hardis:community:update",
|
|
4831
|
-
"org:community:hardis:update",
|
|
4832
|
-
"org:community:update:hardis",
|
|
4833
|
-
"hardis:community:org:update",
|
|
4834
|
-
"community:hardis:org:update",
|
|
4835
|
-
"community:org:hardis:update",
|
|
4836
|
-
"community:org:update:hardis",
|
|
4837
|
-
"hardis:community:update:org",
|
|
4838
|
-
"community:hardis:update:org",
|
|
4839
|
-
"community:update:hardis:org",
|
|
4840
|
-
"community:update:org:hardis",
|
|
4841
|
-
"hardis:org:update:community",
|
|
4842
|
-
"org:hardis:update:community",
|
|
4843
|
-
"org:update:hardis:community",
|
|
4844
|
-
"org:update:community:hardis",
|
|
4845
|
-
"hardis:update:org:community",
|
|
4846
|
-
"update:hardis:org:community",
|
|
4847
|
-
"update:org:hardis:community",
|
|
4848
|
-
"update:org:community:hardis",
|
|
4849
|
-
"hardis:update:community:org",
|
|
4850
|
-
"update:hardis:community:org",
|
|
4851
|
-
"update:community:hardis:org",
|
|
4852
|
-
"update:community:org:hardis"
|
|
4853
|
-
]
|
|
4854
|
-
},
|
|
4855
|
-
"hardis:org:configure:data": {
|
|
4856
|
-
"aliases": [],
|
|
4857
|
-
"args": {},
|
|
4858
|
-
"description": "\n## Command Behavior\n\n**Configures a Salesforce Data Migration Utility (SFDMU) project for data export and import operations.**\n\nThis command assists in setting up SFDMU workspaces, which are essential for managing data within your Salesforce environments. It streamlines the creation of `export.json` files and related configurations, enabling efficient data seeding, migration, and synchronization.\n\nKey functionalities:\n\n- **Template-Based Configuration:** Allows you to choose from predefined SFDMU templates or start with a blank configuration. Templates can pre-populate `export.json` with common data migration scenarios.\n- **Interactive Setup:** Guides you through the process of defining the SFDMU project folder name, label, and description.\n- **`export.json` Generation:** Creates the `export.json` file, which is the core configuration file for SFDMU, defining objects to export/import, queries, and operations.\n- **Additional File Generation:** Can generate additional configuration files, such as a `badwords.json` file for data filtering scenarios.\n- **Scratch Org Integration:** Offers to automatically configure the SFDMU project to be used for data import when initializing a new scratch org, ensuring consistent test data across development environments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-detect-bad-words-in-salesforce-records-using-sfdx-data-loader-and-sfdx-hardis-171db40a9bac)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SFDMU Integration:** It acts as a setup wizard for SFDMU, generating the necessary configuration files that the `sfdmu` plugin consumes.\n- **Interactive Prompts:** Uses the `prompts` library to gather user input for various configuration parameters, such as the data path, label, and description.\n- **File System Operations:** Employs `fs-extra` to create directories (e.g., `data/your-project-name/`) and write the `export.json` and any additional configuration files.\n- **JSON Manipulation:** Constructs the `export.json` content dynamically based on user input and selected templates, including defining objects, queries, and operations.\n- **PascalCase Conversion:** Uses `pascalcase` to format the SFDMU folder name consistently.\n- **Configuration Persistence:** Updates the project's `sfdx-hardis.yml` file (via `setConfig`) to include the newly configured data package if it's intended for scratch org initialization.\n- **WebSocket Communication:** Uses `WebSocketClient.requestOpenFile` to open the generated `export.json` file in VS Code, facilitating immediate configuration.\n- **Required Plugin Check:** Explicitly lists `sfdmu` as a required plugin, ensuring the necessary dependency is present.\n</details>\n",
|
|
4859
|
-
"examples": [
|
|
4860
|
-
"$ sf hardis:org:configure:data"
|
|
4749
|
+
"$ sf hardis:org:configure:data"
|
|
4861
4750
|
],
|
|
4862
4751
|
"flags": {
|
|
4863
4752
|
"json": {
|
|
@@ -5153,12 +5042,13 @@
|
|
|
5153
5042
|
"monitoring:configure:org:hardis"
|
|
5154
5043
|
]
|
|
5155
5044
|
},
|
|
5156
|
-
"hardis:org:
|
|
5045
|
+
"hardis:org:community:update": {
|
|
5157
5046
|
"aliases": [],
|
|
5158
5047
|
"args": {},
|
|
5159
|
-
"description": "\n## Command Behavior\n\n**
|
|
5048
|
+
"description": "\n## Command Behavior\n\n**Updates the status of one or more Salesforce Experience Cloud (Community) networks.**\n\nThis command provides a way to programmatically change the status of your Salesforce Communities, allowing you to manage their availability. This is particularly useful for:\n\n- **Maintenance:** Taking communities offline for planned maintenance (`DownForMaintenance`).\n- **Activation/Deactivation:** Bringing communities online or offline (`Live`, `DownForMaintenance`).\n- **Automation:** Integrating community status changes into CI/CD pipelines or scheduled jobs.\n\nKey functionalities:\n\n- **Network Selection:** You can specify one or more community network names (separated by commas) using the `--name` flag.\n- **Status Update:** You can set the new status for the selected communities using the `--status` flag. Supported values are `Live` and `DownForMaintenance`.\n- **Confirmation Prompt:** In non-CI environments, it provides a confirmation prompt before executing the update, ensuring intentional changes.\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 Salesforce `Network` object using SOQL to retrieve the `Id`, `Name`, and `Status` of the specified communities. This ensures that only existing communities are targeted.\n- **SObject Update:** It then constructs an array of `Network` sObjects with their `Id` and the new `Status` and performs a DML update operation using `conn.sobject(\"Network\").update()`. The `allOrNone: false` option is used to allow partial success in case some updates fail.\n- **Error Handling and Reporting:** It iterates through the update results, logging success or failure for each community. It also provides a summary of successful and erroneous updates.\n- **User Interaction:** Uses `prompts` to confirm the update action with the user when not running in a CI environment.\n- **Salesforce Connection:** Establishes a connection to the target Salesforce org using the `target-org` flag.\n</details>\n",
|
|
5160
5049
|
"examples": [
|
|
5161
|
-
"$ sf hardis:org:
|
|
5050
|
+
"$ sf hardis:org:community:update --name 'MyNetworkName' --status DownForMaintenance",
|
|
5051
|
+
"$ sf hardis:org:community:update --name 'MyNetworkName,MySecondNetworkName' --status Live"
|
|
5162
5052
|
],
|
|
5163
5053
|
"flags": {
|
|
5164
5054
|
"json": {
|
|
@@ -5176,10 +5066,20 @@
|
|
|
5176
5066
|
"multiple": false,
|
|
5177
5067
|
"type": "option"
|
|
5178
5068
|
},
|
|
5179
|
-
"
|
|
5180
|
-
"char": "
|
|
5181
|
-
"description": "
|
|
5182
|
-
"name": "
|
|
5069
|
+
"name": {
|
|
5070
|
+
"char": "n",
|
|
5071
|
+
"description": "List of Networks Names that you want to update, separated by comma",
|
|
5072
|
+
"name": "name",
|
|
5073
|
+
"required": true,
|
|
5074
|
+
"hasDynamicHelp": false,
|
|
5075
|
+
"multiple": false,
|
|
5076
|
+
"type": "option"
|
|
5077
|
+
},
|
|
5078
|
+
"status": {
|
|
5079
|
+
"char": "s",
|
|
5080
|
+
"description": "New status for the community, available values are: Live, DownForMaintenance",
|
|
5081
|
+
"name": "status",
|
|
5082
|
+
"required": true,
|
|
5183
5083
|
"hasDynamicHelp": false,
|
|
5184
5084
|
"multiple": false,
|
|
5185
5085
|
"type": "option"
|
|
@@ -5191,8 +5091,108 @@
|
|
|
5191
5091
|
"allowNo": false,
|
|
5192
5092
|
"type": "boolean"
|
|
5193
5093
|
},
|
|
5194
|
-
"
|
|
5195
|
-
"
|
|
5094
|
+
"target-org": {
|
|
5095
|
+
"aliases": [
|
|
5096
|
+
"targetusername",
|
|
5097
|
+
"u"
|
|
5098
|
+
],
|
|
5099
|
+
"char": "o",
|
|
5100
|
+
"deprecateAliases": true,
|
|
5101
|
+
"name": "target-org",
|
|
5102
|
+
"noCacheDefault": true,
|
|
5103
|
+
"required": true,
|
|
5104
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
5105
|
+
"hasDynamicHelp": true,
|
|
5106
|
+
"multiple": false,
|
|
5107
|
+
"type": "option"
|
|
5108
|
+
}
|
|
5109
|
+
},
|
|
5110
|
+
"hasDynamicHelp": true,
|
|
5111
|
+
"hiddenAliases": [],
|
|
5112
|
+
"id": "hardis:org:community:update",
|
|
5113
|
+
"pluginAlias": "sfdx-hardis",
|
|
5114
|
+
"pluginName": "sfdx-hardis",
|
|
5115
|
+
"pluginType": "core",
|
|
5116
|
+
"strict": true,
|
|
5117
|
+
"summary": "Update a community status.",
|
|
5118
|
+
"enableJsonFlag": true,
|
|
5119
|
+
"isESM": true,
|
|
5120
|
+
"relativePath": [
|
|
5121
|
+
"lib",
|
|
5122
|
+
"commands",
|
|
5123
|
+
"hardis",
|
|
5124
|
+
"org",
|
|
5125
|
+
"community",
|
|
5126
|
+
"update.js"
|
|
5127
|
+
],
|
|
5128
|
+
"aliasPermutations": [],
|
|
5129
|
+
"permutations": [
|
|
5130
|
+
"hardis:org:community:update",
|
|
5131
|
+
"org:hardis:community:update",
|
|
5132
|
+
"org:community:hardis:update",
|
|
5133
|
+
"org:community:update:hardis",
|
|
5134
|
+
"hardis:community:org:update",
|
|
5135
|
+
"community:hardis:org:update",
|
|
5136
|
+
"community:org:hardis:update",
|
|
5137
|
+
"community:org:update:hardis",
|
|
5138
|
+
"hardis:community:update:org",
|
|
5139
|
+
"community:hardis:update:org",
|
|
5140
|
+
"community:update:hardis:org",
|
|
5141
|
+
"community:update:org:hardis",
|
|
5142
|
+
"hardis:org:update:community",
|
|
5143
|
+
"org:hardis:update:community",
|
|
5144
|
+
"org:update:hardis:community",
|
|
5145
|
+
"org:update:community:hardis",
|
|
5146
|
+
"hardis:update:org:community",
|
|
5147
|
+
"update:hardis:org:community",
|
|
5148
|
+
"update:org:hardis:community",
|
|
5149
|
+
"update:org:community:hardis",
|
|
5150
|
+
"hardis:update:community:org",
|
|
5151
|
+
"update:hardis:community:org",
|
|
5152
|
+
"update:community:hardis:org",
|
|
5153
|
+
"update:community:org:hardis"
|
|
5154
|
+
]
|
|
5155
|
+
},
|
|
5156
|
+
"hardis:org:data:delete": {
|
|
5157
|
+
"aliases": [],
|
|
5158
|
+
"args": {},
|
|
5159
|
+
"description": "\n## Command Behavior\n\n**Deletes records in multiple Salesforce objects using an SFDMU (Salesforce Data Migration Utility) workspace.**\n\nThis command provides a powerful and controlled way to remove data from your Salesforce orgs based on configurations defined in an SFDMU workspace. It's particularly useful for:\n\n- **Data Cleanup:** Removing test data, obsolete records, or sensitive information.\n- **Environment Reset:** Preparing sandboxes for new development cycles by clearing specific data sets.\n- **Compliance:** Deleting data to meet regulatory requirements.\n\n**Important Considerations for Production Environments:**\n\nIf you intend to run this command in a production environment, you must:\n\n- Set `runnableInProduction` to `true` in your `export.json` file within the SFDMU workspace.\n- Define `sfdmuCanModify: YOUR_INSTANCE_URL` in your branch-specific configuration file (e.g., `config/branches/.sfdx-hardis.YOUR_BRANCH.yml`) to explicitly authorize data modification for that instance.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation relies heavily on the SFDMU plugin:\n\n- **SFDMU Integration:** It leverages the `sfdmu` plugin to perform the actual data deletion operations. The command acts as a wrapper, providing an assisted interface for SFDMU execution.\n- **Workspace Selection:** If the SFDMU workspace path is not provided via the `--path` flag, it interactively prompts the user to select a data workspace using `selectDataWorkspace`.\n- **Org Selection:** It ensures that a target Salesforce org is selected (either via the `--target-org` flag or through an interactive prompt using `promptOrgUsernameDefault`) to specify where the data deletion will occur.\n- **`deleteData` Utility:** The core logic for executing the SFDMU deletion process is encapsulated within the `deleteData` utility function, which takes the SFDMU workspace path and the target username as arguments.\n- **Environment Awareness:** It checks the `isCI` flag to determine whether to run in an interactive mode (prompting for user input) or a non-interactive mode (relying solely on command-line flags).\n- **Required Plugin:** It explicitly lists `sfdmu` as a required plugin, ensuring that the necessary dependency is in place before execution.\n</details>\n",
|
|
5160
|
+
"examples": [
|
|
5161
|
+
"$ sf hardis:org:data:delete"
|
|
5162
|
+
],
|
|
5163
|
+
"flags": {
|
|
5164
|
+
"json": {
|
|
5165
|
+
"description": "Format output as json.",
|
|
5166
|
+
"helpGroup": "GLOBAL",
|
|
5167
|
+
"name": "json",
|
|
5168
|
+
"allowNo": false,
|
|
5169
|
+
"type": "boolean"
|
|
5170
|
+
},
|
|
5171
|
+
"flags-dir": {
|
|
5172
|
+
"helpGroup": "GLOBAL",
|
|
5173
|
+
"name": "flags-dir",
|
|
5174
|
+
"summary": "Import flag values from a directory.",
|
|
5175
|
+
"hasDynamicHelp": false,
|
|
5176
|
+
"multiple": false,
|
|
5177
|
+
"type": "option"
|
|
5178
|
+
},
|
|
5179
|
+
"path": {
|
|
5180
|
+
"char": "p",
|
|
5181
|
+
"description": "Path to the sfdmu workspace folder",
|
|
5182
|
+
"name": "path",
|
|
5183
|
+
"hasDynamicHelp": false,
|
|
5184
|
+
"multiple": false,
|
|
5185
|
+
"type": "option"
|
|
5186
|
+
},
|
|
5187
|
+
"debug": {
|
|
5188
|
+
"char": "d",
|
|
5189
|
+
"description": "Activate debug mode (more logs)",
|
|
5190
|
+
"name": "debug",
|
|
5191
|
+
"allowNo": false,
|
|
5192
|
+
"type": "boolean"
|
|
5193
|
+
},
|
|
5194
|
+
"websocket": {
|
|
5195
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5196
5196
|
"name": "websocket",
|
|
5197
5197
|
"hasDynamicHelp": false,
|
|
5198
5198
|
"multiple": false,
|
|
@@ -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,43 @@
|
|
|
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
|
-
"
|
|
6048
|
-
]
|
|
6049
|
-
},
|
|
6050
|
-
"hardis:org:
|
|
6051
|
-
"aliases": [],
|
|
6052
|
-
"args": {},
|
|
6053
|
-
"description": "
|
|
6054
|
-
"examples": [
|
|
6055
|
-
"$ sf hardis:org:
|
|
6056
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6057
|
-
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6058
|
-
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
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"
|
|
6046
|
+
]
|
|
6047
|
+
},
|
|
6048
|
+
"hardis:org:monitor:all": {
|
|
6049
|
+
"aliases": [],
|
|
6050
|
+
"args": {},
|
|
6051
|
+
"description": "Monitor org, generate reports and sends notifications\n\nYou can disable some commands defining either a **monitoringDisable** property in `.sfdx-hardis.yml`, or a comma separated list in env variable **MONITORING_DISABLE**\n\nExample in .sfdx-hardis.yml:\n \n```yaml\nmonitoringDisable:\n - METADATA_STATUS\n - MISSING_ATTRIBUTES\n - UNUSED_METADATAS\n```\n \nExample in env var:\n\n```sh\nMONITORING_DISABLE=METADATA_STATUS,MISSING_ATTRIBUTES,UNUSED_METADATAS\n```\n\nA [default list of monitoring commands](https://sfdx-hardis.cloudity.com/salesforce-monitoring-home/#monitoring-commands) is used, if you want to override it you can define property **monitoringCommands** in your .sfdx-hardis.yml file\n\nExample:\n\n```yaml\nmonitoringCommands:\n - title: My Custom command\n command: sf my:custom:command\n - title: My Custom command 2\n command: sf my:other:custom:command\n```\n\nYou can force the daily run of all commands by defining env var `MONITORING_IGNORE_FREQUENCY=true`\n\nThe default list of commands is the following:\n\n| Key | Description | Command | Frequency |\n| :---: | :---- | :---- | :-----: |\n| [AUDIT_TRAIL](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | Detect suspect setup actions in major org | [sf hardis:org:diagnose:audittrail](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | daily |\n| [LEGACY_API](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | Detect calls to deprecated API versions | [sf hardis:org:diagnose:legacyapi](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | daily |\n| [ORG_LIMITS](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | Detect if org limits are close to be reached | [sf hardis:org:monitor:limits](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | daily |\n| [UNSECURED_CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | Detect unsecured Connected Apps in an org | [sf hardis:org:diagnose:unsecure-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | daily |\n| [LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | Extract licenses information | [sf hardis:org:diagnose:licenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | weekly |\n| [LINT_ACCESS](https://sfdx-hardis.cloudity.com/hardis/lint/access) | Detect custom elements with no access rights defined in permission sets | [sf hardis:lint:access](https://sfdx-hardis.cloudity.com/hardis/lint/access) | weekly |\n| [UNUSED_LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | Detect permission set licenses that are assigned to users that do not need them | [sf hardis:org:diagnose:unusedlicenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | weekly |\n| [UNUSED_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users without recent logins | [sf hardis:org:diagnose:unusedusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ACTIVE_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users with recent logins | [sf hardis:org:diagnose:unusedusers --returnactiveusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ORG_INFO](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | Get org info + SF instance info + next major upgrade date | [sf hardis:org:diagnose:instanceupgrade](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | weekly |\n| [RELEASE_UPDATES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | Gather warnings about incoming and overdue Release Updates | [sf hardis:org:diagnose:releaseupdates](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | weekly |\n| [UNUSED_METADATAS](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | Detect custom labels and custom permissions that are not in use | [sf hardis:lint:unusedmetadatas](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | weekly |\n| [UNUSED_APEX_CLASSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | Detect unused Apex classes in an org | [sf hardis:org:diagnose:unused-apex-classes](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | weekly |\n| [CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | Detect unused Connected Apps in an org | [sf hardis:org:diagnose:unused-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | weekly |\n| [METADATA_STATUS](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | Detect inactive metadata | [sf hardis:lint:metadatastatus](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | weekly |\n| [MISSING_ATTRIBUTES](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | Detect missing description on custom field | [sf hardis:lint:missingattributes](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | weekly |\n\n",
|
|
6052
|
+
"examples": [
|
|
6053
|
+
"$ sf hardis:org:monitor:all"
|
|
6059
6054
|
],
|
|
6060
6055
|
"flags": {
|
|
6061
6056
|
"json": {
|
|
@@ -6073,32 +6068,6 @@
|
|
|
6073
6068
|
"multiple": false,
|
|
6074
6069
|
"type": "option"
|
|
6075
6070
|
},
|
|
6076
|
-
"eventtype": {
|
|
6077
|
-
"char": "e",
|
|
6078
|
-
"description": "Type of EventLogFile event to analyze",
|
|
6079
|
-
"name": "eventtype",
|
|
6080
|
-
"default": "ApiTotalUsage",
|
|
6081
|
-
"hasDynamicHelp": false,
|
|
6082
|
-
"multiple": false,
|
|
6083
|
-
"type": "option"
|
|
6084
|
-
},
|
|
6085
|
-
"limit": {
|
|
6086
|
-
"char": "l",
|
|
6087
|
-
"description": "Number of latest EventLogFile events to analyze",
|
|
6088
|
-
"name": "limit",
|
|
6089
|
-
"default": 999,
|
|
6090
|
-
"hasDynamicHelp": false,
|
|
6091
|
-
"multiple": false,
|
|
6092
|
-
"type": "option"
|
|
6093
|
-
},
|
|
6094
|
-
"outputfile": {
|
|
6095
|
-
"char": "f",
|
|
6096
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6097
|
-
"name": "outputfile",
|
|
6098
|
-
"hasDynamicHelp": false,
|
|
6099
|
-
"multiple": false,
|
|
6100
|
-
"type": "option"
|
|
6101
|
-
},
|
|
6102
6071
|
"debug": {
|
|
6103
6072
|
"char": "d",
|
|
6104
6073
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6137,57 +6106,159 @@
|
|
|
6137
6106
|
},
|
|
6138
6107
|
"hasDynamicHelp": true,
|
|
6139
6108
|
"hiddenAliases": [],
|
|
6140
|
-
"id": "hardis:org:
|
|
6109
|
+
"id": "hardis:org:monitor:all",
|
|
6141
6110
|
"pluginAlias": "sfdx-hardis",
|
|
6142
6111
|
"pluginName": "sfdx-hardis",
|
|
6143
6112
|
"pluginType": "core",
|
|
6144
6113
|
"strict": true,
|
|
6145
6114
|
"enableJsonFlag": true,
|
|
6146
|
-
"title": "
|
|
6147
|
-
"
|
|
6115
|
+
"title": "Monitor org",
|
|
6116
|
+
"monitoringCommandsDefault": [
|
|
6117
|
+
{
|
|
6118
|
+
"key": "AUDIT_TRAIL",
|
|
6119
|
+
"title": "Detect suspect setup actions in major org",
|
|
6120
|
+
"command": "sf hardis:org:diagnose:audittrail",
|
|
6121
|
+
"frequency": "daily"
|
|
6122
|
+
},
|
|
6123
|
+
{
|
|
6124
|
+
"key": "LEGACY_API",
|
|
6125
|
+
"title": "Detect calls to deprecated API versions",
|
|
6126
|
+
"command": "sf hardis:org:diagnose:legacyapi",
|
|
6127
|
+
"frequency": "daily"
|
|
6128
|
+
},
|
|
6129
|
+
{
|
|
6130
|
+
"key": "ORG_LIMITS",
|
|
6131
|
+
"title": "Detect if org limits are close to be reached",
|
|
6132
|
+
"command": "sf hardis:org:monitor:limits",
|
|
6133
|
+
"frequency": "daily"
|
|
6134
|
+
},
|
|
6135
|
+
{
|
|
6136
|
+
"key": "UNSECURED_CONNECTED_APPS",
|
|
6137
|
+
"title": "Detect unsecured Connected Apps in an org",
|
|
6138
|
+
"command": "sf hardis:org:diagnose:unsecure-connected-apps",
|
|
6139
|
+
"frequency": "daily"
|
|
6140
|
+
},
|
|
6141
|
+
{
|
|
6142
|
+
"key": "LICENSES",
|
|
6143
|
+
"title": "Extract licenses information",
|
|
6144
|
+
"command": "sf hardis:org:diagnose:licenses",
|
|
6145
|
+
"frequency": "weekly"
|
|
6146
|
+
},
|
|
6147
|
+
{
|
|
6148
|
+
"key": "LINT_ACCESS",
|
|
6149
|
+
"title": "Detect custom elements with no access rights defined in permission sets",
|
|
6150
|
+
"command": "sf hardis:lint:access",
|
|
6151
|
+
"frequency": "weekly"
|
|
6152
|
+
},
|
|
6153
|
+
{
|
|
6154
|
+
"key": "UNUSED_LICENSES",
|
|
6155
|
+
"title": "Detect permission set licenses that are assigned to users that do not need them",
|
|
6156
|
+
"command": "sf hardis:org:diagnose:unusedlicenses",
|
|
6157
|
+
"frequency": "weekly"
|
|
6158
|
+
},
|
|
6159
|
+
{
|
|
6160
|
+
"key": "UNUSED_USERS",
|
|
6161
|
+
"title": "Detect active users without recent logins",
|
|
6162
|
+
"command": "sf hardis:org:diagnose:unusedusers",
|
|
6163
|
+
"frequency": "weekly"
|
|
6164
|
+
},
|
|
6165
|
+
{
|
|
6166
|
+
"key": "ACTIVE_USERS",
|
|
6167
|
+
"title": "Detect active users with recent logins",
|
|
6168
|
+
"command": "sf hardis:org:diagnose:unusedusers --returnactiveusers",
|
|
6169
|
+
"frequency": "weekly"
|
|
6170
|
+
},
|
|
6171
|
+
{
|
|
6172
|
+
"key": "ORG_INFO",
|
|
6173
|
+
"title": "Get org info + SF instance info + next major upgrade date",
|
|
6174
|
+
"command": "sf hardis:org:diagnose:instanceupgrade",
|
|
6175
|
+
"frequency": "weekly"
|
|
6176
|
+
},
|
|
6177
|
+
{
|
|
6178
|
+
"key": "RELEASE_UPDATES",
|
|
6179
|
+
"title": "Gather warnings about incoming and overdue Release Updates",
|
|
6180
|
+
"command": "sf hardis:org:diagnose:releaseupdates",
|
|
6181
|
+
"frequency": "weekly"
|
|
6182
|
+
},
|
|
6183
|
+
{
|
|
6184
|
+
"key": "UNUSED_METADATAS",
|
|
6185
|
+
"title": "Detect custom labels and custom permissions that are not in use",
|
|
6186
|
+
"command": "sf hardis:lint:unusedmetadatas",
|
|
6187
|
+
"frequency": "weekly"
|
|
6188
|
+
},
|
|
6189
|
+
{
|
|
6190
|
+
"key": "UNUSED_APEX_CLASSES",
|
|
6191
|
+
"title": "Detect unused Apex classes in an org",
|
|
6192
|
+
"command": "sf hardis:org:diagnose:unused-apex-classes",
|
|
6193
|
+
"frequency": "weekly"
|
|
6194
|
+
},
|
|
6195
|
+
{
|
|
6196
|
+
"key": "CONNECTED_APPS",
|
|
6197
|
+
"title": "Detect unused Connected Apps in an org",
|
|
6198
|
+
"command": "sf hardis:org:diagnose:unused-connected-apps",
|
|
6199
|
+
"frequency": "weekly"
|
|
6200
|
+
},
|
|
6201
|
+
{
|
|
6202
|
+
"key": "METADATA_STATUS",
|
|
6203
|
+
"title": "Detect inactive metadata",
|
|
6204
|
+
"command": "sf hardis:lint:metadatastatus",
|
|
6205
|
+
"frequency": "weekly"
|
|
6206
|
+
},
|
|
6207
|
+
{
|
|
6208
|
+
"key": "MISSING_ATTRIBUTES",
|
|
6209
|
+
"title": "Detect missing description on custom field",
|
|
6210
|
+
"command": "sf hardis:lint:missingattributes",
|
|
6211
|
+
"frequency": "weekly"
|
|
6212
|
+
}
|
|
6213
|
+
],
|
|
6214
|
+
"requiresProject": true,
|
|
6215
|
+
"triggerNotification": true,
|
|
6148
6216
|
"isESM": true,
|
|
6149
6217
|
"relativePath": [
|
|
6150
6218
|
"lib",
|
|
6151
6219
|
"commands",
|
|
6152
6220
|
"hardis",
|
|
6153
6221
|
"org",
|
|
6154
|
-
"
|
|
6155
|
-
"
|
|
6222
|
+
"monitor",
|
|
6223
|
+
"all.js"
|
|
6156
6224
|
],
|
|
6157
6225
|
"aliasPermutations": [],
|
|
6158
6226
|
"permutations": [
|
|
6159
|
-
"hardis:org:
|
|
6160
|
-
"org:hardis:
|
|
6161
|
-
"org:
|
|
6162
|
-
"org:
|
|
6163
|
-
"hardis:
|
|
6164
|
-
"
|
|
6165
|
-
"
|
|
6166
|
-
"
|
|
6167
|
-
"hardis:
|
|
6168
|
-
"
|
|
6169
|
-
"
|
|
6170
|
-
"
|
|
6171
|
-
"hardis:org:
|
|
6172
|
-
"org:hardis:
|
|
6173
|
-
"org:
|
|
6174
|
-
"org:
|
|
6175
|
-
"hardis:
|
|
6176
|
-
"
|
|
6177
|
-
"
|
|
6178
|
-
"
|
|
6179
|
-
"hardis:
|
|
6180
|
-
"
|
|
6181
|
-
"
|
|
6182
|
-
"
|
|
6227
|
+
"hardis:org:monitor:all",
|
|
6228
|
+
"org:hardis:monitor:all",
|
|
6229
|
+
"org:monitor:hardis:all",
|
|
6230
|
+
"org:monitor:all:hardis",
|
|
6231
|
+
"hardis:monitor:org:all",
|
|
6232
|
+
"monitor:hardis:org:all",
|
|
6233
|
+
"monitor:org:hardis:all",
|
|
6234
|
+
"monitor:org:all:hardis",
|
|
6235
|
+
"hardis:monitor:all:org",
|
|
6236
|
+
"monitor:hardis:all:org",
|
|
6237
|
+
"monitor:all:hardis:org",
|
|
6238
|
+
"monitor:all:org:hardis",
|
|
6239
|
+
"hardis:org:all:monitor",
|
|
6240
|
+
"org:hardis:all:monitor",
|
|
6241
|
+
"org:all:hardis:monitor",
|
|
6242
|
+
"org:all:monitor:hardis",
|
|
6243
|
+
"hardis:all:org:monitor",
|
|
6244
|
+
"all:hardis:org:monitor",
|
|
6245
|
+
"all:org:hardis:monitor",
|
|
6246
|
+
"all:org:monitor:hardis",
|
|
6247
|
+
"hardis:all:monitor:org",
|
|
6248
|
+
"all:hardis:monitor:org",
|
|
6249
|
+
"all:monitor:hardis:org",
|
|
6250
|
+
"all:monitor:org:hardis"
|
|
6183
6251
|
]
|
|
6184
6252
|
},
|
|
6185
|
-
"hardis:org:
|
|
6253
|
+
"hardis:org:monitor:backup": {
|
|
6186
6254
|
"aliases": [],
|
|
6187
6255
|
"args": {},
|
|
6188
|
-
"description": "
|
|
6256
|
+
"description": "Retrieve sfdx sources in the context of a monitoring backup\n\nThe command exists in 2 modes: filtered(default & recommended) and full.\n\n## Filtered mode (default, better performances)\n\nAutomatically skips metadatas from installed packages with namespace. \n\nYou can remove more metadata types from backup, especially in case you have too many metadatas and that provokes a crash, using:\n\n- Manual update of `manifest/package-skip-items.xml` config file (then commit & push in the same branch)\n\n - Works with full wildcard (`<members>*</members>`) , named metadata (`<members>Account.Name</members>`) or partial wildcards names (`<members>pi__*</members>` , `<members>*__dlm</members>` , or `<members>prefix*suffix</members>`)\n\n- Environment variable MONITORING_BACKUP_SKIP_METADATA_TYPES (example: `MONITORING_BACKUP_SKIP_METADATA_TYPES=CustomLabel,StaticResource,Translation`): that will be applied to all monitoring branches.\n\n## Full mode\n\nActivate it with **--full** parameter, or variable MONITORING_BACKUP_MODE_FULL=true\n\nIgnores filters (namespaces items & manifest/package-skip-items.xml) to retrieve ALL metadatas, including those you might not care about (reports, translations...)\n\nAs we can retrieve only 10000 files by call, the list of all metadatas will be chunked to make multiple calls (and take more time than filtered mode)\n\n- if you use `--full-apply-filters` , manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES filters will be applied anyway\n- if you use `--exclude-namespaces` , namespaced items will be ignored\n\n_With those both options, it's like if you are not using --full, but with chunked metadata download_\n\n## In CI/CD\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-metadata-backup/) and can output Grafana, Slack and MsTeams Notifications.\n\n## Troubleshooting\n\nIf you have unknown errors (it happens !), you can investigate using the full command with smaller chunks.\n\nExample: `sf hardis:org:monitor:backup --full --exclude-namespaces --full-apply-filters --max-by-chunk 500`\n\nIt will allow you the identify the responsible metadata and ignore it using package-skip-items.xml or MONITORING_BACKUP_SKIP_METADATA_TYPES env variable.\n\n## Documentation\n\n[Doc generation (including visual flows)](https://sfdx-hardis.cloudity.com/hardis/doc/project2markdown/) is triggered at the end of the command.\n\nIf you want to also upload HTML Documentation on your Salesforce Org as static resource, use variable **SFDX_HARDIS_DOC_DEPLOY_TO_ORG=\"true\"**\n\nIf you want to also upload HTML Documentation on Cloudflare, use variable **SFDX_HARDIS_DOC_DEPLOY_TO_CLOUDFLARE=\"true\"**\n\n- If you want to generate the documentation in multiple languages, define variable SFDX_DOC_LANGUAGES (ex: SFDX_DOC_LANGUAGES=en,fr,de)\n- You can define one Cloudflare site by language, for example with the following variables:\n - CLOUDFLARE_PROJECT_NAME_EN=cloudity-demo-english\n - CLOUDFLARE_PROJECT_NAME_FR=cloudity-demo-french\n - CLOUDFLARE_PROJECT_NAME_DE=cloudity-demo-german\n\nIf Flow history doc always display a single state, you probably need to update your workflow configuration:\n\n- on Gitlab: Env variable [`GIT_FETCH_EXTRA_FLAGS: --depth 10000`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.gitlab-ci.yml#L11)\n- on GitHub: [`fetch-depth: 0`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/.github/workflows/org-monitoring.yml#L58)\n- on Azure: [`fetchDepth: \"0\"`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/azure-pipelines.yml#L39)\n- on Bitbucket: [`step: clone: depth: full`](https://github.com/hardisgroupcom/sfdx-hardis/blob/main/defaults/monitoring/bitbucket-pipelines.yml#L18)\n",
|
|
6189
6257
|
"examples": [
|
|
6190
|
-
"$ sf hardis:org:
|
|
6258
|
+
"$ sf hardis:org:monitor:backup",
|
|
6259
|
+
"$ sf hardis:org:monitor:backup --full",
|
|
6260
|
+
"$ sf hardis:org:monitor:backup --full --exclude-namespaces",
|
|
6261
|
+
"$ sf hardis:org:monitor:backup --full --exclude-namespaces --full-apply-filters"
|
|
6191
6262
|
],
|
|
6192
6263
|
"flags": {
|
|
6193
6264
|
"json": {
|
|
@@ -6205,6 +6276,49 @@
|
|
|
6205
6276
|
"multiple": false,
|
|
6206
6277
|
"type": "option"
|
|
6207
6278
|
},
|
|
6279
|
+
"full": {
|
|
6280
|
+
"description": "Dot not take in account filtering using package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES. Efficient but much much slower !",
|
|
6281
|
+
"name": "full",
|
|
6282
|
+
"allowNo": false,
|
|
6283
|
+
"type": "boolean"
|
|
6284
|
+
},
|
|
6285
|
+
"max-by-chunk": {
|
|
6286
|
+
"char": "m",
|
|
6287
|
+
"description": "If mode --full is activated, maximum number of metadatas in a package.xml chunk",
|
|
6288
|
+
"name": "max-by-chunk",
|
|
6289
|
+
"default": 3000,
|
|
6290
|
+
"hasDynamicHelp": false,
|
|
6291
|
+
"multiple": false,
|
|
6292
|
+
"type": "option"
|
|
6293
|
+
},
|
|
6294
|
+
"exclude-namespaces": {
|
|
6295
|
+
"char": "e",
|
|
6296
|
+
"description": "If mode --full is activated, exclude namespaced metadatas",
|
|
6297
|
+
"name": "exclude-namespaces",
|
|
6298
|
+
"allowNo": false,
|
|
6299
|
+
"type": "boolean"
|
|
6300
|
+
},
|
|
6301
|
+
"full-apply-filters": {
|
|
6302
|
+
"char": "z",
|
|
6303
|
+
"description": "If mode --full is activated, apply filters of manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES anyway",
|
|
6304
|
+
"name": "full-apply-filters",
|
|
6305
|
+
"allowNo": false,
|
|
6306
|
+
"type": "boolean"
|
|
6307
|
+
},
|
|
6308
|
+
"start-chunk": {
|
|
6309
|
+
"description": "Use this parameter to troubleshoot a specific chunk. It will be used as the first chunk to retrieve",
|
|
6310
|
+
"name": "start-chunk",
|
|
6311
|
+
"default": 1,
|
|
6312
|
+
"hasDynamicHelp": false,
|
|
6313
|
+
"multiple": false,
|
|
6314
|
+
"type": "option"
|
|
6315
|
+
},
|
|
6316
|
+
"skip-doc": {
|
|
6317
|
+
"description": "Skip the generation of project documentation at the end of the command",
|
|
6318
|
+
"name": "skip-doc",
|
|
6319
|
+
"allowNo": false,
|
|
6320
|
+
"type": "boolean"
|
|
6321
|
+
},
|
|
6208
6322
|
"outputfile": {
|
|
6209
6323
|
"char": "f",
|
|
6210
6324
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6213,13 +6327,6 @@
|
|
|
6213
6327
|
"multiple": false,
|
|
6214
6328
|
"type": "option"
|
|
6215
6329
|
},
|
|
6216
|
-
"usedonly": {
|
|
6217
|
-
"char": "u",
|
|
6218
|
-
"description": "Filter to have only used licenses",
|
|
6219
|
-
"name": "usedonly",
|
|
6220
|
-
"allowNo": false,
|
|
6221
|
-
"type": "boolean"
|
|
6222
|
-
},
|
|
6223
6330
|
"debug": {
|
|
6224
6331
|
"char": "d",
|
|
6225
6332
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6258,57 +6365,58 @@
|
|
|
6258
6365
|
},
|
|
6259
6366
|
"hasDynamicHelp": true,
|
|
6260
6367
|
"hiddenAliases": [],
|
|
6261
|
-
"id": "hardis:org:
|
|
6368
|
+
"id": "hardis:org:monitor:backup",
|
|
6262
6369
|
"pluginAlias": "sfdx-hardis",
|
|
6263
6370
|
"pluginName": "sfdx-hardis",
|
|
6264
6371
|
"pluginType": "core",
|
|
6265
6372
|
"strict": true,
|
|
6266
6373
|
"enableJsonFlag": true,
|
|
6267
|
-
"title": "
|
|
6268
|
-
"requiresProject":
|
|
6374
|
+
"title": "Backup DX sources",
|
|
6375
|
+
"requiresProject": true,
|
|
6376
|
+
"triggerNotification": true,
|
|
6269
6377
|
"isESM": true,
|
|
6270
6378
|
"relativePath": [
|
|
6271
6379
|
"lib",
|
|
6272
6380
|
"commands",
|
|
6273
6381
|
"hardis",
|
|
6274
6382
|
"org",
|
|
6275
|
-
"
|
|
6276
|
-
"
|
|
6383
|
+
"monitor",
|
|
6384
|
+
"backup.js"
|
|
6277
6385
|
],
|
|
6278
6386
|
"aliasPermutations": [],
|
|
6279
6387
|
"permutations": [
|
|
6280
|
-
"hardis:org:
|
|
6281
|
-
"org:hardis:
|
|
6282
|
-
"org:
|
|
6283
|
-
"org:
|
|
6284
|
-
"hardis:
|
|
6285
|
-
"
|
|
6286
|
-
"
|
|
6287
|
-
"
|
|
6288
|
-
"hardis:
|
|
6289
|
-
"
|
|
6290
|
-
"
|
|
6291
|
-
"
|
|
6292
|
-
"hardis:org:
|
|
6293
|
-
"org:hardis:
|
|
6294
|
-
"org:
|
|
6295
|
-
"org:
|
|
6296
|
-
"hardis:
|
|
6297
|
-
"
|
|
6298
|
-
"
|
|
6299
|
-
"
|
|
6300
|
-
"hardis:
|
|
6301
|
-
"
|
|
6302
|
-
"
|
|
6303
|
-
"
|
|
6388
|
+
"hardis:org:monitor:backup",
|
|
6389
|
+
"org:hardis:monitor:backup",
|
|
6390
|
+
"org:monitor:hardis:backup",
|
|
6391
|
+
"org:monitor:backup:hardis",
|
|
6392
|
+
"hardis:monitor:org:backup",
|
|
6393
|
+
"monitor:hardis:org:backup",
|
|
6394
|
+
"monitor:org:hardis:backup",
|
|
6395
|
+
"monitor:org:backup:hardis",
|
|
6396
|
+
"hardis:monitor:backup:org",
|
|
6397
|
+
"monitor:hardis:backup:org",
|
|
6398
|
+
"monitor:backup:hardis:org",
|
|
6399
|
+
"monitor:backup:org:hardis",
|
|
6400
|
+
"hardis:org:backup:monitor",
|
|
6401
|
+
"org:hardis:backup:monitor",
|
|
6402
|
+
"org:backup:hardis:monitor",
|
|
6403
|
+
"org:backup:monitor:hardis",
|
|
6404
|
+
"hardis:backup:org:monitor",
|
|
6405
|
+
"backup:hardis:org:monitor",
|
|
6406
|
+
"backup:org:hardis:monitor",
|
|
6407
|
+
"backup:org:monitor:hardis",
|
|
6408
|
+
"hardis:backup:monitor:org",
|
|
6409
|
+
"backup:hardis:monitor:org",
|
|
6410
|
+
"backup:monitor:hardis:org",
|
|
6411
|
+
"backup:monitor:org:hardis"
|
|
6304
6412
|
]
|
|
6305
6413
|
},
|
|
6306
|
-
"hardis:org:
|
|
6414
|
+
"hardis:org:monitor:limits": {
|
|
6307
6415
|
"aliases": [],
|
|
6308
6416
|
"args": {},
|
|
6309
|
-
"description": "
|
|
6417
|
+
"description": "\n## Command Behavior\n\n**Checks the current usage of various Salesforce org limits and sends notifications if thresholds are exceeded.**\n\nThis command is a critical component of proactive Salesforce org management, helping administrators and developers monitor resource consumption and prevent hitting critical limits that could impact performance or functionality. It provides early warnings when limits are approaching their capacity.\n\nKey functionalities:\n\n- **Limit Retrieval:** Fetches a comprehensive list of all Salesforce org limits using the Salesforce CLI.\n- **Usage Calculation:** Calculates the percentage of each limit that is currently being used.\n- **Threshold-Based Alerting:** Assigns a severity (success, warning, or error) to each limit based on configurable thresholds:\n - **Warning:** If usage exceeds 50% (configurable via `LIMIT_THRESHOLD_WARNING` environment variable).\n - **Error:** If usage exceeds 75% (configurable via `LIMIT_THRESHOLD_ERROR` environment variable).\n- **CSV Report Generation:** Generates a CSV file containing all org limits, their current usage, maximum allowed, and calculated percentage used, along with the assigned severity.\n- **Notifications:** Sends notifications to configured channels (Grafana, Slack, MS Teams) with a summary of limits that have exceeded the warning or error thresholds.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-org-limits/) 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 CLI Integration:** It executes the `sf org limits list` command to retrieve the current org limits. It parses the JSON output of this command.\n- **Data Processing:** It iterates through the retrieved limits, calculates the `used` and `percentUsed` values, and assigns a `severity` (success, warning, error) based on the configured thresholds.\n- **Environment Variable Configuration:** Reads `LIMIT_THRESHOLD_WARNING` and `LIMIT_THRESHOLD_ERROR` environment variables to set the warning and error thresholds for limit usage.\n- **Report Generation:** It uses `generateCsvFile` to create the CSV report of org limits.\n- **Notification Integration:** It integrates with the `NotifProvider` to send notifications, including attachments of the generated CSV report and detailed metrics for each limit, which can be consumed by monitoring dashboards like Grafana.\n- **Exit Code Management:** Sets the process exit code to 1 if any limit is in an 'error' state, indicating a critical issue.\n</details>\n",
|
|
6310
6418
|
"examples": [
|
|
6311
|
-
"$ sf hardis:org:
|
|
6419
|
+
"$ sf hardis:org:monitor:limits"
|
|
6312
6420
|
],
|
|
6313
6421
|
"flags": {
|
|
6314
6422
|
"json": {
|
|
@@ -6372,57 +6480,61 @@
|
|
|
6372
6480
|
},
|
|
6373
6481
|
"hasDynamicHelp": true,
|
|
6374
6482
|
"hiddenAliases": [],
|
|
6375
|
-
"id": "hardis:org:
|
|
6483
|
+
"id": "hardis:org:monitor:limits",
|
|
6376
6484
|
"pluginAlias": "sfdx-hardis",
|
|
6377
6485
|
"pluginName": "sfdx-hardis",
|
|
6378
6486
|
"pluginType": "core",
|
|
6379
6487
|
"strict": true,
|
|
6380
6488
|
"enableJsonFlag": true,
|
|
6381
|
-
"title": "Check
|
|
6382
|
-
"requiresProject":
|
|
6489
|
+
"title": "Check org limits",
|
|
6490
|
+
"requiresProject": true,
|
|
6491
|
+
"triggerNotification": true,
|
|
6383
6492
|
"isESM": true,
|
|
6384
6493
|
"relativePath": [
|
|
6385
6494
|
"lib",
|
|
6386
6495
|
"commands",
|
|
6387
6496
|
"hardis",
|
|
6388
6497
|
"org",
|
|
6389
|
-
"
|
|
6390
|
-
"
|
|
6498
|
+
"monitor",
|
|
6499
|
+
"limits.js"
|
|
6391
6500
|
],
|
|
6392
6501
|
"aliasPermutations": [],
|
|
6393
6502
|
"permutations": [
|
|
6394
|
-
"hardis:org:
|
|
6395
|
-
"org:hardis:
|
|
6396
|
-
"org:
|
|
6397
|
-
"org:
|
|
6398
|
-
"hardis:
|
|
6399
|
-
"
|
|
6400
|
-
"
|
|
6401
|
-
"
|
|
6402
|
-
"hardis:
|
|
6403
|
-
"
|
|
6404
|
-
"
|
|
6405
|
-
"
|
|
6406
|
-
"hardis:org:
|
|
6407
|
-
"org:hardis:
|
|
6408
|
-
"org:
|
|
6409
|
-
"org:
|
|
6410
|
-
"hardis:
|
|
6411
|
-
"
|
|
6412
|
-
"
|
|
6413
|
-
"
|
|
6414
|
-
"hardis:
|
|
6415
|
-
"
|
|
6416
|
-
"
|
|
6417
|
-
"
|
|
6503
|
+
"hardis:org:monitor:limits",
|
|
6504
|
+
"org:hardis:monitor:limits",
|
|
6505
|
+
"org:monitor:hardis:limits",
|
|
6506
|
+
"org:monitor:limits:hardis",
|
|
6507
|
+
"hardis:monitor:org:limits",
|
|
6508
|
+
"monitor:hardis:org:limits",
|
|
6509
|
+
"monitor:org:hardis:limits",
|
|
6510
|
+
"monitor:org:limits:hardis",
|
|
6511
|
+
"hardis:monitor:limits:org",
|
|
6512
|
+
"monitor:hardis:limits:org",
|
|
6513
|
+
"monitor:limits:hardis:org",
|
|
6514
|
+
"monitor:limits:org:hardis",
|
|
6515
|
+
"hardis:org:limits:monitor",
|
|
6516
|
+
"org:hardis:limits:monitor",
|
|
6517
|
+
"org:limits:hardis:monitor",
|
|
6518
|
+
"org:limits:monitor:hardis",
|
|
6519
|
+
"hardis:limits:org:monitor",
|
|
6520
|
+
"limits:hardis:org:monitor",
|
|
6521
|
+
"limits:org:hardis:monitor",
|
|
6522
|
+
"limits:org:monitor:hardis",
|
|
6523
|
+
"hardis:limits:monitor:org",
|
|
6524
|
+
"limits:hardis:monitor:org",
|
|
6525
|
+
"limits:monitor:hardis:org",
|
|
6526
|
+
"limits:monitor:org:hardis"
|
|
6418
6527
|
]
|
|
6419
6528
|
},
|
|
6420
|
-
"hardis:org:diagnose:
|
|
6529
|
+
"hardis:org:diagnose:audittrail": {
|
|
6421
6530
|
"aliases": [],
|
|
6422
6531
|
"args": {},
|
|
6423
|
-
"description": "
|
|
6532
|
+
"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",
|
|
6424
6533
|
"examples": [
|
|
6425
|
-
"$ sf hardis:org:diagnose:
|
|
6534
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
6535
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
6536
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
6537
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
6426
6538
|
],
|
|
6427
6539
|
"flags": {
|
|
6428
6540
|
"json": {
|
|
@@ -6440,6 +6552,22 @@
|
|
|
6440
6552
|
"multiple": false,
|
|
6441
6553
|
"type": "option"
|
|
6442
6554
|
},
|
|
6555
|
+
"excludeusers": {
|
|
6556
|
+
"char": "e",
|
|
6557
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
6558
|
+
"name": "excludeusers",
|
|
6559
|
+
"hasDynamicHelp": false,
|
|
6560
|
+
"multiple": false,
|
|
6561
|
+
"type": "option"
|
|
6562
|
+
},
|
|
6563
|
+
"lastndays": {
|
|
6564
|
+
"char": "t",
|
|
6565
|
+
"description": "Number of days to extract from today (included)",
|
|
6566
|
+
"name": "lastndays",
|
|
6567
|
+
"hasDynamicHelp": false,
|
|
6568
|
+
"multiple": false,
|
|
6569
|
+
"type": "option"
|
|
6570
|
+
},
|
|
6443
6571
|
"outputfile": {
|
|
6444
6572
|
"char": "f",
|
|
6445
6573
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -6486,14 +6614,14 @@
|
|
|
6486
6614
|
},
|
|
6487
6615
|
"hasDynamicHelp": true,
|
|
6488
6616
|
"hiddenAliases": [],
|
|
6489
|
-
"id": "hardis:org:diagnose:
|
|
6617
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
6490
6618
|
"pluginAlias": "sfdx-hardis",
|
|
6491
6619
|
"pluginName": "sfdx-hardis",
|
|
6492
6620
|
"pluginType": "core",
|
|
6493
6621
|
"strict": true,
|
|
6494
6622
|
"enableJsonFlag": true,
|
|
6495
|
-
"title": "
|
|
6496
|
-
"requiresProject":
|
|
6623
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
6624
|
+
"requiresProject": false,
|
|
6497
6625
|
"isESM": true,
|
|
6498
6626
|
"relativePath": [
|
|
6499
6627
|
"lib",
|
|
@@ -6501,42 +6629,42 @@
|
|
|
6501
6629
|
"hardis",
|
|
6502
6630
|
"org",
|
|
6503
6631
|
"diagnose",
|
|
6504
|
-
"
|
|
6632
|
+
"audittrail.js"
|
|
6505
6633
|
],
|
|
6506
|
-
"aliasPermutations": [],
|
|
6507
|
-
"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
|
-
"
|
|
6634
|
+
"aliasPermutations": [],
|
|
6635
|
+
"permutations": [
|
|
6636
|
+
"hardis:org:diagnose:audittrail",
|
|
6637
|
+
"org:hardis:diagnose:audittrail",
|
|
6638
|
+
"org:diagnose:hardis:audittrail",
|
|
6639
|
+
"org:diagnose:audittrail:hardis",
|
|
6640
|
+
"hardis:diagnose:org:audittrail",
|
|
6641
|
+
"diagnose:hardis:org:audittrail",
|
|
6642
|
+
"diagnose:org:hardis:audittrail",
|
|
6643
|
+
"diagnose:org:audittrail:hardis",
|
|
6644
|
+
"hardis:diagnose:audittrail:org",
|
|
6645
|
+
"diagnose:hardis:audittrail:org",
|
|
6646
|
+
"diagnose:audittrail:hardis:org",
|
|
6647
|
+
"diagnose:audittrail:org:hardis",
|
|
6648
|
+
"hardis:org:audittrail:diagnose",
|
|
6649
|
+
"org:hardis:audittrail:diagnose",
|
|
6650
|
+
"org:audittrail:hardis:diagnose",
|
|
6651
|
+
"org:audittrail:diagnose:hardis",
|
|
6652
|
+
"hardis:audittrail:org:diagnose",
|
|
6653
|
+
"audittrail:hardis:org:diagnose",
|
|
6654
|
+
"audittrail:org:hardis:diagnose",
|
|
6655
|
+
"audittrail:org:diagnose:hardis",
|
|
6656
|
+
"hardis:audittrail:diagnose:org",
|
|
6657
|
+
"audittrail:hardis:diagnose:org",
|
|
6658
|
+
"audittrail:diagnose:hardis:org",
|
|
6659
|
+
"audittrail:diagnose:org:hardis"
|
|
6532
6660
|
]
|
|
6533
6661
|
},
|
|
6534
|
-
"hardis:org:diagnose:
|
|
6662
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
6535
6663
|
"aliases": [],
|
|
6536
6664
|
"args": {},
|
|
6537
|
-
"description": "\n## Command Behavior\n\n**
|
|
6665
|
+
"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",
|
|
6538
6666
|
"examples": [
|
|
6539
|
-
"$ sf hardis:org:diagnose:
|
|
6667
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
6540
6668
|
],
|
|
6541
6669
|
"flags": {
|
|
6542
6670
|
"json": {
|
|
@@ -6554,14 +6682,6 @@
|
|
|
6554
6682
|
"multiple": false,
|
|
6555
6683
|
"type": "option"
|
|
6556
6684
|
},
|
|
6557
|
-
"outputfile": {
|
|
6558
|
-
"char": "f",
|
|
6559
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6560
|
-
"name": "outputfile",
|
|
6561
|
-
"hasDynamicHelp": false,
|
|
6562
|
-
"multiple": false,
|
|
6563
|
-
"type": "option"
|
|
6564
|
-
},
|
|
6565
6685
|
"debug": {
|
|
6566
6686
|
"char": "d",
|
|
6567
6687
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6600,13 +6720,13 @@
|
|
|
6600
6720
|
},
|
|
6601
6721
|
"hasDynamicHelp": true,
|
|
6602
6722
|
"hiddenAliases": [],
|
|
6603
|
-
"id": "hardis:org:diagnose:
|
|
6723
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
6604
6724
|
"pluginAlias": "sfdx-hardis",
|
|
6605
6725
|
"pluginName": "sfdx-hardis",
|
|
6606
6726
|
"pluginType": "core",
|
|
6607
6727
|
"strict": true,
|
|
6608
6728
|
"enableJsonFlag": true,
|
|
6609
|
-
"title": "
|
|
6729
|
+
"title": "Get Instance Upgrade date",
|
|
6610
6730
|
"requiresProject": false,
|
|
6611
6731
|
"isESM": true,
|
|
6612
6732
|
"relativePath": [
|
|
@@ -6615,43 +6735,45 @@
|
|
|
6615
6735
|
"hardis",
|
|
6616
6736
|
"org",
|
|
6617
6737
|
"diagnose",
|
|
6618
|
-
"
|
|
6738
|
+
"instanceupgrade.js"
|
|
6619
6739
|
],
|
|
6620
6740
|
"aliasPermutations": [],
|
|
6621
6741
|
"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
|
-
"
|
|
6742
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
6743
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
6744
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
6745
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
6746
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
6747
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
6748
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
6749
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
6750
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
6751
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
6752
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
6753
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
6754
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
6755
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
6756
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
6757
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
6758
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
6759
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
6760
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
6761
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
6762
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
6763
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
6764
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
6765
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
6646
6766
|
]
|
|
6647
6767
|
},
|
|
6648
|
-
"hardis:org:diagnose:
|
|
6768
|
+
"hardis:org:diagnose:legacyapi": {
|
|
6649
6769
|
"aliases": [],
|
|
6650
6770
|
"args": {},
|
|
6651
|
-
"description": "
|
|
6771
|
+
"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",
|
|
6652
6772
|
"examples": [
|
|
6653
|
-
"$ sf hardis:org:diagnose:
|
|
6654
|
-
"$ sf hardis:org:diagnose:
|
|
6773
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
6774
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
6775
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
6776
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
6655
6777
|
],
|
|
6656
6778
|
"flags": {
|
|
6657
6779
|
"json": {
|
|
@@ -6669,18 +6791,28 @@
|
|
|
6669
6791
|
"multiple": false,
|
|
6670
6792
|
"type": "option"
|
|
6671
6793
|
},
|
|
6672
|
-
"
|
|
6673
|
-
"char": "
|
|
6674
|
-
"description": "
|
|
6675
|
-
"name": "
|
|
6794
|
+
"eventtype": {
|
|
6795
|
+
"char": "e",
|
|
6796
|
+
"description": "Type of EventLogFile event to analyze",
|
|
6797
|
+
"name": "eventtype",
|
|
6798
|
+
"default": "ApiTotalUsage",
|
|
6676
6799
|
"hasDynamicHelp": false,
|
|
6677
6800
|
"multiple": false,
|
|
6678
6801
|
"type": "option"
|
|
6679
6802
|
},
|
|
6680
|
-
"
|
|
6681
|
-
"char": "
|
|
6682
|
-
"description": "
|
|
6683
|
-
"name": "
|
|
6803
|
+
"limit": {
|
|
6804
|
+
"char": "l",
|
|
6805
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
6806
|
+
"name": "limit",
|
|
6807
|
+
"default": 999,
|
|
6808
|
+
"hasDynamicHelp": false,
|
|
6809
|
+
"multiple": false,
|
|
6810
|
+
"type": "option"
|
|
6811
|
+
},
|
|
6812
|
+
"outputfile": {
|
|
6813
|
+
"char": "f",
|
|
6814
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6815
|
+
"name": "outputfile",
|
|
6684
6816
|
"hasDynamicHelp": false,
|
|
6685
6817
|
"multiple": false,
|
|
6686
6818
|
"type": "option"
|
|
@@ -6723,13 +6855,13 @@
|
|
|
6723
6855
|
},
|
|
6724
6856
|
"hasDynamicHelp": true,
|
|
6725
6857
|
"hiddenAliases": [],
|
|
6726
|
-
"id": "hardis:org:diagnose:
|
|
6858
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
6727
6859
|
"pluginAlias": "sfdx-hardis",
|
|
6728
6860
|
"pluginName": "sfdx-hardis",
|
|
6729
6861
|
"pluginType": "core",
|
|
6730
6862
|
"strict": true,
|
|
6731
6863
|
"enableJsonFlag": true,
|
|
6732
|
-
"title": "
|
|
6864
|
+
"title": "Check for legacy API use",
|
|
6733
6865
|
"requiresProject": false,
|
|
6734
6866
|
"isESM": true,
|
|
6735
6867
|
"relativePath": [
|
|
@@ -6738,42 +6870,42 @@
|
|
|
6738
6870
|
"hardis",
|
|
6739
6871
|
"org",
|
|
6740
6872
|
"diagnose",
|
|
6741
|
-
"
|
|
6873
|
+
"legacyapi.js"
|
|
6742
6874
|
],
|
|
6743
6875
|
"aliasPermutations": [],
|
|
6744
6876
|
"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
|
-
"
|
|
6877
|
+
"hardis:org:diagnose:legacyapi",
|
|
6878
|
+
"org:hardis:diagnose:legacyapi",
|
|
6879
|
+
"org:diagnose:hardis:legacyapi",
|
|
6880
|
+
"org:diagnose:legacyapi:hardis",
|
|
6881
|
+
"hardis:diagnose:org:legacyapi",
|
|
6882
|
+
"diagnose:hardis:org:legacyapi",
|
|
6883
|
+
"diagnose:org:hardis:legacyapi",
|
|
6884
|
+
"diagnose:org:legacyapi:hardis",
|
|
6885
|
+
"hardis:diagnose:legacyapi:org",
|
|
6886
|
+
"diagnose:hardis:legacyapi:org",
|
|
6887
|
+
"diagnose:legacyapi:hardis:org",
|
|
6888
|
+
"diagnose:legacyapi:org:hardis",
|
|
6889
|
+
"hardis:org:legacyapi:diagnose",
|
|
6890
|
+
"org:hardis:legacyapi:diagnose",
|
|
6891
|
+
"org:legacyapi:hardis:diagnose",
|
|
6892
|
+
"org:legacyapi:diagnose:hardis",
|
|
6893
|
+
"hardis:legacyapi:org:diagnose",
|
|
6894
|
+
"legacyapi:hardis:org:diagnose",
|
|
6895
|
+
"legacyapi:org:hardis:diagnose",
|
|
6896
|
+
"legacyapi:org:diagnose:hardis",
|
|
6897
|
+
"hardis:legacyapi:diagnose:org",
|
|
6898
|
+
"legacyapi:hardis:diagnose:org",
|
|
6899
|
+
"legacyapi:diagnose:hardis:org",
|
|
6900
|
+
"legacyapi:diagnose:org:hardis"
|
|
6769
6901
|
]
|
|
6770
6902
|
},
|
|
6771
|
-
"hardis:org:diagnose:
|
|
6903
|
+
"hardis:org:diagnose:licenses": {
|
|
6772
6904
|
"aliases": [],
|
|
6773
6905
|
"args": {},
|
|
6774
|
-
"description": "\n
|
|
6906
|
+
"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",
|
|
6775
6907
|
"examples": [
|
|
6776
|
-
"$ sf hardis:org:diagnose:
|
|
6908
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
6777
6909
|
],
|
|
6778
6910
|
"flags": {
|
|
6779
6911
|
"json": {
|
|
@@ -6799,6 +6931,13 @@
|
|
|
6799
6931
|
"multiple": false,
|
|
6800
6932
|
"type": "option"
|
|
6801
6933
|
},
|
|
6934
|
+
"usedonly": {
|
|
6935
|
+
"char": "u",
|
|
6936
|
+
"description": "Filter to have only used licenses",
|
|
6937
|
+
"name": "usedonly",
|
|
6938
|
+
"allowNo": false,
|
|
6939
|
+
"type": "boolean"
|
|
6940
|
+
},
|
|
6802
6941
|
"debug": {
|
|
6803
6942
|
"char": "d",
|
|
6804
6943
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6837,30 +6976,13 @@
|
|
|
6837
6976
|
},
|
|
6838
6977
|
"hasDynamicHelp": true,
|
|
6839
6978
|
"hiddenAliases": [],
|
|
6840
|
-
"id": "hardis:org:diagnose:
|
|
6979
|
+
"id": "hardis:org:diagnose:licenses",
|
|
6841
6980
|
"pluginAlias": "sfdx-hardis",
|
|
6842
6981
|
"pluginName": "sfdx-hardis",
|
|
6843
6982
|
"pluginType": "core",
|
|
6844
6983
|
"strict": true,
|
|
6845
6984
|
"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
|
-
],
|
|
6985
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6864
6986
|
"requiresProject": false,
|
|
6865
6987
|
"isESM": true,
|
|
6866
6988
|
"relativePath": [
|
|
@@ -6869,43 +6991,42 @@
|
|
|
6869
6991
|
"hardis",
|
|
6870
6992
|
"org",
|
|
6871
6993
|
"diagnose",
|
|
6872
|
-
"
|
|
6994
|
+
"licenses.js"
|
|
6873
6995
|
],
|
|
6874
6996
|
"aliasPermutations": [],
|
|
6875
6997
|
"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
|
-
"
|
|
6998
|
+
"hardis:org:diagnose:licenses",
|
|
6999
|
+
"org:hardis:diagnose:licenses",
|
|
7000
|
+
"org:diagnose:hardis:licenses",
|
|
7001
|
+
"org:diagnose:licenses:hardis",
|
|
7002
|
+
"hardis:diagnose:org:licenses",
|
|
7003
|
+
"diagnose:hardis:org:licenses",
|
|
7004
|
+
"diagnose:org:hardis:licenses",
|
|
7005
|
+
"diagnose:org:licenses:hardis",
|
|
7006
|
+
"hardis:diagnose:licenses:org",
|
|
7007
|
+
"diagnose:hardis:licenses:org",
|
|
7008
|
+
"diagnose:licenses:hardis:org",
|
|
7009
|
+
"diagnose:licenses:org:hardis",
|
|
7010
|
+
"hardis:org:licenses:diagnose",
|
|
7011
|
+
"org:hardis:licenses:diagnose",
|
|
7012
|
+
"org:licenses:hardis:diagnose",
|
|
7013
|
+
"org:licenses:diagnose:hardis",
|
|
7014
|
+
"hardis:licenses:org:diagnose",
|
|
7015
|
+
"licenses:hardis:org:diagnose",
|
|
7016
|
+
"licenses:org:hardis:diagnose",
|
|
7017
|
+
"licenses:org:diagnose:hardis",
|
|
7018
|
+
"hardis:licenses:diagnose:org",
|
|
7019
|
+
"licenses:hardis:diagnose:org",
|
|
7020
|
+
"licenses:diagnose:hardis:org",
|
|
7021
|
+
"licenses:diagnose:org:hardis"
|
|
6900
7022
|
]
|
|
6901
7023
|
},
|
|
6902
|
-
"hardis:org:diagnose:
|
|
7024
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6903
7025
|
"aliases": [],
|
|
6904
7026
|
"args": {},
|
|
6905
|
-
"description": "
|
|
7027
|
+
"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",
|
|
6906
7028
|
"examples": [
|
|
6907
|
-
"$ sf hardis:org:diagnose:
|
|
6908
|
-
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
7029
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6909
7030
|
],
|
|
6910
7031
|
"flags": {
|
|
6911
7032
|
"json": {
|
|
@@ -6969,32 +7090,14 @@
|
|
|
6969
7090
|
},
|
|
6970
7091
|
"hasDynamicHelp": true,
|
|
6971
7092
|
"hiddenAliases": [],
|
|
6972
|
-
"id": "hardis:org:diagnose:
|
|
7093
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6973
7094
|
"pluginAlias": "sfdx-hardis",
|
|
6974
7095
|
"pluginName": "sfdx-hardis",
|
|
6975
7096
|
"pluginType": "core",
|
|
6976
7097
|
"strict": true,
|
|
6977
7098
|
"enableJsonFlag": true,
|
|
6978
|
-
"title": "
|
|
7099
|
+
"title": "Check Release Updates of an org",
|
|
6979
7100
|
"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
7101
|
"isESM": true,
|
|
6999
7102
|
"relativePath": [
|
|
7000
7103
|
"lib",
|
|
@@ -7002,46 +7105,42 @@
|
|
|
7002
7105
|
"hardis",
|
|
7003
7106
|
"org",
|
|
7004
7107
|
"diagnose",
|
|
7005
|
-
"
|
|
7108
|
+
"releaseupdates.js"
|
|
7006
7109
|
],
|
|
7007
7110
|
"aliasPermutations": [],
|
|
7008
7111
|
"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
|
-
"
|
|
7112
|
+
"hardis:org:diagnose:releaseupdates",
|
|
7113
|
+
"org:hardis:diagnose:releaseupdates",
|
|
7114
|
+
"org:diagnose:hardis:releaseupdates",
|
|
7115
|
+
"org:diagnose:releaseupdates:hardis",
|
|
7116
|
+
"hardis:diagnose:org:releaseupdates",
|
|
7117
|
+
"diagnose:hardis:org:releaseupdates",
|
|
7118
|
+
"diagnose:org:hardis:releaseupdates",
|
|
7119
|
+
"diagnose:org:releaseupdates:hardis",
|
|
7120
|
+
"hardis:diagnose:releaseupdates:org",
|
|
7121
|
+
"diagnose:hardis:releaseupdates:org",
|
|
7122
|
+
"diagnose:releaseupdates:hardis:org",
|
|
7123
|
+
"diagnose:releaseupdates:org:hardis",
|
|
7124
|
+
"hardis:org:releaseupdates:diagnose",
|
|
7125
|
+
"org:hardis:releaseupdates:diagnose",
|
|
7126
|
+
"org:releaseupdates:hardis:diagnose",
|
|
7127
|
+
"org:releaseupdates:diagnose:hardis",
|
|
7128
|
+
"hardis:releaseupdates:org:diagnose",
|
|
7129
|
+
"releaseupdates:hardis:org:diagnose",
|
|
7130
|
+
"releaseupdates:org:hardis:diagnose",
|
|
7131
|
+
"releaseupdates:org:diagnose:hardis",
|
|
7132
|
+
"hardis:releaseupdates:diagnose:org",
|
|
7133
|
+
"releaseupdates:hardis:diagnose:org",
|
|
7134
|
+
"releaseupdates:diagnose:hardis:org",
|
|
7135
|
+
"releaseupdates:diagnose:org:hardis"
|
|
7033
7136
|
]
|
|
7034
7137
|
},
|
|
7035
|
-
"hardis:org:diagnose:
|
|
7138
|
+
"hardis:org:diagnose:storage-stats": {
|
|
7036
7139
|
"aliases": [],
|
|
7037
7140
|
"args": {},
|
|
7038
|
-
"description": "
|
|
7141
|
+
"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",
|
|
7039
7142
|
"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"
|
|
7143
|
+
"$ sf hardis:org:diagnose:storage-stats"
|
|
7045
7144
|
],
|
|
7046
7145
|
"flags": {
|
|
7047
7146
|
"json": {
|
|
@@ -7067,41 +7166,6 @@
|
|
|
7067
7166
|
"multiple": false,
|
|
7068
7167
|
"type": "option"
|
|
7069
7168
|
},
|
|
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
7169
|
"debug": {
|
|
7106
7170
|
"char": "d",
|
|
7107
7171
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7140,14 +7204,14 @@
|
|
|
7140
7204
|
},
|
|
7141
7205
|
"hasDynamicHelp": true,
|
|
7142
7206
|
"hiddenAliases": [],
|
|
7143
|
-
"id": "hardis:org:diagnose:
|
|
7207
|
+
"id": "hardis:org:diagnose:storage-stats",
|
|
7144
7208
|
"pluginAlias": "sfdx-hardis",
|
|
7145
7209
|
"pluginName": "sfdx-hardis",
|
|
7146
7210
|
"pluginType": "core",
|
|
7147
7211
|
"strict": true,
|
|
7148
7212
|
"enableJsonFlag": true,
|
|
7149
|
-
"title": "
|
|
7150
|
-
"requiresProject":
|
|
7213
|
+
"title": "Extract Data Storage stats",
|
|
7214
|
+
"requiresProject": true,
|
|
7151
7215
|
"isESM": true,
|
|
7152
7216
|
"relativePath": [
|
|
7153
7217
|
"lib",
|
|
@@ -7155,43 +7219,42 @@
|
|
|
7155
7219
|
"hardis",
|
|
7156
7220
|
"org",
|
|
7157
7221
|
"diagnose",
|
|
7158
|
-
"
|
|
7222
|
+
"storage-stats.js"
|
|
7159
7223
|
],
|
|
7160
7224
|
"aliasPermutations": [],
|
|
7161
7225
|
"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
|
-
"
|
|
7226
|
+
"hardis:org:diagnose:storage-stats",
|
|
7227
|
+
"org:hardis:diagnose:storage-stats",
|
|
7228
|
+
"org:diagnose:hardis:storage-stats",
|
|
7229
|
+
"org:diagnose:storage-stats:hardis",
|
|
7230
|
+
"hardis:diagnose:org:storage-stats",
|
|
7231
|
+
"diagnose:hardis:org:storage-stats",
|
|
7232
|
+
"diagnose:org:hardis:storage-stats",
|
|
7233
|
+
"diagnose:org:storage-stats:hardis",
|
|
7234
|
+
"hardis:diagnose:storage-stats:org",
|
|
7235
|
+
"diagnose:hardis:storage-stats:org",
|
|
7236
|
+
"diagnose:storage-stats:hardis:org",
|
|
7237
|
+
"diagnose:storage-stats:org:hardis",
|
|
7238
|
+
"hardis:org:storage-stats:diagnose",
|
|
7239
|
+
"org:hardis:storage-stats:diagnose",
|
|
7240
|
+
"org:storage-stats:hardis:diagnose",
|
|
7241
|
+
"org:storage-stats:diagnose:hardis",
|
|
7242
|
+
"hardis:storage-stats:org:diagnose",
|
|
7243
|
+
"storage-stats:hardis:org:diagnose",
|
|
7244
|
+
"storage-stats:org:hardis:diagnose",
|
|
7245
|
+
"storage-stats:org:diagnose:hardis",
|
|
7246
|
+
"hardis:storage-stats:diagnose:org",
|
|
7247
|
+
"storage-stats:hardis:diagnose:org",
|
|
7248
|
+
"storage-stats:diagnose:hardis:org",
|
|
7249
|
+
"storage-stats:diagnose:org:hardis"
|
|
7186
7250
|
]
|
|
7187
7251
|
},
|
|
7188
|
-
"hardis:org:
|
|
7252
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
7189
7253
|
"aliases": [],
|
|
7190
7254
|
"args": {},
|
|
7191
|
-
"description": "
|
|
7255
|
+
"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",
|
|
7192
7256
|
"examples": [
|
|
7193
|
-
"$ sf hardis:org:
|
|
7194
|
-
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
7257
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
7195
7258
|
],
|
|
7196
7259
|
"flags": {
|
|
7197
7260
|
"json": {
|
|
@@ -7209,10 +7272,10 @@
|
|
|
7209
7272
|
"multiple": false,
|
|
7210
7273
|
"type": "option"
|
|
7211
7274
|
},
|
|
7212
|
-
"
|
|
7213
|
-
"char": "
|
|
7214
|
-
"description": "
|
|
7215
|
-
"name": "
|
|
7275
|
+
"outputfile": {
|
|
7276
|
+
"char": "f",
|
|
7277
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7278
|
+
"name": "outputfile",
|
|
7216
7279
|
"hasDynamicHelp": false,
|
|
7217
7280
|
"multiple": false,
|
|
7218
7281
|
"type": "option"
|
|
@@ -7255,59 +7318,58 @@
|
|
|
7255
7318
|
},
|
|
7256
7319
|
"hasDynamicHelp": true,
|
|
7257
7320
|
"hiddenAliases": [],
|
|
7258
|
-
"id": "hardis:org:
|
|
7321
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
7259
7322
|
"pluginAlias": "sfdx-hardis",
|
|
7260
7323
|
"pluginName": "sfdx-hardis",
|
|
7261
7324
|
"pluginType": "core",
|
|
7262
7325
|
"strict": true,
|
|
7263
7326
|
"enableJsonFlag": true,
|
|
7264
|
-
"title": "
|
|
7265
|
-
"requiresProject":
|
|
7327
|
+
"title": "Detect Unsecured Connected Apps",
|
|
7328
|
+
"requiresProject": false,
|
|
7266
7329
|
"isESM": true,
|
|
7267
7330
|
"relativePath": [
|
|
7268
7331
|
"lib",
|
|
7269
7332
|
"commands",
|
|
7270
7333
|
"hardis",
|
|
7271
7334
|
"org",
|
|
7272
|
-
"
|
|
7273
|
-
"
|
|
7335
|
+
"diagnose",
|
|
7336
|
+
"unsecure-connected-apps.js"
|
|
7274
7337
|
],
|
|
7275
7338
|
"aliasPermutations": [],
|
|
7276
7339
|
"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
|
-
"
|
|
7340
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
7341
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
7342
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
7343
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
7344
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
7345
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
7346
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
7347
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
7348
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
7349
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
7350
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
7351
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
7352
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
7353
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
7354
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
7355
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
7356
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
7357
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
7358
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
7359
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
7360
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
7361
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
7362
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
7363
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
7301
7364
|
]
|
|
7302
7365
|
},
|
|
7303
|
-
"hardis:org:
|
|
7366
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
7304
7367
|
"aliases": [],
|
|
7305
7368
|
"args": {},
|
|
7306
|
-
"description": "
|
|
7369
|
+
"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",
|
|
7307
7370
|
"examples": [
|
|
7308
|
-
"$ sf hardis:org:
|
|
7309
|
-
"$ sf hardis:org:
|
|
7310
|
-
"$ sf hardis:org:generate:packagexmlfull --target-org nico@example.com"
|
|
7371
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
7372
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
7311
7373
|
],
|
|
7312
7374
|
"flags": {
|
|
7313
7375
|
"json": {
|
|
@@ -7326,12 +7388,21 @@
|
|
|
7326
7388
|
"type": "option"
|
|
7327
7389
|
},
|
|
7328
7390
|
"outputfile": {
|
|
7329
|
-
"
|
|
7391
|
+
"char": "f",
|
|
7392
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7330
7393
|
"name": "outputfile",
|
|
7331
7394
|
"hasDynamicHelp": false,
|
|
7332
7395
|
"multiple": false,
|
|
7333
7396
|
"type": "option"
|
|
7334
7397
|
},
|
|
7398
|
+
"days": {
|
|
7399
|
+
"char": "t",
|
|
7400
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7401
|
+
"name": "days",
|
|
7402
|
+
"hasDynamicHelp": false,
|
|
7403
|
+
"multiple": false,
|
|
7404
|
+
"type": "option"
|
|
7405
|
+
},
|
|
7335
7406
|
"debug": {
|
|
7336
7407
|
"char": "d",
|
|
7337
7408
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7339,13 +7410,6 @@
|
|
|
7339
7410
|
"allowNo": false,
|
|
7340
7411
|
"type": "boolean"
|
|
7341
7412
|
},
|
|
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
7413
|
"websocket": {
|
|
7350
7414
|
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7351
7415
|
"name": "websocket",
|
|
@@ -7377,13 +7441,13 @@
|
|
|
7377
7441
|
},
|
|
7378
7442
|
"hasDynamicHelp": true,
|
|
7379
7443
|
"hiddenAliases": [],
|
|
7380
|
-
"id": "hardis:org:
|
|
7444
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
7381
7445
|
"pluginAlias": "sfdx-hardis",
|
|
7382
7446
|
"pluginName": "sfdx-hardis",
|
|
7383
7447
|
"pluginType": "core",
|
|
7384
7448
|
"strict": true,
|
|
7385
7449
|
"enableJsonFlag": true,
|
|
7386
|
-
"title": "
|
|
7450
|
+
"title": "Detect unused Apex classes in an org",
|
|
7387
7451
|
"requiresProject": false,
|
|
7388
7452
|
"isESM": true,
|
|
7389
7453
|
"relativePath": [
|
|
@@ -7391,43 +7455,43 @@
|
|
|
7391
7455
|
"commands",
|
|
7392
7456
|
"hardis",
|
|
7393
7457
|
"org",
|
|
7394
|
-
"
|
|
7395
|
-
"
|
|
7458
|
+
"diagnose",
|
|
7459
|
+
"unused-apex-classes.js"
|
|
7396
7460
|
],
|
|
7397
7461
|
"aliasPermutations": [],
|
|
7398
7462
|
"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
|
-
"
|
|
7463
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
7464
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
7465
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
7466
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
7467
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
7468
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
7469
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
7470
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
7471
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
7472
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
7473
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
7474
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
7475
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
7476
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
7477
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
7478
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
7479
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
7480
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
7481
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
7482
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
7483
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
7484
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
7485
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
7486
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
7423
7487
|
]
|
|
7424
7488
|
},
|
|
7425
|
-
"hardis:org:
|
|
7489
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
7426
7490
|
"aliases": [],
|
|
7427
7491
|
"args": {},
|
|
7428
|
-
"description": "
|
|
7492
|
+
"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",
|
|
7429
7493
|
"examples": [
|
|
7430
|
-
"$ sf hardis:org:
|
|
7494
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
7431
7495
|
],
|
|
7432
7496
|
"flags": {
|
|
7433
7497
|
"json": {
|
|
@@ -7445,6 +7509,14 @@
|
|
|
7445
7509
|
"multiple": false,
|
|
7446
7510
|
"type": "option"
|
|
7447
7511
|
},
|
|
7512
|
+
"outputfile": {
|
|
7513
|
+
"char": "f",
|
|
7514
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7515
|
+
"name": "outputfile",
|
|
7516
|
+
"hasDynamicHelp": false,
|
|
7517
|
+
"multiple": false,
|
|
7518
|
+
"type": "option"
|
|
7519
|
+
},
|
|
7448
7520
|
"debug": {
|
|
7449
7521
|
"char": "d",
|
|
7450
7522
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7483,159 +7555,75 @@
|
|
|
7483
7555
|
},
|
|
7484
7556
|
"hasDynamicHelp": true,
|
|
7485
7557
|
"hiddenAliases": [],
|
|
7486
|
-
"id": "hardis:org:
|
|
7558
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
7487
7559
|
"pluginAlias": "sfdx-hardis",
|
|
7488
7560
|
"pluginName": "sfdx-hardis",
|
|
7489
7561
|
"pluginType": "core",
|
|
7490
7562
|
"strict": true,
|
|
7491
7563
|
"enableJsonFlag": true,
|
|
7492
|
-
"title": "
|
|
7493
|
-
"
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7499
|
-
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7504
|
-
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7509
|
-
"command": "sf hardis:org:monitor:limits",
|
|
7510
|
-
"frequency": "daily"
|
|
7511
|
-
},
|
|
7512
|
-
{
|
|
7513
|
-
"key": "UNSECURED_CONNECTED_APPS",
|
|
7514
|
-
"title": "Detect unsecured Connected Apps in an org",
|
|
7515
|
-
"command": "sf hardis:org:diagnose:unsecure-connected-apps",
|
|
7516
|
-
"frequency": "daily"
|
|
7517
|
-
},
|
|
7518
|
-
{
|
|
7519
|
-
"key": "LICENSES",
|
|
7520
|
-
"title": "Extract licenses information",
|
|
7521
|
-
"command": "sf hardis:org:diagnose:licenses",
|
|
7522
|
-
"frequency": "weekly"
|
|
7523
|
-
},
|
|
7524
|
-
{
|
|
7525
|
-
"key": "LINT_ACCESS",
|
|
7526
|
-
"title": "Detect custom elements with no access rights defined in permission sets",
|
|
7527
|
-
"command": "sf hardis:lint:access",
|
|
7528
|
-
"frequency": "weekly"
|
|
7529
|
-
},
|
|
7530
|
-
{
|
|
7531
|
-
"key": "UNUSED_LICENSES",
|
|
7532
|
-
"title": "Detect permission set licenses that are assigned to users that do not need them",
|
|
7533
|
-
"command": "sf hardis:org:diagnose:unusedlicenses",
|
|
7534
|
-
"frequency": "weekly"
|
|
7535
|
-
},
|
|
7536
|
-
{
|
|
7537
|
-
"key": "UNUSED_USERS",
|
|
7538
|
-
"title": "Detect active users without recent logins",
|
|
7539
|
-
"command": "sf hardis:org:diagnose:unusedusers",
|
|
7540
|
-
"frequency": "weekly"
|
|
7541
|
-
},
|
|
7542
|
-
{
|
|
7543
|
-
"key": "ACTIVE_USERS",
|
|
7544
|
-
"title": "Detect active users with recent logins",
|
|
7545
|
-
"command": "sf hardis:org:diagnose:unusedusers --returnactiveusers",
|
|
7546
|
-
"frequency": "weekly"
|
|
7547
|
-
},
|
|
7548
|
-
{
|
|
7549
|
-
"key": "ORG_INFO",
|
|
7550
|
-
"title": "Get org info + SF instance info + next major upgrade date",
|
|
7551
|
-
"command": "sf hardis:org:diagnose:instanceupgrade",
|
|
7552
|
-
"frequency": "weekly"
|
|
7553
|
-
},
|
|
7554
|
-
{
|
|
7555
|
-
"key": "RELEASE_UPDATES",
|
|
7556
|
-
"title": "Gather warnings about incoming and overdue Release Updates",
|
|
7557
|
-
"command": "sf hardis:org:diagnose:releaseupdates",
|
|
7558
|
-
"frequency": "weekly"
|
|
7559
|
-
},
|
|
7560
|
-
{
|
|
7561
|
-
"key": "UNUSED_METADATAS",
|
|
7562
|
-
"title": "Detect custom labels and custom permissions that are not in use",
|
|
7563
|
-
"command": "sf hardis:lint:unusedmetadatas",
|
|
7564
|
-
"frequency": "weekly"
|
|
7565
|
-
},
|
|
7566
|
-
{
|
|
7567
|
-
"key": "UNUSED_APEX_CLASSES",
|
|
7568
|
-
"title": "Detect unused Apex classes in an org",
|
|
7569
|
-
"command": "sf hardis:org:diagnose:unused-apex-classes",
|
|
7570
|
-
"frequency": "weekly"
|
|
7571
|
-
},
|
|
7572
|
-
{
|
|
7573
|
-
"key": "CONNECTED_APPS",
|
|
7574
|
-
"title": "Detect unused Connected Apps in an org",
|
|
7575
|
-
"command": "sf hardis:org:diagnose:unused-connected-apps",
|
|
7576
|
-
"frequency": "weekly"
|
|
7577
|
-
},
|
|
7578
|
-
{
|
|
7579
|
-
"key": "METADATA_STATUS",
|
|
7580
|
-
"title": "Detect inactive metadata",
|
|
7581
|
-
"command": "sf hardis:lint:metadatastatus",
|
|
7582
|
-
"frequency": "weekly"
|
|
7583
|
-
},
|
|
7584
|
-
{
|
|
7585
|
-
"key": "MISSING_ATTRIBUTES",
|
|
7586
|
-
"title": "Detect missing description on custom field",
|
|
7587
|
-
"command": "sf hardis:lint:missingattributes",
|
|
7588
|
-
"frequency": "weekly"
|
|
7589
|
-
}
|
|
7564
|
+
"title": "Unused Connected Apps in an org",
|
|
7565
|
+
"allowedInactiveConnectedApps": [
|
|
7566
|
+
"Ant Migration Tool",
|
|
7567
|
+
"Chatter Desktop",
|
|
7568
|
+
"Chatter Mobile for BlackBerry",
|
|
7569
|
+
"Force.com IDE",
|
|
7570
|
+
"OIQ_Integration",
|
|
7571
|
+
"Salesforce CLI",
|
|
7572
|
+
"Salesforce Files",
|
|
7573
|
+
"Salesforce Mobile Dashboards",
|
|
7574
|
+
"Salesforce Touch",
|
|
7575
|
+
"Salesforce for Outlook",
|
|
7576
|
+
"SalesforceA",
|
|
7577
|
+
"SalesforceA for Android",
|
|
7578
|
+
"SalesforceA for iOS",
|
|
7579
|
+
"SalesforceDX Namespace Registry",
|
|
7580
|
+
"SalesforceIQ"
|
|
7590
7581
|
],
|
|
7591
|
-
"requiresProject":
|
|
7592
|
-
"triggerNotification": true,
|
|
7582
|
+
"requiresProject": false,
|
|
7593
7583
|
"isESM": true,
|
|
7594
7584
|
"relativePath": [
|
|
7595
7585
|
"lib",
|
|
7596
7586
|
"commands",
|
|
7597
7587
|
"hardis",
|
|
7598
7588
|
"org",
|
|
7599
|
-
"
|
|
7600
|
-
"
|
|
7589
|
+
"diagnose",
|
|
7590
|
+
"unused-connected-apps.js"
|
|
7601
7591
|
],
|
|
7602
7592
|
"aliasPermutations": [],
|
|
7603
7593
|
"permutations": [
|
|
7604
|
-
"hardis:org:
|
|
7605
|
-
"org:hardis:
|
|
7606
|
-
"org:
|
|
7607
|
-
"org:
|
|
7608
|
-
"hardis:
|
|
7609
|
-
"
|
|
7610
|
-
"
|
|
7611
|
-
"
|
|
7612
|
-
"hardis:
|
|
7613
|
-
"
|
|
7614
|
-
"
|
|
7615
|
-
"
|
|
7616
|
-
"hardis:org:
|
|
7617
|
-
"org:hardis:
|
|
7618
|
-
"org:
|
|
7619
|
-
"org:
|
|
7620
|
-
"hardis:
|
|
7621
|
-
"
|
|
7622
|
-
"
|
|
7623
|
-
"
|
|
7624
|
-
"hardis:
|
|
7625
|
-
"
|
|
7626
|
-
"
|
|
7627
|
-
"
|
|
7594
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
7595
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
7596
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
7597
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
7598
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
7599
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
7600
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
7601
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
7602
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
7603
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
7604
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
7605
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
7606
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
7607
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
7608
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
7609
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
7610
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
7611
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
7612
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
7613
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
7614
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
7615
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
7616
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
7617
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
7628
7618
|
]
|
|
7629
7619
|
},
|
|
7630
|
-
"hardis:org:
|
|
7620
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
7631
7621
|
"aliases": [],
|
|
7632
7622
|
"args": {},
|
|
7633
|
-
"description": "
|
|
7623
|
+
"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",
|
|
7634
7624
|
"examples": [
|
|
7635
|
-
"$ sf hardis:org:
|
|
7636
|
-
"$ sf hardis:org:
|
|
7637
|
-
"$ sf hardis:org:monitor:backup --full --exclude-namespaces",
|
|
7638
|
-
"$ sf hardis:org:monitor:backup --full --exclude-namespaces --full-apply-filters"
|
|
7625
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
7626
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
7639
7627
|
],
|
|
7640
7628
|
"flags": {
|
|
7641
7629
|
"json": {
|
|
@@ -7653,49 +7641,6 @@
|
|
|
7653
7641
|
"multiple": false,
|
|
7654
7642
|
"type": "option"
|
|
7655
7643
|
},
|
|
7656
|
-
"full": {
|
|
7657
|
-
"description": "Dot not take in account filtering using package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES. Efficient but much much slower !",
|
|
7658
|
-
"name": "full",
|
|
7659
|
-
"allowNo": false,
|
|
7660
|
-
"type": "boolean"
|
|
7661
|
-
},
|
|
7662
|
-
"max-by-chunk": {
|
|
7663
|
-
"char": "m",
|
|
7664
|
-
"description": "If mode --full is activated, maximum number of metadatas in a package.xml chunk",
|
|
7665
|
-
"name": "max-by-chunk",
|
|
7666
|
-
"default": 3000,
|
|
7667
|
-
"hasDynamicHelp": false,
|
|
7668
|
-
"multiple": false,
|
|
7669
|
-
"type": "option"
|
|
7670
|
-
},
|
|
7671
|
-
"exclude-namespaces": {
|
|
7672
|
-
"char": "e",
|
|
7673
|
-
"description": "If mode --full is activated, exclude namespaced metadatas",
|
|
7674
|
-
"name": "exclude-namespaces",
|
|
7675
|
-
"allowNo": false,
|
|
7676
|
-
"type": "boolean"
|
|
7677
|
-
},
|
|
7678
|
-
"full-apply-filters": {
|
|
7679
|
-
"char": "z",
|
|
7680
|
-
"description": "If mode --full is activated, apply filters of manifest/package-skip-items.xml and MONITORING_BACKUP_SKIP_METADATA_TYPES anyway",
|
|
7681
|
-
"name": "full-apply-filters",
|
|
7682
|
-
"allowNo": false,
|
|
7683
|
-
"type": "boolean"
|
|
7684
|
-
},
|
|
7685
|
-
"start-chunk": {
|
|
7686
|
-
"description": "Use this parameter to troubleshoot a specific chunk. It will be used as the first chunk to retrieve",
|
|
7687
|
-
"name": "start-chunk",
|
|
7688
|
-
"default": 1,
|
|
7689
|
-
"hasDynamicHelp": false,
|
|
7690
|
-
"multiple": false,
|
|
7691
|
-
"type": "option"
|
|
7692
|
-
},
|
|
7693
|
-
"skip-doc": {
|
|
7694
|
-
"description": "Skip the generation of project documentation at the end of the command",
|
|
7695
|
-
"name": "skip-doc",
|
|
7696
|
-
"allowNo": false,
|
|
7697
|
-
"type": "boolean"
|
|
7698
|
-
},
|
|
7699
7644
|
"outputfile": {
|
|
7700
7645
|
"char": "f",
|
|
7701
7646
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -7742,58 +7687,79 @@
|
|
|
7742
7687
|
},
|
|
7743
7688
|
"hasDynamicHelp": true,
|
|
7744
7689
|
"hiddenAliases": [],
|
|
7745
|
-
"id": "hardis:org:
|
|
7690
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
7746
7691
|
"pluginAlias": "sfdx-hardis",
|
|
7747
7692
|
"pluginName": "sfdx-hardis",
|
|
7748
7693
|
"pluginType": "core",
|
|
7749
7694
|
"strict": true,
|
|
7750
7695
|
"enableJsonFlag": true,
|
|
7751
|
-
"title": "
|
|
7752
|
-
"requiresProject":
|
|
7753
|
-
"
|
|
7696
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
7697
|
+
"requiresProject": false,
|
|
7698
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
7699
|
+
"Sales_User"
|
|
7700
|
+
],
|
|
7701
|
+
"permSetsPermSetLicenses": [
|
|
7702
|
+
{
|
|
7703
|
+
"permSet": "Sales_User",
|
|
7704
|
+
"permSetLicense": "SalesUserPsl"
|
|
7705
|
+
}
|
|
7706
|
+
],
|
|
7707
|
+
"profilesPermissionSetLicenses": [
|
|
7708
|
+
{
|
|
7709
|
+
"profile": "Salesforce API Only",
|
|
7710
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
7711
|
+
}
|
|
7712
|
+
],
|
|
7713
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
7714
|
+
"IdentityConnect"
|
|
7715
|
+
],
|
|
7754
7716
|
"isESM": true,
|
|
7755
7717
|
"relativePath": [
|
|
7756
7718
|
"lib",
|
|
7757
7719
|
"commands",
|
|
7758
7720
|
"hardis",
|
|
7759
7721
|
"org",
|
|
7760
|
-
"
|
|
7761
|
-
"
|
|
7722
|
+
"diagnose",
|
|
7723
|
+
"unusedlicenses.js"
|
|
7762
7724
|
],
|
|
7763
7725
|
"aliasPermutations": [],
|
|
7764
7726
|
"permutations": [
|
|
7765
|
-
"hardis:org:
|
|
7766
|
-
"org:hardis:
|
|
7767
|
-
"org:
|
|
7768
|
-
"org:
|
|
7769
|
-
"hardis:
|
|
7770
|
-
"
|
|
7771
|
-
"
|
|
7772
|
-
"
|
|
7773
|
-
"hardis:
|
|
7774
|
-
"
|
|
7775
|
-
"
|
|
7776
|
-
"
|
|
7777
|
-
"hardis:org:
|
|
7778
|
-
"org:hardis:
|
|
7779
|
-
"org:
|
|
7780
|
-
"org:
|
|
7781
|
-
"hardis:
|
|
7782
|
-
"
|
|
7783
|
-
"
|
|
7784
|
-
"
|
|
7785
|
-
"hardis:
|
|
7786
|
-
"
|
|
7787
|
-
"
|
|
7788
|
-
"
|
|
7727
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
7728
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
7729
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
7730
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
7731
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
7732
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
7733
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
7734
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
7735
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
7736
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
7737
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
7738
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
7739
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
7740
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
7741
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
7742
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
7743
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
7744
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
7745
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
7746
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
7747
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
7748
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
7749
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
7750
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
7789
7751
|
]
|
|
7790
7752
|
},
|
|
7791
|
-
"hardis:org:
|
|
7753
|
+
"hardis:org:diagnose:unusedusers": {
|
|
7792
7754
|
"aliases": [],
|
|
7793
7755
|
"args": {},
|
|
7794
|
-
"description": "\n## Command Behavior\n\n**
|
|
7756
|
+
"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>",
|
|
7795
7757
|
"examples": [
|
|
7796
|
-
"$ sf hardis:org:
|
|
7758
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
7759
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
7760
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
7761
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
7762
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7797
7763
|
],
|
|
7798
7764
|
"flags": {
|
|
7799
7765
|
"json": {
|
|
@@ -7819,6 +7785,41 @@
|
|
|
7819
7785
|
"multiple": false,
|
|
7820
7786
|
"type": "option"
|
|
7821
7787
|
},
|
|
7788
|
+
"days": {
|
|
7789
|
+
"char": "t",
|
|
7790
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7791
|
+
"name": "days",
|
|
7792
|
+
"hasDynamicHelp": false,
|
|
7793
|
+
"multiple": false,
|
|
7794
|
+
"type": "option"
|
|
7795
|
+
},
|
|
7796
|
+
"licensetypes": {
|
|
7797
|
+
"char": "l",
|
|
7798
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
7799
|
+
"name": "licensetypes",
|
|
7800
|
+
"hasDynamicHelp": false,
|
|
7801
|
+
"multiple": false,
|
|
7802
|
+
"options": [
|
|
7803
|
+
"all",
|
|
7804
|
+
"all-crm",
|
|
7805
|
+
"all-paying"
|
|
7806
|
+
],
|
|
7807
|
+
"type": "option"
|
|
7808
|
+
},
|
|
7809
|
+
"licenseidentifiers": {
|
|
7810
|
+
"char": "i",
|
|
7811
|
+
"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",
|
|
7812
|
+
"name": "licenseidentifiers",
|
|
7813
|
+
"hasDynamicHelp": false,
|
|
7814
|
+
"multiple": false,
|
|
7815
|
+
"type": "option"
|
|
7816
|
+
},
|
|
7817
|
+
"returnactiveusers": {
|
|
7818
|
+
"description": "Inverts the command by returning the active users",
|
|
7819
|
+
"name": "returnactiveusers",
|
|
7820
|
+
"allowNo": false,
|
|
7821
|
+
"type": "boolean"
|
|
7822
|
+
},
|
|
7822
7823
|
"debug": {
|
|
7823
7824
|
"char": "d",
|
|
7824
7825
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7857,50 +7858,49 @@
|
|
|
7857
7858
|
},
|
|
7858
7859
|
"hasDynamicHelp": true,
|
|
7859
7860
|
"hiddenAliases": [],
|
|
7860
|
-
"id": "hardis:org:
|
|
7861
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
7861
7862
|
"pluginAlias": "sfdx-hardis",
|
|
7862
7863
|
"pluginName": "sfdx-hardis",
|
|
7863
7864
|
"pluginType": "core",
|
|
7864
7865
|
"strict": true,
|
|
7865
7866
|
"enableJsonFlag": true,
|
|
7866
|
-
"title": "
|
|
7867
|
-
"requiresProject":
|
|
7868
|
-
"triggerNotification": true,
|
|
7867
|
+
"title": "Detect unused Users in Salesforce",
|
|
7868
|
+
"requiresProject": false,
|
|
7869
7869
|
"isESM": true,
|
|
7870
7870
|
"relativePath": [
|
|
7871
7871
|
"lib",
|
|
7872
7872
|
"commands",
|
|
7873
7873
|
"hardis",
|
|
7874
7874
|
"org",
|
|
7875
|
-
"
|
|
7876
|
-
"
|
|
7875
|
+
"diagnose",
|
|
7876
|
+
"unusedusers.js"
|
|
7877
7877
|
],
|
|
7878
7878
|
"aliasPermutations": [],
|
|
7879
7879
|
"permutations": [
|
|
7880
|
-
"hardis:org:
|
|
7881
|
-
"org:hardis:
|
|
7882
|
-
"org:
|
|
7883
|
-
"org:
|
|
7884
|
-
"hardis:
|
|
7885
|
-
"
|
|
7886
|
-
"
|
|
7887
|
-
"
|
|
7888
|
-
"hardis:
|
|
7889
|
-
"
|
|
7890
|
-
"
|
|
7891
|
-
"
|
|
7892
|
-
"hardis:org:
|
|
7893
|
-
"org:hardis:
|
|
7894
|
-
"org:
|
|
7895
|
-
"org:
|
|
7896
|
-
"hardis:
|
|
7897
|
-
"
|
|
7898
|
-
"
|
|
7899
|
-
"
|
|
7900
|
-
"hardis:
|
|
7901
|
-
"
|
|
7902
|
-
"
|
|
7903
|
-
"
|
|
7880
|
+
"hardis:org:diagnose:unusedusers",
|
|
7881
|
+
"org:hardis:diagnose:unusedusers",
|
|
7882
|
+
"org:diagnose:hardis:unusedusers",
|
|
7883
|
+
"org:diagnose:unusedusers:hardis",
|
|
7884
|
+
"hardis:diagnose:org:unusedusers",
|
|
7885
|
+
"diagnose:hardis:org:unusedusers",
|
|
7886
|
+
"diagnose:org:hardis:unusedusers",
|
|
7887
|
+
"diagnose:org:unusedusers:hardis",
|
|
7888
|
+
"hardis:diagnose:unusedusers:org",
|
|
7889
|
+
"diagnose:hardis:unusedusers:org",
|
|
7890
|
+
"diagnose:unusedusers:hardis:org",
|
|
7891
|
+
"diagnose:unusedusers:org:hardis",
|
|
7892
|
+
"hardis:org:unusedusers:diagnose",
|
|
7893
|
+
"org:hardis:unusedusers:diagnose",
|
|
7894
|
+
"org:unusedusers:hardis:diagnose",
|
|
7895
|
+
"org:unusedusers:diagnose:hardis",
|
|
7896
|
+
"hardis:unusedusers:org:diagnose",
|
|
7897
|
+
"unusedusers:hardis:org:diagnose",
|
|
7898
|
+
"unusedusers:org:hardis:diagnose",
|
|
7899
|
+
"unusedusers:org:diagnose:hardis",
|
|
7900
|
+
"hardis:unusedusers:diagnose:org",
|
|
7901
|
+
"unusedusers:hardis:diagnose:org",
|
|
7902
|
+
"unusedusers:diagnose:hardis:org",
|
|
7903
|
+
"unusedusers:diagnose:org:hardis"
|
|
7904
7904
|
]
|
|
7905
7905
|
},
|
|
7906
7906
|
"hardis:org:purge:apexlog": {
|
|
@@ -12653,262 +12653,47 @@
|
|
|
12653
12653
|
"enableJsonFlag": true,
|
|
12654
12654
|
"requiresProject": true,
|
|
12655
12655
|
"isESM": true,
|
|
12656
|
-
"relativePath": [
|
|
12657
|
-
"lib",
|
|
12658
|
-
"commands",
|
|
12659
|
-
"hardis",
|
|
12660
|
-
"project",
|
|
12661
|
-
"deploy",
|
|
12662
|
-
"validate.js"
|
|
12663
|
-
],
|
|
12664
|
-
"aliasPermutations": [
|
|
12665
|
-
"hardis:deploy:validate",
|
|
12666
|
-
"deploy:hardis:validate",
|
|
12667
|
-
"deploy:validate:hardis",
|
|
12668
|
-
"hardis:validate:deploy",
|
|
12669
|
-
"validate:hardis:deploy",
|
|
12670
|
-
"validate:deploy:hardis"
|
|
12671
|
-
],
|
|
12672
|
-
"permutations": [
|
|
12673
|
-
"hardis:project:deploy:validate",
|
|
12674
|
-
"project:hardis:deploy:validate",
|
|
12675
|
-
"project:deploy:hardis:validate",
|
|
12676
|
-
"project:deploy:validate:hardis",
|
|
12677
|
-
"hardis:deploy:project:validate",
|
|
12678
|
-
"deploy:hardis:project:validate",
|
|
12679
|
-
"deploy:project:hardis:validate",
|
|
12680
|
-
"deploy:project:validate:hardis",
|
|
12681
|
-
"hardis:deploy:validate:project",
|
|
12682
|
-
"deploy:hardis:validate:project",
|
|
12683
|
-
"deploy:validate:hardis:project",
|
|
12684
|
-
"deploy:validate:project:hardis",
|
|
12685
|
-
"hardis:project:validate:deploy",
|
|
12686
|
-
"project:hardis:validate:deploy",
|
|
12687
|
-
"project:validate:hardis:deploy",
|
|
12688
|
-
"project:validate:deploy:hardis",
|
|
12689
|
-
"hardis:validate:project:deploy",
|
|
12690
|
-
"validate:hardis:project:deploy",
|
|
12691
|
-
"validate:project:hardis:deploy",
|
|
12692
|
-
"validate:project:deploy:hardis",
|
|
12693
|
-
"hardis:validate:deploy:project",
|
|
12694
|
-
"validate:hardis:deploy:project",
|
|
12695
|
-
"validate:deploy:hardis:project",
|
|
12696
|
-
"validate:deploy:project:hardis"
|
|
12697
|
-
]
|
|
12698
|
-
},
|
|
12699
|
-
"hardis:project:fix:profiletabs": {
|
|
12700
|
-
"aliases": [],
|
|
12701
|
-
"args": {},
|
|
12702
|
-
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
|
|
12703
|
-
"examples": [
|
|
12704
|
-
"$ sf hardis:project:fix:profiletabs"
|
|
12705
|
-
],
|
|
12706
|
-
"flags": {
|
|
12707
|
-
"json": {
|
|
12708
|
-
"description": "Format output as json.",
|
|
12709
|
-
"helpGroup": "GLOBAL",
|
|
12710
|
-
"name": "json",
|
|
12711
|
-
"allowNo": false,
|
|
12712
|
-
"type": "boolean"
|
|
12713
|
-
},
|
|
12714
|
-
"flags-dir": {
|
|
12715
|
-
"helpGroup": "GLOBAL",
|
|
12716
|
-
"name": "flags-dir",
|
|
12717
|
-
"summary": "Import flag values from a directory.",
|
|
12718
|
-
"hasDynamicHelp": false,
|
|
12719
|
-
"multiple": false,
|
|
12720
|
-
"type": "option"
|
|
12721
|
-
},
|
|
12722
|
-
"path": {
|
|
12723
|
-
"char": "p",
|
|
12724
|
-
"description": "Root folder",
|
|
12725
|
-
"name": "path",
|
|
12726
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12727
|
-
"hasDynamicHelp": false,
|
|
12728
|
-
"multiple": false,
|
|
12729
|
-
"type": "option"
|
|
12730
|
-
},
|
|
12731
|
-
"debug": {
|
|
12732
|
-
"char": "d",
|
|
12733
|
-
"description": "Activate debug mode (more logs)",
|
|
12734
|
-
"name": "debug",
|
|
12735
|
-
"allowNo": false,
|
|
12736
|
-
"type": "boolean"
|
|
12737
|
-
},
|
|
12738
|
-
"websocket": {
|
|
12739
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12740
|
-
"name": "websocket",
|
|
12741
|
-
"hasDynamicHelp": false,
|
|
12742
|
-
"multiple": false,
|
|
12743
|
-
"type": "option"
|
|
12744
|
-
},
|
|
12745
|
-
"skipauth": {
|
|
12746
|
-
"description": "Skip authentication check when a default username is required",
|
|
12747
|
-
"name": "skipauth",
|
|
12748
|
-
"allowNo": false,
|
|
12749
|
-
"type": "boolean"
|
|
12750
|
-
},
|
|
12751
|
-
"target-org": {
|
|
12752
|
-
"aliases": [
|
|
12753
|
-
"targetusername",
|
|
12754
|
-
"u"
|
|
12755
|
-
],
|
|
12756
|
-
"char": "o",
|
|
12757
|
-
"deprecateAliases": true,
|
|
12758
|
-
"name": "target-org",
|
|
12759
|
-
"noCacheDefault": true,
|
|
12760
|
-
"required": true,
|
|
12761
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
12762
|
-
"hasDynamicHelp": true,
|
|
12763
|
-
"multiple": false,
|
|
12764
|
-
"type": "option"
|
|
12765
|
-
}
|
|
12766
|
-
},
|
|
12767
|
-
"hasDynamicHelp": true,
|
|
12768
|
-
"hiddenAliases": [],
|
|
12769
|
-
"id": "hardis:project:fix:profiletabs",
|
|
12770
|
-
"pluginAlias": "sfdx-hardis",
|
|
12771
|
-
"pluginName": "sfdx-hardis",
|
|
12772
|
-
"pluginType": "core",
|
|
12773
|
-
"strict": true,
|
|
12774
|
-
"enableJsonFlag": true,
|
|
12775
|
-
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
12776
|
-
"requiresProject": true,
|
|
12777
|
-
"isESM": true,
|
|
12778
|
-
"relativePath": [
|
|
12779
|
-
"lib",
|
|
12780
|
-
"commands",
|
|
12781
|
-
"hardis",
|
|
12782
|
-
"project",
|
|
12783
|
-
"fix",
|
|
12784
|
-
"profiletabs.js"
|
|
12785
|
-
],
|
|
12786
|
-
"aliasPermutations": [],
|
|
12787
|
-
"permutations": [
|
|
12788
|
-
"hardis:project:fix:profiletabs",
|
|
12789
|
-
"project:hardis:fix:profiletabs",
|
|
12790
|
-
"project:fix:hardis:profiletabs",
|
|
12791
|
-
"project:fix:profiletabs:hardis",
|
|
12792
|
-
"hardis:fix:project:profiletabs",
|
|
12793
|
-
"fix:hardis:project:profiletabs",
|
|
12794
|
-
"fix:project:hardis:profiletabs",
|
|
12795
|
-
"fix:project:profiletabs:hardis",
|
|
12796
|
-
"hardis:fix:profiletabs:project",
|
|
12797
|
-
"fix:hardis:profiletabs:project",
|
|
12798
|
-
"fix:profiletabs:hardis:project",
|
|
12799
|
-
"fix:profiletabs:project:hardis",
|
|
12800
|
-
"hardis:project:profiletabs:fix",
|
|
12801
|
-
"project:hardis:profiletabs:fix",
|
|
12802
|
-
"project:profiletabs:hardis:fix",
|
|
12803
|
-
"project:profiletabs:fix:hardis",
|
|
12804
|
-
"hardis:profiletabs:project:fix",
|
|
12805
|
-
"profiletabs:hardis:project:fix",
|
|
12806
|
-
"profiletabs:project:hardis:fix",
|
|
12807
|
-
"profiletabs:project:fix:hardis",
|
|
12808
|
-
"hardis:profiletabs:fix:project",
|
|
12809
|
-
"profiletabs:hardis:fix:project",
|
|
12810
|
-
"profiletabs:fix:hardis:project",
|
|
12811
|
-
"profiletabs:fix:project:hardis"
|
|
12812
|
-
]
|
|
12813
|
-
},
|
|
12814
|
-
"hardis:project:fix:v53flexipages": {
|
|
12815
|
-
"aliases": [],
|
|
12816
|
-
"args": {},
|
|
12817
|
-
"description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n</details>\n",
|
|
12818
|
-
"examples": [
|
|
12819
|
-
"$ sf hardis:project:fix:v53flexipages"
|
|
12820
|
-
],
|
|
12821
|
-
"flags": {
|
|
12822
|
-
"json": {
|
|
12823
|
-
"description": "Format output as json.",
|
|
12824
|
-
"helpGroup": "GLOBAL",
|
|
12825
|
-
"name": "json",
|
|
12826
|
-
"allowNo": false,
|
|
12827
|
-
"type": "boolean"
|
|
12828
|
-
},
|
|
12829
|
-
"flags-dir": {
|
|
12830
|
-
"helpGroup": "GLOBAL",
|
|
12831
|
-
"name": "flags-dir",
|
|
12832
|
-
"summary": "Import flag values from a directory.",
|
|
12833
|
-
"hasDynamicHelp": false,
|
|
12834
|
-
"multiple": false,
|
|
12835
|
-
"type": "option"
|
|
12836
|
-
},
|
|
12837
|
-
"path": {
|
|
12838
|
-
"char": "p",
|
|
12839
|
-
"description": "Root folder",
|
|
12840
|
-
"name": "path",
|
|
12841
|
-
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
12842
|
-
"hasDynamicHelp": false,
|
|
12843
|
-
"multiple": false,
|
|
12844
|
-
"type": "option"
|
|
12845
|
-
},
|
|
12846
|
-
"debug": {
|
|
12847
|
-
"char": "d",
|
|
12848
|
-
"description": "Activate debug mode (more logs)",
|
|
12849
|
-
"name": "debug",
|
|
12850
|
-
"allowNo": false,
|
|
12851
|
-
"type": "boolean"
|
|
12852
|
-
},
|
|
12853
|
-
"websocket": {
|
|
12854
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
12855
|
-
"name": "websocket",
|
|
12856
|
-
"hasDynamicHelp": false,
|
|
12857
|
-
"multiple": false,
|
|
12858
|
-
"type": "option"
|
|
12859
|
-
},
|
|
12860
|
-
"skipauth": {
|
|
12861
|
-
"description": "Skip authentication check when a default username is required",
|
|
12862
|
-
"name": "skipauth",
|
|
12863
|
-
"allowNo": false,
|
|
12864
|
-
"type": "boolean"
|
|
12865
|
-
}
|
|
12866
|
-
},
|
|
12867
|
-
"hasDynamicHelp": false,
|
|
12868
|
-
"hiddenAliases": [],
|
|
12869
|
-
"id": "hardis:project:fix:v53flexipages",
|
|
12870
|
-
"pluginAlias": "sfdx-hardis",
|
|
12871
|
-
"pluginName": "sfdx-hardis",
|
|
12872
|
-
"pluginType": "core",
|
|
12873
|
-
"strict": true,
|
|
12874
|
-
"enableJsonFlag": true,
|
|
12875
|
-
"title": "Fix flexipages for v53",
|
|
12876
|
-
"requiresProject": true,
|
|
12877
|
-
"isESM": true,
|
|
12878
|
-
"relativePath": [
|
|
12879
|
-
"lib",
|
|
12880
|
-
"commands",
|
|
12881
|
-
"hardis",
|
|
12882
|
-
"project",
|
|
12883
|
-
"fix",
|
|
12884
|
-
"v53flexipages.js"
|
|
12885
|
-
],
|
|
12886
|
-
"aliasPermutations": [],
|
|
12887
|
-
"permutations": [
|
|
12888
|
-
"hardis:project:fix:v53flexipages",
|
|
12889
|
-
"project:hardis:fix:v53flexipages",
|
|
12890
|
-
"project:fix:hardis:v53flexipages",
|
|
12891
|
-
"project:fix:v53flexipages:hardis",
|
|
12892
|
-
"hardis:fix:project:v53flexipages",
|
|
12893
|
-
"fix:hardis:project:v53flexipages",
|
|
12894
|
-
"fix:project:hardis:v53flexipages",
|
|
12895
|
-
"fix:project:v53flexipages:hardis",
|
|
12896
|
-
"hardis:fix:v53flexipages:project",
|
|
12897
|
-
"fix:hardis:v53flexipages:project",
|
|
12898
|
-
"fix:v53flexipages:hardis:project",
|
|
12899
|
-
"fix:v53flexipages:project:hardis",
|
|
12900
|
-
"hardis:project:v53flexipages:fix",
|
|
12901
|
-
"project:hardis:v53flexipages:fix",
|
|
12902
|
-
"project:v53flexipages:hardis:fix",
|
|
12903
|
-
"project:v53flexipages:fix:hardis",
|
|
12904
|
-
"hardis:v53flexipages:project:fix",
|
|
12905
|
-
"v53flexipages:hardis:project:fix",
|
|
12906
|
-
"v53flexipages:project:hardis:fix",
|
|
12907
|
-
"v53flexipages:project:fix:hardis",
|
|
12908
|
-
"hardis:v53flexipages:fix:project",
|
|
12909
|
-
"v53flexipages:hardis:fix:project",
|
|
12910
|
-
"v53flexipages:fix:hardis:project",
|
|
12911
|
-
"v53flexipages:fix:project:hardis"
|
|
12656
|
+
"relativePath": [
|
|
12657
|
+
"lib",
|
|
12658
|
+
"commands",
|
|
12659
|
+
"hardis",
|
|
12660
|
+
"project",
|
|
12661
|
+
"deploy",
|
|
12662
|
+
"validate.js"
|
|
12663
|
+
],
|
|
12664
|
+
"aliasPermutations": [
|
|
12665
|
+
"hardis:deploy:validate",
|
|
12666
|
+
"deploy:hardis:validate",
|
|
12667
|
+
"deploy:validate:hardis",
|
|
12668
|
+
"hardis:validate:deploy",
|
|
12669
|
+
"validate:hardis:deploy",
|
|
12670
|
+
"validate:deploy:hardis"
|
|
12671
|
+
],
|
|
12672
|
+
"permutations": [
|
|
12673
|
+
"hardis:project:deploy:validate",
|
|
12674
|
+
"project:hardis:deploy:validate",
|
|
12675
|
+
"project:deploy:hardis:validate",
|
|
12676
|
+
"project:deploy:validate:hardis",
|
|
12677
|
+
"hardis:deploy:project:validate",
|
|
12678
|
+
"deploy:hardis:project:validate",
|
|
12679
|
+
"deploy:project:hardis:validate",
|
|
12680
|
+
"deploy:project:validate:hardis",
|
|
12681
|
+
"hardis:deploy:validate:project",
|
|
12682
|
+
"deploy:hardis:validate:project",
|
|
12683
|
+
"deploy:validate:hardis:project",
|
|
12684
|
+
"deploy:validate:project:hardis",
|
|
12685
|
+
"hardis:project:validate:deploy",
|
|
12686
|
+
"project:hardis:validate:deploy",
|
|
12687
|
+
"project:validate:hardis:deploy",
|
|
12688
|
+
"project:validate:deploy:hardis",
|
|
12689
|
+
"hardis:validate:project:deploy",
|
|
12690
|
+
"validate:hardis:project:deploy",
|
|
12691
|
+
"validate:project:hardis:deploy",
|
|
12692
|
+
"validate:project:deploy:hardis",
|
|
12693
|
+
"hardis:validate:deploy:project",
|
|
12694
|
+
"validate:hardis:deploy:project",
|
|
12695
|
+
"validate:deploy:hardis:project",
|
|
12696
|
+
"validate:deploy:project:hardis"
|
|
12912
12697
|
]
|
|
12913
12698
|
},
|
|
12914
12699
|
"hardis:project:generate:bypass": {
|
|
@@ -13306,6 +13091,221 @@
|
|
|
13306
13091
|
"gitdelta:generate:project:hardis"
|
|
13307
13092
|
]
|
|
13308
13093
|
},
|
|
13094
|
+
"hardis:project:fix:profiletabs": {
|
|
13095
|
+
"aliases": [],
|
|
13096
|
+
"args": {},
|
|
13097
|
+
"description": "\n## Command Behavior\n\n**Interactively updates tab visibility settings in Salesforce profiles, addressing a common issue where tab visibilities are not correctly retrieved by `sf project retrieve start`.**\n\nThis command provides a user-friendly interface to manage tab settings within your profile XML files, ensuring that your local project accurately reflects the intended tab configurations in your Salesforce org.\n\nKey functionalities:\n\n- **Interactive Tab Selection:** Displays a multi-select menu of all available tabs in your org, allowing you to choose which tabs to update.\n- **Visibility Control:** Lets you set the visibility for the selected tabs to either `DefaultOn` (Visible) or `Hidden`.\n- **Profile Selection:** Presents a multi-select menu of all .profile-meta.xml files in your project, allowing you to apply the tab visibility changes to specific profiles.\n- **XML Updates:** Modifies the <tabVisibilities> section of the selected profile XML files to reflect the chosen tab settings. If a tab visibility setting already exists for a selected tab, it will be updated; otherwise, a new one will be added.\n- **Sorted Output:** The <tabVisibilities> in the updated profile XML files are sorted alphabetically for consistency and readability.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Queries (Tooling API):** It queries the `TabDefinition` object using `soqlQueryTooling` to retrieve a list of all available tabs in the target org.\n- **File Discovery:** Uses `glob` to find all .profile-meta.xml files within the specified project path.\n- **Interactive Prompts:** Leverages the `prompts` library to create interactive menus for selecting tabs, visibility settings, and profiles.\n- **XML Parsing and Manipulation:** Uses `parseXmlFile` to read the content of profile XML files and `writeXmlFile` to write the modified content back. It manipulates the `tabVisibilities` array within the parsed XML to add or update tab settings.\n- **Array Sorting:** Employs the `sort-array` library to sort the `tabVisibilities` alphabetically by tab name.\n- **Logging:** Provides feedback to the user about which profiles have been updated and a summary of the changes.\n</details>\n",
|
|
13098
|
+
"examples": [
|
|
13099
|
+
"$ sf hardis:project:fix:profiletabs"
|
|
13100
|
+
],
|
|
13101
|
+
"flags": {
|
|
13102
|
+
"json": {
|
|
13103
|
+
"description": "Format output as json.",
|
|
13104
|
+
"helpGroup": "GLOBAL",
|
|
13105
|
+
"name": "json",
|
|
13106
|
+
"allowNo": false,
|
|
13107
|
+
"type": "boolean"
|
|
13108
|
+
},
|
|
13109
|
+
"flags-dir": {
|
|
13110
|
+
"helpGroup": "GLOBAL",
|
|
13111
|
+
"name": "flags-dir",
|
|
13112
|
+
"summary": "Import flag values from a directory.",
|
|
13113
|
+
"hasDynamicHelp": false,
|
|
13114
|
+
"multiple": false,
|
|
13115
|
+
"type": "option"
|
|
13116
|
+
},
|
|
13117
|
+
"path": {
|
|
13118
|
+
"char": "p",
|
|
13119
|
+
"description": "Root folder",
|
|
13120
|
+
"name": "path",
|
|
13121
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
13122
|
+
"hasDynamicHelp": false,
|
|
13123
|
+
"multiple": false,
|
|
13124
|
+
"type": "option"
|
|
13125
|
+
},
|
|
13126
|
+
"debug": {
|
|
13127
|
+
"char": "d",
|
|
13128
|
+
"description": "Activate debug mode (more logs)",
|
|
13129
|
+
"name": "debug",
|
|
13130
|
+
"allowNo": false,
|
|
13131
|
+
"type": "boolean"
|
|
13132
|
+
},
|
|
13133
|
+
"websocket": {
|
|
13134
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
13135
|
+
"name": "websocket",
|
|
13136
|
+
"hasDynamicHelp": false,
|
|
13137
|
+
"multiple": false,
|
|
13138
|
+
"type": "option"
|
|
13139
|
+
},
|
|
13140
|
+
"skipauth": {
|
|
13141
|
+
"description": "Skip authentication check when a default username is required",
|
|
13142
|
+
"name": "skipauth",
|
|
13143
|
+
"allowNo": false,
|
|
13144
|
+
"type": "boolean"
|
|
13145
|
+
},
|
|
13146
|
+
"target-org": {
|
|
13147
|
+
"aliases": [
|
|
13148
|
+
"targetusername",
|
|
13149
|
+
"u"
|
|
13150
|
+
],
|
|
13151
|
+
"char": "o",
|
|
13152
|
+
"deprecateAliases": true,
|
|
13153
|
+
"name": "target-org",
|
|
13154
|
+
"noCacheDefault": true,
|
|
13155
|
+
"required": true,
|
|
13156
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
13157
|
+
"hasDynamicHelp": true,
|
|
13158
|
+
"multiple": false,
|
|
13159
|
+
"type": "option"
|
|
13160
|
+
}
|
|
13161
|
+
},
|
|
13162
|
+
"hasDynamicHelp": true,
|
|
13163
|
+
"hiddenAliases": [],
|
|
13164
|
+
"id": "hardis:project:fix:profiletabs",
|
|
13165
|
+
"pluginAlias": "sfdx-hardis",
|
|
13166
|
+
"pluginName": "sfdx-hardis",
|
|
13167
|
+
"pluginType": "core",
|
|
13168
|
+
"strict": true,
|
|
13169
|
+
"enableJsonFlag": true,
|
|
13170
|
+
"title": "Fix profiles to add tabs that are not retrieved by SF CLI",
|
|
13171
|
+
"requiresProject": true,
|
|
13172
|
+
"isESM": true,
|
|
13173
|
+
"relativePath": [
|
|
13174
|
+
"lib",
|
|
13175
|
+
"commands",
|
|
13176
|
+
"hardis",
|
|
13177
|
+
"project",
|
|
13178
|
+
"fix",
|
|
13179
|
+
"profiletabs.js"
|
|
13180
|
+
],
|
|
13181
|
+
"aliasPermutations": [],
|
|
13182
|
+
"permutations": [
|
|
13183
|
+
"hardis:project:fix:profiletabs",
|
|
13184
|
+
"project:hardis:fix:profiletabs",
|
|
13185
|
+
"project:fix:hardis:profiletabs",
|
|
13186
|
+
"project:fix:profiletabs:hardis",
|
|
13187
|
+
"hardis:fix:project:profiletabs",
|
|
13188
|
+
"fix:hardis:project:profiletabs",
|
|
13189
|
+
"fix:project:hardis:profiletabs",
|
|
13190
|
+
"fix:project:profiletabs:hardis",
|
|
13191
|
+
"hardis:fix:profiletabs:project",
|
|
13192
|
+
"fix:hardis:profiletabs:project",
|
|
13193
|
+
"fix:profiletabs:hardis:project",
|
|
13194
|
+
"fix:profiletabs:project:hardis",
|
|
13195
|
+
"hardis:project:profiletabs:fix",
|
|
13196
|
+
"project:hardis:profiletabs:fix",
|
|
13197
|
+
"project:profiletabs:hardis:fix",
|
|
13198
|
+
"project:profiletabs:fix:hardis",
|
|
13199
|
+
"hardis:profiletabs:project:fix",
|
|
13200
|
+
"profiletabs:hardis:project:fix",
|
|
13201
|
+
"profiletabs:project:hardis:fix",
|
|
13202
|
+
"profiletabs:project:fix:hardis",
|
|
13203
|
+
"hardis:profiletabs:fix:project",
|
|
13204
|
+
"profiletabs:hardis:fix:project",
|
|
13205
|
+
"profiletabs:fix:hardis:project",
|
|
13206
|
+
"profiletabs:fix:project:hardis"
|
|
13207
|
+
]
|
|
13208
|
+
},
|
|
13209
|
+
"hardis:project:fix:v53flexipages": {
|
|
13210
|
+
"aliases": [],
|
|
13211
|
+
"args": {},
|
|
13212
|
+
"description": "\n## Command Behavior\n\n**Fixes Salesforce FlexiPages for compatibility with API Version 53.0 (Winter '22 release) by adding missing identifiers to component instances.**\n\nSalesforce introduced a change in API Version 53.0 that requires `identifier` tags within `componentInstance` and `fieldInstance` elements in FlexiPage metadata. If these identifiers are missing, deployments to orgs with API version 53.0 or higher will fail. This command automates the process of adding these missing identifiers, ensuring your FlexiPages remain deployable.\n\nKey functionalities:\n\n- **Targeted FlexiPage Processing:** Scans all .flexipage-meta.xml files within the specified root folder (defaults to current working directory).\n- **Identifier Injection:** Inserts a unique `identifier` tag (e.g., `SFDX_HARDIS_REPLACEMENT_ID`) into `componentInstance` and `fieldInstance` elements that lack one.\n\n**Important Note:** After running this command, ensure you update your `apiVersion` to `53.0` (or higher) in your `package.xml` and `sfdx-project.json` files.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find all .flexipage-meta.xml files.\n- **Content Reading:** Reads the XML content of each FlexiPage file.\n- **Regular Expression Replacement:** Employs a set of regular expressions to identify specific XML patterns (componentName.../componentName.../componentInstance, componentName.../componentName.../visibilityRule, fieldItem.../fieldItem.../fieldInstance) that are missing the `identifier` tag.\n- **Dynamic ID Generation:** For each match, it generates a unique identifier (e.g., `sfdxHardisIdX`) and injects it into the XML structure.\n- **File Writing:** If changes are made, the modified XML content is written back to the FlexiPage file using `fs.writeFile`.\n- **Logging:** Provides messages about which FlexiPages are being processed and a summary of the total number of identifiers added.\n</details>\n",
|
|
13213
|
+
"examples": [
|
|
13214
|
+
"$ sf hardis:project:fix:v53flexipages"
|
|
13215
|
+
],
|
|
13216
|
+
"flags": {
|
|
13217
|
+
"json": {
|
|
13218
|
+
"description": "Format output as json.",
|
|
13219
|
+
"helpGroup": "GLOBAL",
|
|
13220
|
+
"name": "json",
|
|
13221
|
+
"allowNo": false,
|
|
13222
|
+
"type": "boolean"
|
|
13223
|
+
},
|
|
13224
|
+
"flags-dir": {
|
|
13225
|
+
"helpGroup": "GLOBAL",
|
|
13226
|
+
"name": "flags-dir",
|
|
13227
|
+
"summary": "Import flag values from a directory.",
|
|
13228
|
+
"hasDynamicHelp": false,
|
|
13229
|
+
"multiple": false,
|
|
13230
|
+
"type": "option"
|
|
13231
|
+
},
|
|
13232
|
+
"path": {
|
|
13233
|
+
"char": "p",
|
|
13234
|
+
"description": "Root folder",
|
|
13235
|
+
"name": "path",
|
|
13236
|
+
"default": "/home/runner/work/sfdx-hardis/sfdx-hardis",
|
|
13237
|
+
"hasDynamicHelp": false,
|
|
13238
|
+
"multiple": false,
|
|
13239
|
+
"type": "option"
|
|
13240
|
+
},
|
|
13241
|
+
"debug": {
|
|
13242
|
+
"char": "d",
|
|
13243
|
+
"description": "Activate debug mode (more logs)",
|
|
13244
|
+
"name": "debug",
|
|
13245
|
+
"allowNo": false,
|
|
13246
|
+
"type": "boolean"
|
|
13247
|
+
},
|
|
13248
|
+
"websocket": {
|
|
13249
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
13250
|
+
"name": "websocket",
|
|
13251
|
+
"hasDynamicHelp": false,
|
|
13252
|
+
"multiple": false,
|
|
13253
|
+
"type": "option"
|
|
13254
|
+
},
|
|
13255
|
+
"skipauth": {
|
|
13256
|
+
"description": "Skip authentication check when a default username is required",
|
|
13257
|
+
"name": "skipauth",
|
|
13258
|
+
"allowNo": false,
|
|
13259
|
+
"type": "boolean"
|
|
13260
|
+
}
|
|
13261
|
+
},
|
|
13262
|
+
"hasDynamicHelp": false,
|
|
13263
|
+
"hiddenAliases": [],
|
|
13264
|
+
"id": "hardis:project:fix:v53flexipages",
|
|
13265
|
+
"pluginAlias": "sfdx-hardis",
|
|
13266
|
+
"pluginName": "sfdx-hardis",
|
|
13267
|
+
"pluginType": "core",
|
|
13268
|
+
"strict": true,
|
|
13269
|
+
"enableJsonFlag": true,
|
|
13270
|
+
"title": "Fix flexipages for v53",
|
|
13271
|
+
"requiresProject": true,
|
|
13272
|
+
"isESM": true,
|
|
13273
|
+
"relativePath": [
|
|
13274
|
+
"lib",
|
|
13275
|
+
"commands",
|
|
13276
|
+
"hardis",
|
|
13277
|
+
"project",
|
|
13278
|
+
"fix",
|
|
13279
|
+
"v53flexipages.js"
|
|
13280
|
+
],
|
|
13281
|
+
"aliasPermutations": [],
|
|
13282
|
+
"permutations": [
|
|
13283
|
+
"hardis:project:fix:v53flexipages",
|
|
13284
|
+
"project:hardis:fix:v53flexipages",
|
|
13285
|
+
"project:fix:hardis:v53flexipages",
|
|
13286
|
+
"project:fix:v53flexipages:hardis",
|
|
13287
|
+
"hardis:fix:project:v53flexipages",
|
|
13288
|
+
"fix:hardis:project:v53flexipages",
|
|
13289
|
+
"fix:project:hardis:v53flexipages",
|
|
13290
|
+
"fix:project:v53flexipages:hardis",
|
|
13291
|
+
"hardis:fix:v53flexipages:project",
|
|
13292
|
+
"fix:hardis:v53flexipages:project",
|
|
13293
|
+
"fix:v53flexipages:hardis:project",
|
|
13294
|
+
"fix:v53flexipages:project:hardis",
|
|
13295
|
+
"hardis:project:v53flexipages:fix",
|
|
13296
|
+
"project:hardis:v53flexipages:fix",
|
|
13297
|
+
"project:v53flexipages:hardis:fix",
|
|
13298
|
+
"project:v53flexipages:fix:hardis",
|
|
13299
|
+
"hardis:v53flexipages:project:fix",
|
|
13300
|
+
"v53flexipages:hardis:project:fix",
|
|
13301
|
+
"v53flexipages:project:hardis:fix",
|
|
13302
|
+
"v53flexipages:project:fix:hardis",
|
|
13303
|
+
"hardis:v53flexipages:fix:project",
|
|
13304
|
+
"v53flexipages:hardis:fix:project",
|
|
13305
|
+
"v53flexipages:fix:hardis:project",
|
|
13306
|
+
"v53flexipages:fix:project:hardis"
|
|
13307
|
+
]
|
|
13308
|
+
},
|
|
13309
13309
|
"hardis:project:metadata:activate-decomposed": {
|
|
13310
13310
|
"aliases": [],
|
|
13311
13311
|
"args": {},
|
|
@@ -15484,5 +15484,5 @@
|
|
|
15484
15484
|
]
|
|
15485
15485
|
}
|
|
15486
15486
|
},
|
|
15487
|
-
"version": "6.10.0"
|
|
15487
|
+
"version": "6.10.1-alpha202511021043.0"
|
|
15488
15488
|
}
|