sfdx-hardis 6.9.1-alpha202510282151.0 → 6.10.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 +4 -4
- package/lib/commands/hardis/doc/mkdocs-to-cf.js +39 -38
- package/lib/commands/hardis/doc/mkdocs-to-cf.js.map +1 -1
- package/lib/commands/hardis/org/diagnose/storage-stats.d.ts +18 -0
- package/lib/commands/hardis/org/diagnose/storage-stats.js +278 -0
- package/lib/commands/hardis/org/diagnose/storage-stats.js.map +1 -0
- package/lib/commands/hardis/project/deploy/notify.js +23 -19
- package/lib/commands/hardis/project/deploy/notify.js.map +1 -1
- package/lib/commands/hardis/project/deploy/quick.js +2 -3
- package/lib/commands/hardis/project/deploy/quick.js.map +1 -1
- package/lib/commands/hardis/project/deploy/start.js +5 -4
- package/lib/commands/hardis/project/deploy/start.js.map +1 -1
- package/lib/commands/hardis/project/deploy/validate.js +3 -4
- package/lib/commands/hardis/project/deploy/validate.js.map +1 -1
- package/lib/commands/hardis/source/deploy.js +3 -4
- package/lib/commands/hardis/source/deploy.js.map +1 -1
- package/lib/common/gitProvider/azureDevops.d.ts +0 -1
- package/lib/common/gitProvider/azureDevops.js +3 -71
- package/lib/common/gitProvider/azureDevops.js.map +1 -1
- package/lib/common/gitProvider/bitbucket.d.ts +0 -1
- package/lib/common/gitProvider/bitbucket.js +2 -81
- package/lib/common/gitProvider/bitbucket.js.map +1 -1
- package/lib/common/gitProvider/gitProviderRoot.d.ts +0 -1
- package/lib/common/gitProvider/gitProviderRoot.js +0 -6
- package/lib/common/gitProvider/gitProviderRoot.js.map +1 -1
- package/lib/common/gitProvider/github.d.ts +0 -1
- package/lib/common/gitProvider/github.js +1 -74
- package/lib/common/gitProvider/github.js.map +1 -1
- package/lib/common/gitProvider/gitlab.d.ts +0 -3
- package/lib/common/gitProvider/gitlab.js +2 -110
- package/lib/common/gitProvider/gitlab.js.map +1 -1
- package/lib/common/gitProvider/index.d.ts +1 -1
- package/lib/common/gitProvider/index.js +5 -12
- package/lib/common/gitProvider/index.js.map +1 -1
- package/lib/common/utils/authUtils.d.ts +2 -15
- package/lib/common/utils/authUtils.js +29 -48
- package/lib/common/utils/authUtils.js.map +1 -1
- package/lib/common/utils/dataUtils.d.ts +2 -2
- package/lib/common/utils/dataUtils.js +1 -5
- package/lib/common/utils/dataUtils.js.map +1 -1
- package/lib/common/utils/deployTips.js +1 -2
- package/lib/common/utils/deployTips.js.map +1 -1
- package/lib/common/utils/deployUtils.d.ts +7 -0
- package/lib/common/utils/deployUtils.js +75 -28
- package/lib/common/utils/deployUtils.js.map +1 -1
- package/lib/common/utils/gitUtils.d.ts +0 -2
- package/lib/common/utils/gitUtils.js +1 -7
- package/lib/common/utils/gitUtils.js.map +1 -1
- package/lib/common/utils/orgUtils.d.ts +0 -1
- package/lib/common/utils/orgUtils.js +0 -12
- package/lib/common/utils/orgUtils.js.map +1 -1
- package/oclif.manifest.json +681 -567
- package/package.json +1 -1
- package/lib/common/actionsProvider/actionsProvider.d.ts +0 -41
- package/lib/common/actionsProvider/actionsProvider.js +0 -110
- package/lib/common/actionsProvider/actionsProvider.js.map +0 -1
- package/lib/common/actionsProvider/apexAction.d.ts +0 -6
- package/lib/common/actionsProvider/apexAction.js +0 -35
- package/lib/common/actionsProvider/apexAction.js.map +0 -1
- package/lib/common/actionsProvider/commandAction.d.ts +0 -6
- package/lib/common/actionsProvider/commandAction.js +0 -29
- package/lib/common/actionsProvider/commandAction.js.map +0 -1
- package/lib/common/actionsProvider/dataAction.d.ts +0 -6
- package/lib/common/actionsProvider/dataAction.js +0 -50
- package/lib/common/actionsProvider/dataAction.js.map +0 -1
- package/lib/common/actionsProvider/manualAction.d.ts +0 -6
- package/lib/common/actionsProvider/manualAction.js +0 -26
- package/lib/common/actionsProvider/manualAction.js.map +0 -1
- package/lib/common/actionsProvider/publishCommunityAction.d.ts +0 -6
- package/lib/common/actionsProvider/publishCommunityAction.js +0 -30
- package/lib/common/actionsProvider/publishCommunityAction.js.map +0 -1
- package/lib/common/utils/prePostCommandUtils.d.ts +0 -7
- package/lib/common/utils/prePostCommandUtils.js +0 -272
- package/lib/common/utils/prePostCommandUtils.js.map +0 -1
package/oclif.manifest.json
CHANGED
|
@@ -132,12 +132,13 @@
|
|
|
132
132
|
"clear:cache:hardis"
|
|
133
133
|
]
|
|
134
134
|
},
|
|
135
|
-
"hardis:
|
|
135
|
+
"hardis:auth:login": {
|
|
136
136
|
"aliases": [],
|
|
137
137
|
"args": {},
|
|
138
|
-
"description": "\n## Command Behavior\n\n**
|
|
138
|
+
"description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n</details>\n",
|
|
139
139
|
"examples": [
|
|
140
|
-
"$ sf hardis:
|
|
140
|
+
"$ sf hardis:auth:login",
|
|
141
|
+
"CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
|
|
141
142
|
],
|
|
142
143
|
"flags": {
|
|
143
144
|
"json": {
|
|
@@ -155,20 +156,28 @@
|
|
|
155
156
|
"multiple": false,
|
|
156
157
|
"type": "option"
|
|
157
158
|
},
|
|
158
|
-
"
|
|
159
|
-
"char": "
|
|
160
|
-
"description": "
|
|
161
|
-
"name": "
|
|
162
|
-
"default": "project",
|
|
159
|
+
"instanceurl": {
|
|
160
|
+
"char": "r",
|
|
161
|
+
"description": "URL of org instance",
|
|
162
|
+
"name": "instanceurl",
|
|
163
163
|
"hasDynamicHelp": false,
|
|
164
164
|
"multiple": false,
|
|
165
|
-
"options": [
|
|
166
|
-
"project",
|
|
167
|
-
"branch",
|
|
168
|
-
"user"
|
|
169
|
-
],
|
|
170
165
|
"type": "option"
|
|
171
166
|
},
|
|
167
|
+
"devhub": {
|
|
168
|
+
"char": "h",
|
|
169
|
+
"description": "Also connect associated DevHub",
|
|
170
|
+
"name": "devhub",
|
|
171
|
+
"allowNo": false,
|
|
172
|
+
"type": "boolean"
|
|
173
|
+
},
|
|
174
|
+
"scratchorg": {
|
|
175
|
+
"char": "s",
|
|
176
|
+
"description": "Scratch org",
|
|
177
|
+
"name": "scratchorg",
|
|
178
|
+
"allowNo": false,
|
|
179
|
+
"type": "boolean"
|
|
180
|
+
},
|
|
172
181
|
"debug": {
|
|
173
182
|
"char": "d",
|
|
174
183
|
"description": "Activate debug mode (more logs)",
|
|
@@ -192,39 +201,38 @@
|
|
|
192
201
|
},
|
|
193
202
|
"hasDynamicHelp": false,
|
|
194
203
|
"hiddenAliases": [],
|
|
195
|
-
"id": "hardis:
|
|
204
|
+
"id": "hardis:auth:login",
|
|
196
205
|
"pluginAlias": "sfdx-hardis",
|
|
197
206
|
"pluginName": "sfdx-hardis",
|
|
198
207
|
"pluginType": "core",
|
|
199
208
|
"strict": true,
|
|
200
209
|
"enableJsonFlag": true,
|
|
201
|
-
"title": "
|
|
210
|
+
"title": "Login",
|
|
202
211
|
"requiresProject": false,
|
|
203
212
|
"isESM": true,
|
|
204
213
|
"relativePath": [
|
|
205
214
|
"lib",
|
|
206
215
|
"commands",
|
|
207
216
|
"hardis",
|
|
208
|
-
"
|
|
209
|
-
"
|
|
217
|
+
"auth",
|
|
218
|
+
"login.js"
|
|
210
219
|
],
|
|
211
220
|
"aliasPermutations": [],
|
|
212
221
|
"permutations": [
|
|
213
|
-
"hardis:
|
|
214
|
-
"
|
|
215
|
-
"
|
|
216
|
-
"hardis:
|
|
217
|
-
"
|
|
218
|
-
"
|
|
222
|
+
"hardis:auth:login",
|
|
223
|
+
"auth:hardis:login",
|
|
224
|
+
"auth:login:hardis",
|
|
225
|
+
"hardis:login:auth",
|
|
226
|
+
"login:hardis:auth",
|
|
227
|
+
"login:auth:hardis"
|
|
219
228
|
]
|
|
220
229
|
},
|
|
221
|
-
"hardis:
|
|
230
|
+
"hardis:config:get": {
|
|
222
231
|
"aliases": [],
|
|
223
232
|
"args": {},
|
|
224
|
-
"description": "\n## Command Behavior\n\n**
|
|
233
|
+
"description": "\n## Command Behavior\n\n**Retrieves and displays the sfdx-hardis configuration for a specified level.**\n\nThis command allows you to inspect the configuration that is currently in effect for your project, which is useful for debugging and understanding how sfdx-hardis will behave.\n\n- **Configuration levels:** It can retrieve configuration from three different levels:\n - **Project:** The configuration defined in the project's `.sfdx-hardis.yml` file.\n - **Branch:** The configuration defined in a branch-specific configuration file (e.g., `.sfdx-hardis.production.yml`).\n - **User:** The global user-level configuration.\n\n## Technical explanations\n\nThe command's logic is straightforward:\n\n- **`getConfig` function:** It calls the `getConfig` utility function, passing the desired configuration level as an argument.\n- **Configuration loading:** The `getConfig` function is responsible for finding the appropriate configuration file, reading its contents, and parsing it as YAML or JSON.\n- **Output:** The retrieved configuration is then displayed to the user as a JSON string.\n",
|
|
225
234
|
"examples": [
|
|
226
|
-
"$ sf hardis:
|
|
227
|
-
"CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
|
|
235
|
+
"$ sf hardis:project:deploy:sources:metadata"
|
|
228
236
|
],
|
|
229
237
|
"flags": {
|
|
230
238
|
"json": {
|
|
@@ -242,28 +250,20 @@
|
|
|
242
250
|
"multiple": false,
|
|
243
251
|
"type": "option"
|
|
244
252
|
},
|
|
245
|
-
"
|
|
246
|
-
"char": "
|
|
247
|
-
"description": "
|
|
248
|
-
"name": "
|
|
253
|
+
"level": {
|
|
254
|
+
"char": "l",
|
|
255
|
+
"description": "project,branch or user",
|
|
256
|
+
"name": "level",
|
|
257
|
+
"default": "project",
|
|
249
258
|
"hasDynamicHelp": false,
|
|
250
259
|
"multiple": false,
|
|
260
|
+
"options": [
|
|
261
|
+
"project",
|
|
262
|
+
"branch",
|
|
263
|
+
"user"
|
|
264
|
+
],
|
|
251
265
|
"type": "option"
|
|
252
266
|
},
|
|
253
|
-
"devhub": {
|
|
254
|
-
"char": "h",
|
|
255
|
-
"description": "Also connect associated DevHub",
|
|
256
|
-
"name": "devhub",
|
|
257
|
-
"allowNo": false,
|
|
258
|
-
"type": "boolean"
|
|
259
|
-
},
|
|
260
|
-
"scratchorg": {
|
|
261
|
-
"char": "s",
|
|
262
|
-
"description": "Scratch org",
|
|
263
|
-
"name": "scratchorg",
|
|
264
|
-
"allowNo": false,
|
|
265
|
-
"type": "boolean"
|
|
266
|
-
},
|
|
267
267
|
"debug": {
|
|
268
268
|
"char": "d",
|
|
269
269
|
"description": "Activate debug mode (more logs)",
|
|
@@ -287,30 +287,30 @@
|
|
|
287
287
|
},
|
|
288
288
|
"hasDynamicHelp": false,
|
|
289
289
|
"hiddenAliases": [],
|
|
290
|
-
"id": "hardis:
|
|
290
|
+
"id": "hardis:config:get",
|
|
291
291
|
"pluginAlias": "sfdx-hardis",
|
|
292
292
|
"pluginName": "sfdx-hardis",
|
|
293
293
|
"pluginType": "core",
|
|
294
294
|
"strict": true,
|
|
295
295
|
"enableJsonFlag": true,
|
|
296
|
-
"title": "
|
|
296
|
+
"title": "Deploy metadata sources to org",
|
|
297
297
|
"requiresProject": false,
|
|
298
298
|
"isESM": true,
|
|
299
299
|
"relativePath": [
|
|
300
300
|
"lib",
|
|
301
301
|
"commands",
|
|
302
302
|
"hardis",
|
|
303
|
-
"
|
|
304
|
-
"
|
|
303
|
+
"config",
|
|
304
|
+
"get.js"
|
|
305
305
|
],
|
|
306
306
|
"aliasPermutations": [],
|
|
307
307
|
"permutations": [
|
|
308
|
-
"hardis:
|
|
309
|
-
"
|
|
310
|
-
"
|
|
311
|
-
"hardis:
|
|
312
|
-
"
|
|
313
|
-
"
|
|
308
|
+
"hardis:config:get",
|
|
309
|
+
"config:hardis:get",
|
|
310
|
+
"config:get:hardis",
|
|
311
|
+
"hardis:get:config",
|
|
312
|
+
"get:hardis:config",
|
|
313
|
+
"get:config:hardis"
|
|
314
314
|
]
|
|
315
315
|
},
|
|
316
316
|
"hardis:doc:fieldusage": {
|
|
@@ -509,7 +509,7 @@
|
|
|
509
509
|
"hardis:doc:mkdocs-to-cf": {
|
|
510
510
|
"aliases": [],
|
|
511
511
|
"args": {},
|
|
512
|
-
"description": "## Command Behavior
|
|
512
|
+
"description": "## Command Behavior**Generates MkDocs HTML pages and uploads them to Cloudflare as a static site, secured with Cloudflare Access.**This 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.Key operations performed:- **MkDocs HTML Generation:** Builds the MkDocs project into static HTML pages. It can use a locally installed `mkdocs-material` or a `mkdocs` Docker image.- **Cloudflare Pages Project Creation/Update:** Creates a new Cloudflare Pages project if one doesn't exist for your documentation, or updates an existing one.- **Cloudflare Access Policy Assignment:** Assigns a policy to restrict access to the deployed application, ensuring only authorized users can view your documentation.- **Cloudflare Access Application Setup:** Configures a Cloudflare Access application for the deployed site, integrating it with your Zero Trust policies.- **HTML Page Upload:** Deploys the generated HTML pages to Cloudflare Pages.- **Browser Opening (Non-CI):** Opens the newly deployed website in your default browser if the command is not run in a CI/CD environment.**Prerequisite:** The documentation must have been previously generated using `sf hardis:doc:project2markdown --with-history`.**Customization:** You can override default styles by customizing your `mkdocs.yml` file.More information can be found in the [Documentation section](https://sfdx-hardis.cloudity.com/salesforce-project-documentation/).**Environment Variables for Cloudflare Configuration:**| 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_ |<details markdown=\"1\">\n<summary>Technical explanations</summary>The command orchestrates interactions with MkDocs, Cloudflare APIs, and Git:- **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.- **Cloudflare API Interaction:** It uses the `cloudflare` npm package to interact with the Cloudflare API. This involves: - **Authentication:** Initializes the Cloudflare client using `CLOUDFLARE_EMAIL`, `CLOUDFLARE_API_TOKEN`, and `CLOUDFLARE_ACCOUNT_ID` environment variables. - **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. - **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. - **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.- **Git Integration:** Retrieves the current Git branch name using `getCurrentGitBranch()` to construct the Cloudflare project name and branch for deployment.- **Wrangler CLI:** Uses the `wrangler` CLI (Cloudflare's developer tool) to deploy the generated HTML pages to Cloudflare Pages via `wrangler pages deploy`.- **Environment Variable Management:** Reads various environment variables to configure Cloudflare settings and project names.- **Error Handling:** Includes checks for missing `mkdocs.yml` and Cloudflare environment variables, throwing `SfError` when necessary.</details>\n",
|
|
513
513
|
"examples": [
|
|
514
514
|
"$ sf hardis:doc:mkdocs-to-cf"
|
|
515
515
|
],
|
|
@@ -5808,121 +5808,6 @@
|
|
|
5808
5808
|
"import:files:org:hardis"
|
|
5809
5809
|
]
|
|
5810
5810
|
},
|
|
5811
|
-
"hardis:org:fix:listviewmine": {
|
|
5812
|
-
"aliases": [],
|
|
5813
|
-
"args": {},
|
|
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
|
-
"examples": [
|
|
5816
|
-
"$ sf hardis:org:fix:listviewmine",
|
|
5817
|
-
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
5818
|
-
],
|
|
5819
|
-
"flags": {
|
|
5820
|
-
"json": {
|
|
5821
|
-
"description": "Format output as json.",
|
|
5822
|
-
"helpGroup": "GLOBAL",
|
|
5823
|
-
"name": "json",
|
|
5824
|
-
"allowNo": false,
|
|
5825
|
-
"type": "boolean"
|
|
5826
|
-
},
|
|
5827
|
-
"flags-dir": {
|
|
5828
|
-
"helpGroup": "GLOBAL",
|
|
5829
|
-
"name": "flags-dir",
|
|
5830
|
-
"summary": "Import flag values from a directory.",
|
|
5831
|
-
"hasDynamicHelp": false,
|
|
5832
|
-
"multiple": false,
|
|
5833
|
-
"type": "option"
|
|
5834
|
-
},
|
|
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",
|
|
5839
|
-
"hasDynamicHelp": false,
|
|
5840
|
-
"multiple": false,
|
|
5841
|
-
"type": "option"
|
|
5842
|
-
},
|
|
5843
|
-
"debug": {
|
|
5844
|
-
"char": "d",
|
|
5845
|
-
"description": "Activate debug mode (more logs)",
|
|
5846
|
-
"name": "debug",
|
|
5847
|
-
"allowNo": false,
|
|
5848
|
-
"type": "boolean"
|
|
5849
|
-
},
|
|
5850
|
-
"websocket": {
|
|
5851
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5852
|
-
"name": "websocket",
|
|
5853
|
-
"hasDynamicHelp": false,
|
|
5854
|
-
"multiple": false,
|
|
5855
|
-
"type": "option"
|
|
5856
|
-
},
|
|
5857
|
-
"skipauth": {
|
|
5858
|
-
"description": "Skip authentication check when a default username is required",
|
|
5859
|
-
"name": "skipauth",
|
|
5860
|
-
"allowNo": false,
|
|
5861
|
-
"type": "boolean"
|
|
5862
|
-
},
|
|
5863
|
-
"target-org": {
|
|
5864
|
-
"aliases": [
|
|
5865
|
-
"targetusername",
|
|
5866
|
-
"u"
|
|
5867
|
-
],
|
|
5868
|
-
"char": "o",
|
|
5869
|
-
"deprecateAliases": true,
|
|
5870
|
-
"name": "target-org",
|
|
5871
|
-
"noCacheDefault": true,
|
|
5872
|
-
"required": true,
|
|
5873
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
5874
|
-
"hasDynamicHelp": true,
|
|
5875
|
-
"multiple": false,
|
|
5876
|
-
"type": "option"
|
|
5877
|
-
}
|
|
5878
|
-
},
|
|
5879
|
-
"hasDynamicHelp": true,
|
|
5880
|
-
"hiddenAliases": [],
|
|
5881
|
-
"id": "hardis:org:fix:listviewmine",
|
|
5882
|
-
"pluginAlias": "sfdx-hardis",
|
|
5883
|
-
"pluginName": "sfdx-hardis",
|
|
5884
|
-
"pluginType": "core",
|
|
5885
|
-
"strict": true,
|
|
5886
|
-
"enableJsonFlag": true,
|
|
5887
|
-
"title": "Fix listviews with ",
|
|
5888
|
-
"requiresProject": true,
|
|
5889
|
-
"isESM": true,
|
|
5890
|
-
"relativePath": [
|
|
5891
|
-
"lib",
|
|
5892
|
-
"commands",
|
|
5893
|
-
"hardis",
|
|
5894
|
-
"org",
|
|
5895
|
-
"fix",
|
|
5896
|
-
"listviewmine.js"
|
|
5897
|
-
],
|
|
5898
|
-
"aliasPermutations": [],
|
|
5899
|
-
"permutations": [
|
|
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"
|
|
5924
|
-
]
|
|
5925
|
-
},
|
|
5926
5811
|
"hardis:org:diagnose:audittrail": {
|
|
5927
5812
|
"aliases": [],
|
|
5928
5813
|
"args": {},
|
|
@@ -6532,12 +6417,12 @@
|
|
|
6532
6417
|
"releaseupdates:diagnose:org:hardis"
|
|
6533
6418
|
]
|
|
6534
6419
|
},
|
|
6535
|
-
"hardis:org:diagnose:
|
|
6420
|
+
"hardis:org:diagnose:storage-stats": {
|
|
6536
6421
|
"aliases": [],
|
|
6537
6422
|
"args": {},
|
|
6538
|
-
"description": "
|
|
6423
|
+
"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",
|
|
6539
6424
|
"examples": [
|
|
6540
|
-
"$ sf hardis:org:diagnose:
|
|
6425
|
+
"$ sf hardis:org:diagnose:storage-stats"
|
|
6541
6426
|
],
|
|
6542
6427
|
"flags": {
|
|
6543
6428
|
"json": {
|
|
@@ -6601,14 +6486,14 @@
|
|
|
6601
6486
|
},
|
|
6602
6487
|
"hasDynamicHelp": true,
|
|
6603
6488
|
"hiddenAliases": [],
|
|
6604
|
-
"id": "hardis:org:diagnose:
|
|
6489
|
+
"id": "hardis:org:diagnose:storage-stats",
|
|
6605
6490
|
"pluginAlias": "sfdx-hardis",
|
|
6606
6491
|
"pluginName": "sfdx-hardis",
|
|
6607
6492
|
"pluginType": "core",
|
|
6608
6493
|
"strict": true,
|
|
6609
6494
|
"enableJsonFlag": true,
|
|
6610
|
-
"title": "
|
|
6611
|
-
"requiresProject":
|
|
6495
|
+
"title": "Extract Data Storage stats",
|
|
6496
|
+
"requiresProject": true,
|
|
6612
6497
|
"isESM": true,
|
|
6613
6498
|
"relativePath": [
|
|
6614
6499
|
"lib",
|
|
@@ -6616,33 +6501,147 @@
|
|
|
6616
6501
|
"hardis",
|
|
6617
6502
|
"org",
|
|
6618
6503
|
"diagnose",
|
|
6619
|
-
"
|
|
6504
|
+
"storage-stats.js"
|
|
6620
6505
|
],
|
|
6621
6506
|
"aliasPermutations": [],
|
|
6622
6507
|
"permutations": [
|
|
6623
|
-
"hardis:org:diagnose:
|
|
6624
|
-
"org:hardis:diagnose:
|
|
6625
|
-
"org:diagnose:hardis:
|
|
6626
|
-
"org:diagnose:
|
|
6627
|
-
"hardis:diagnose:org:
|
|
6628
|
-
"diagnose:hardis:org:
|
|
6629
|
-
"diagnose:org:hardis:
|
|
6630
|
-
"diagnose:org:
|
|
6631
|
-
"hardis:diagnose:
|
|
6632
|
-
"diagnose:hardis:
|
|
6633
|
-
"diagnose:
|
|
6634
|
-
"diagnose:
|
|
6635
|
-
"hardis:org:
|
|
6636
|
-
"org:hardis:
|
|
6637
|
-
"org:
|
|
6638
|
-
"org:
|
|
6639
|
-
"hardis:
|
|
6640
|
-
"
|
|
6641
|
-
"
|
|
6642
|
-
"
|
|
6643
|
-
"hardis:
|
|
6644
|
-
"
|
|
6645
|
-
"
|
|
6508
|
+
"hardis:org:diagnose:storage-stats",
|
|
6509
|
+
"org:hardis:diagnose:storage-stats",
|
|
6510
|
+
"org:diagnose:hardis:storage-stats",
|
|
6511
|
+
"org:diagnose:storage-stats:hardis",
|
|
6512
|
+
"hardis:diagnose:org:storage-stats",
|
|
6513
|
+
"diagnose:hardis:org:storage-stats",
|
|
6514
|
+
"diagnose:org:hardis:storage-stats",
|
|
6515
|
+
"diagnose:org:storage-stats:hardis",
|
|
6516
|
+
"hardis:diagnose:storage-stats:org",
|
|
6517
|
+
"diagnose:hardis:storage-stats:org",
|
|
6518
|
+
"diagnose:storage-stats:hardis:org",
|
|
6519
|
+
"diagnose:storage-stats:org:hardis",
|
|
6520
|
+
"hardis:org:storage-stats:diagnose",
|
|
6521
|
+
"org:hardis:storage-stats:diagnose",
|
|
6522
|
+
"org:storage-stats:hardis:diagnose",
|
|
6523
|
+
"org:storage-stats:diagnose:hardis",
|
|
6524
|
+
"hardis:storage-stats:org:diagnose",
|
|
6525
|
+
"storage-stats:hardis:org:diagnose",
|
|
6526
|
+
"storage-stats:org:hardis:diagnose",
|
|
6527
|
+
"storage-stats:org:diagnose:hardis",
|
|
6528
|
+
"hardis:storage-stats:diagnose:org",
|
|
6529
|
+
"storage-stats:hardis:diagnose:org",
|
|
6530
|
+
"storage-stats:diagnose:hardis:org",
|
|
6531
|
+
"storage-stats:diagnose:org:hardis"
|
|
6532
|
+
]
|
|
6533
|
+
},
|
|
6534
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
6535
|
+
"aliases": [],
|
|
6536
|
+
"args": {},
|
|
6537
|
+
"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",
|
|
6538
|
+
"examples": [
|
|
6539
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
6540
|
+
],
|
|
6541
|
+
"flags": {
|
|
6542
|
+
"json": {
|
|
6543
|
+
"description": "Format output as json.",
|
|
6544
|
+
"helpGroup": "GLOBAL",
|
|
6545
|
+
"name": "json",
|
|
6546
|
+
"allowNo": false,
|
|
6547
|
+
"type": "boolean"
|
|
6548
|
+
},
|
|
6549
|
+
"flags-dir": {
|
|
6550
|
+
"helpGroup": "GLOBAL",
|
|
6551
|
+
"name": "flags-dir",
|
|
6552
|
+
"summary": "Import flag values from a directory.",
|
|
6553
|
+
"hasDynamicHelp": false,
|
|
6554
|
+
"multiple": false,
|
|
6555
|
+
"type": "option"
|
|
6556
|
+
},
|
|
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
|
+
"debug": {
|
|
6566
|
+
"char": "d",
|
|
6567
|
+
"description": "Activate debug mode (more logs)",
|
|
6568
|
+
"name": "debug",
|
|
6569
|
+
"allowNo": false,
|
|
6570
|
+
"type": "boolean"
|
|
6571
|
+
},
|
|
6572
|
+
"websocket": {
|
|
6573
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
6574
|
+
"name": "websocket",
|
|
6575
|
+
"hasDynamicHelp": false,
|
|
6576
|
+
"multiple": false,
|
|
6577
|
+
"type": "option"
|
|
6578
|
+
},
|
|
6579
|
+
"skipauth": {
|
|
6580
|
+
"description": "Skip authentication check when a default username is required",
|
|
6581
|
+
"name": "skipauth",
|
|
6582
|
+
"allowNo": false,
|
|
6583
|
+
"type": "boolean"
|
|
6584
|
+
},
|
|
6585
|
+
"target-org": {
|
|
6586
|
+
"aliases": [
|
|
6587
|
+
"targetusername",
|
|
6588
|
+
"u"
|
|
6589
|
+
],
|
|
6590
|
+
"char": "o",
|
|
6591
|
+
"deprecateAliases": true,
|
|
6592
|
+
"name": "target-org",
|
|
6593
|
+
"noCacheDefault": true,
|
|
6594
|
+
"required": true,
|
|
6595
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
6596
|
+
"hasDynamicHelp": true,
|
|
6597
|
+
"multiple": false,
|
|
6598
|
+
"type": "option"
|
|
6599
|
+
}
|
|
6600
|
+
},
|
|
6601
|
+
"hasDynamicHelp": true,
|
|
6602
|
+
"hiddenAliases": [],
|
|
6603
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
6604
|
+
"pluginAlias": "sfdx-hardis",
|
|
6605
|
+
"pluginName": "sfdx-hardis",
|
|
6606
|
+
"pluginType": "core",
|
|
6607
|
+
"strict": true,
|
|
6608
|
+
"enableJsonFlag": true,
|
|
6609
|
+
"title": "Detect Unsecured Connected Apps",
|
|
6610
|
+
"requiresProject": false,
|
|
6611
|
+
"isESM": true,
|
|
6612
|
+
"relativePath": [
|
|
6613
|
+
"lib",
|
|
6614
|
+
"commands",
|
|
6615
|
+
"hardis",
|
|
6616
|
+
"org",
|
|
6617
|
+
"diagnose",
|
|
6618
|
+
"unsecure-connected-apps.js"
|
|
6619
|
+
],
|
|
6620
|
+
"aliasPermutations": [],
|
|
6621
|
+
"permutations": [
|
|
6622
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
6623
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
6624
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
6625
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
6626
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
6627
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
6628
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
6629
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
6630
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
6631
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
6632
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
6633
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
6634
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
6635
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
6636
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
6637
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
6638
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
6639
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
6640
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
6641
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
6642
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
6643
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
6644
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
6646
6645
|
"unsecure-connected-apps:diagnose:org:hardis"
|
|
6647
6646
|
]
|
|
6648
6647
|
},
|
|
@@ -7186,6 +7185,121 @@
|
|
|
7186
7185
|
"unusedusers:diagnose:org:hardis"
|
|
7187
7186
|
]
|
|
7188
7187
|
},
|
|
7188
|
+
"hardis:org:fix:listviewmine": {
|
|
7189
|
+
"aliases": [],
|
|
7190
|
+
"args": {},
|
|
7191
|
+
"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",
|
|
7192
|
+
"examples": [
|
|
7193
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
7194
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
7195
|
+
],
|
|
7196
|
+
"flags": {
|
|
7197
|
+
"json": {
|
|
7198
|
+
"description": "Format output as json.",
|
|
7199
|
+
"helpGroup": "GLOBAL",
|
|
7200
|
+
"name": "json",
|
|
7201
|
+
"allowNo": false,
|
|
7202
|
+
"type": "boolean"
|
|
7203
|
+
},
|
|
7204
|
+
"flags-dir": {
|
|
7205
|
+
"helpGroup": "GLOBAL",
|
|
7206
|
+
"name": "flags-dir",
|
|
7207
|
+
"summary": "Import flag values from a directory.",
|
|
7208
|
+
"hasDynamicHelp": false,
|
|
7209
|
+
"multiple": false,
|
|
7210
|
+
"type": "option"
|
|
7211
|
+
},
|
|
7212
|
+
"listviews": {
|
|
7213
|
+
"char": "l",
|
|
7214
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
7215
|
+
"name": "listviews",
|
|
7216
|
+
"hasDynamicHelp": false,
|
|
7217
|
+
"multiple": false,
|
|
7218
|
+
"type": "option"
|
|
7219
|
+
},
|
|
7220
|
+
"debug": {
|
|
7221
|
+
"char": "d",
|
|
7222
|
+
"description": "Activate debug mode (more logs)",
|
|
7223
|
+
"name": "debug",
|
|
7224
|
+
"allowNo": false,
|
|
7225
|
+
"type": "boolean"
|
|
7226
|
+
},
|
|
7227
|
+
"websocket": {
|
|
7228
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7229
|
+
"name": "websocket",
|
|
7230
|
+
"hasDynamicHelp": false,
|
|
7231
|
+
"multiple": false,
|
|
7232
|
+
"type": "option"
|
|
7233
|
+
},
|
|
7234
|
+
"skipauth": {
|
|
7235
|
+
"description": "Skip authentication check when a default username is required",
|
|
7236
|
+
"name": "skipauth",
|
|
7237
|
+
"allowNo": false,
|
|
7238
|
+
"type": "boolean"
|
|
7239
|
+
},
|
|
7240
|
+
"target-org": {
|
|
7241
|
+
"aliases": [
|
|
7242
|
+
"targetusername",
|
|
7243
|
+
"u"
|
|
7244
|
+
],
|
|
7245
|
+
"char": "o",
|
|
7246
|
+
"deprecateAliases": true,
|
|
7247
|
+
"name": "target-org",
|
|
7248
|
+
"noCacheDefault": true,
|
|
7249
|
+
"required": true,
|
|
7250
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
7251
|
+
"hasDynamicHelp": true,
|
|
7252
|
+
"multiple": false,
|
|
7253
|
+
"type": "option"
|
|
7254
|
+
}
|
|
7255
|
+
},
|
|
7256
|
+
"hasDynamicHelp": true,
|
|
7257
|
+
"hiddenAliases": [],
|
|
7258
|
+
"id": "hardis:org:fix:listviewmine",
|
|
7259
|
+
"pluginAlias": "sfdx-hardis",
|
|
7260
|
+
"pluginName": "sfdx-hardis",
|
|
7261
|
+
"pluginType": "core",
|
|
7262
|
+
"strict": true,
|
|
7263
|
+
"enableJsonFlag": true,
|
|
7264
|
+
"title": "Fix listviews with ",
|
|
7265
|
+
"requiresProject": true,
|
|
7266
|
+
"isESM": true,
|
|
7267
|
+
"relativePath": [
|
|
7268
|
+
"lib",
|
|
7269
|
+
"commands",
|
|
7270
|
+
"hardis",
|
|
7271
|
+
"org",
|
|
7272
|
+
"fix",
|
|
7273
|
+
"listviewmine.js"
|
|
7274
|
+
],
|
|
7275
|
+
"aliasPermutations": [],
|
|
7276
|
+
"permutations": [
|
|
7277
|
+
"hardis:org:fix:listviewmine",
|
|
7278
|
+
"org:hardis:fix:listviewmine",
|
|
7279
|
+
"org:fix:hardis:listviewmine",
|
|
7280
|
+
"org:fix:listviewmine:hardis",
|
|
7281
|
+
"hardis:fix:org:listviewmine",
|
|
7282
|
+
"fix:hardis:org:listviewmine",
|
|
7283
|
+
"fix:org:hardis:listviewmine",
|
|
7284
|
+
"fix:org:listviewmine:hardis",
|
|
7285
|
+
"hardis:fix:listviewmine:org",
|
|
7286
|
+
"fix:hardis:listviewmine:org",
|
|
7287
|
+
"fix:listviewmine:hardis:org",
|
|
7288
|
+
"fix:listviewmine:org:hardis",
|
|
7289
|
+
"hardis:org:listviewmine:fix",
|
|
7290
|
+
"org:hardis:listviewmine:fix",
|
|
7291
|
+
"org:listviewmine:hardis:fix",
|
|
7292
|
+
"org:listviewmine:fix:hardis",
|
|
7293
|
+
"hardis:listviewmine:org:fix",
|
|
7294
|
+
"listviewmine:hardis:org:fix",
|
|
7295
|
+
"listviewmine:org:hardis:fix",
|
|
7296
|
+
"listviewmine:org:fix:hardis",
|
|
7297
|
+
"hardis:listviewmine:fix:org",
|
|
7298
|
+
"listviewmine:hardis:fix:org",
|
|
7299
|
+
"listviewmine:fix:hardis:org",
|
|
7300
|
+
"listviewmine:fix:org:hardis"
|
|
7301
|
+
]
|
|
7302
|
+
},
|
|
7189
7303
|
"hardis:org:generate:packagexmlfull": {
|
|
7190
7304
|
"aliases": [],
|
|
7191
7305
|
"args": {},
|
|
@@ -7789,16 +7903,13 @@
|
|
|
7789
7903
|
"limits:monitor:org:hardis"
|
|
7790
7904
|
]
|
|
7791
7905
|
},
|
|
7792
|
-
"hardis:org:
|
|
7906
|
+
"hardis:org:purge:apexlog": {
|
|
7793
7907
|
"aliases": [],
|
|
7794
7908
|
"args": {},
|
|
7795
|
-
"description": "\n
|
|
7909
|
+
"description": "\n**Purges Apex debug logs from a Salesforce org.**\n\nThis command provides a quick and efficient way to clear out accumulated Apex debug logs from your Salesforce environment. This is particularly useful for:\n\n- **Storage Management:** Freeing up valuable data storage space in your Salesforce org.\n- **Performance Optimization:** Reducing the overhead associated with large volumes of debug logs.\n- **Troubleshooting:** Ensuring that new debug logs are generated cleanly without interference from old, irrelevant logs.\n\nKey functionalities:\n\n- **Log Identification:** Queries the `ApexLog` object to identify all existing debug logs.\n- **Confirmation Prompt:** Before deletion, it prompts for user confirmation, displaying the number of Apex logs that will be deleted.\n- **Bulk Deletion:** Uses the Salesforce Bulk API to efficiently delete a large number of Apex logs.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query:** It executes a SOQL query (`SELECT Id FROM ApexLog LIMIT 50000`) to retrieve the IDs of Apex logs to be deleted. The limit is set to 50,000 to handle large volumes of logs.\n- **CSV Export:** The retrieved log IDs are temporarily exported to a CSV file (`ApexLogsToDelete_*.csv`) in the `./tmp` directory.\n- **User Confirmation:** It uses the `prompts` library to ask for user confirmation before proceeding with the deletion, displaying the count of logs to be purged.\n- **Bulk API Deletion:** It then uses the Salesforce CLI's `sf data delete bulk` command, pointing to the generated CSV file, to perform the mass deletion of Apex logs.\n- **File System Operations:** It uses `fs-extra` to create the temporary directory and manage the CSV file.\n- **Error Handling:** Includes error handling for the query and deletion operations.\n</details>\n",
|
|
7796
7910
|
"examples": [
|
|
7797
|
-
"$ sf hardis:org:
|
|
7798
|
-
"$ sf hardis:org:
|
|
7799
|
-
"$ sf hardis:org:refresh:after-refresh --name \"App1,App2,App3\" // Process multiple apps, no selection prompt",
|
|
7800
|
-
"$ sf hardis:org:refresh:after-refresh --all // Process all apps, no selection prompt",
|
|
7801
|
-
"$ sf hardis:org:refresh:after-refresh --target-org myDevOrg"
|
|
7911
|
+
"$ sf hardis:org:purge:apexlog",
|
|
7912
|
+
"$ sf hardis:org:purge:apexlog --target-org nicolas.vuillamy@gmail.com"
|
|
7802
7913
|
],
|
|
7803
7914
|
"flags": {
|
|
7804
7915
|
"json": {
|
|
@@ -7816,18 +7927,289 @@
|
|
|
7816
7927
|
"multiple": false,
|
|
7817
7928
|
"type": "option"
|
|
7818
7929
|
},
|
|
7819
|
-
"
|
|
7820
|
-
"char": "
|
|
7821
|
-
"
|
|
7822
|
-
"
|
|
7823
|
-
"
|
|
7824
|
-
"
|
|
7825
|
-
"hasDynamicHelp": true,
|
|
7826
|
-
"multiple": false,
|
|
7827
|
-
"type": "option"
|
|
7930
|
+
"prompt": {
|
|
7931
|
+
"char": "z",
|
|
7932
|
+
"description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
|
|
7933
|
+
"name": "prompt",
|
|
7934
|
+
"allowNo": true,
|
|
7935
|
+
"type": "boolean"
|
|
7828
7936
|
},
|
|
7829
|
-
"
|
|
7830
|
-
"char": "
|
|
7937
|
+
"debug": {
|
|
7938
|
+
"char": "d",
|
|
7939
|
+
"description": "Activate debug mode (more logs)",
|
|
7940
|
+
"name": "debug",
|
|
7941
|
+
"allowNo": false,
|
|
7942
|
+
"type": "boolean"
|
|
7943
|
+
},
|
|
7944
|
+
"websocket": {
|
|
7945
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
7946
|
+
"name": "websocket",
|
|
7947
|
+
"hasDynamicHelp": false,
|
|
7948
|
+
"multiple": false,
|
|
7949
|
+
"type": "option"
|
|
7950
|
+
},
|
|
7951
|
+
"skipauth": {
|
|
7952
|
+
"description": "Skip authentication check when a default username is required",
|
|
7953
|
+
"name": "skipauth",
|
|
7954
|
+
"allowNo": false,
|
|
7955
|
+
"type": "boolean"
|
|
7956
|
+
},
|
|
7957
|
+
"target-org": {
|
|
7958
|
+
"aliases": [
|
|
7959
|
+
"targetusername",
|
|
7960
|
+
"u"
|
|
7961
|
+
],
|
|
7962
|
+
"char": "o",
|
|
7963
|
+
"deprecateAliases": true,
|
|
7964
|
+
"name": "target-org",
|
|
7965
|
+
"noCacheDefault": true,
|
|
7966
|
+
"required": true,
|
|
7967
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
7968
|
+
"hasDynamicHelp": true,
|
|
7969
|
+
"multiple": false,
|
|
7970
|
+
"type": "option"
|
|
7971
|
+
}
|
|
7972
|
+
},
|
|
7973
|
+
"hasDynamicHelp": true,
|
|
7974
|
+
"hiddenAliases": [],
|
|
7975
|
+
"id": "hardis:org:purge:apexlog",
|
|
7976
|
+
"pluginAlias": "sfdx-hardis",
|
|
7977
|
+
"pluginName": "sfdx-hardis",
|
|
7978
|
+
"pluginType": "core",
|
|
7979
|
+
"strict": true,
|
|
7980
|
+
"enableJsonFlag": true,
|
|
7981
|
+
"title": "Purge Apex Logs",
|
|
7982
|
+
"requiresProject": false,
|
|
7983
|
+
"isESM": true,
|
|
7984
|
+
"relativePath": [
|
|
7985
|
+
"lib",
|
|
7986
|
+
"commands",
|
|
7987
|
+
"hardis",
|
|
7988
|
+
"org",
|
|
7989
|
+
"purge",
|
|
7990
|
+
"apexlog.js"
|
|
7991
|
+
],
|
|
7992
|
+
"aliasPermutations": [],
|
|
7993
|
+
"permutations": [
|
|
7994
|
+
"hardis:org:purge:apexlog",
|
|
7995
|
+
"org:hardis:purge:apexlog",
|
|
7996
|
+
"org:purge:hardis:apexlog",
|
|
7997
|
+
"org:purge:apexlog:hardis",
|
|
7998
|
+
"hardis:purge:org:apexlog",
|
|
7999
|
+
"purge:hardis:org:apexlog",
|
|
8000
|
+
"purge:org:hardis:apexlog",
|
|
8001
|
+
"purge:org:apexlog:hardis",
|
|
8002
|
+
"hardis:purge:apexlog:org",
|
|
8003
|
+
"purge:hardis:apexlog:org",
|
|
8004
|
+
"purge:apexlog:hardis:org",
|
|
8005
|
+
"purge:apexlog:org:hardis",
|
|
8006
|
+
"hardis:org:apexlog:purge",
|
|
8007
|
+
"org:hardis:apexlog:purge",
|
|
8008
|
+
"org:apexlog:hardis:purge",
|
|
8009
|
+
"org:apexlog:purge:hardis",
|
|
8010
|
+
"hardis:apexlog:org:purge",
|
|
8011
|
+
"apexlog:hardis:org:purge",
|
|
8012
|
+
"apexlog:org:hardis:purge",
|
|
8013
|
+
"apexlog:org:purge:hardis",
|
|
8014
|
+
"hardis:apexlog:purge:org",
|
|
8015
|
+
"apexlog:hardis:purge:org",
|
|
8016
|
+
"apexlog:purge:hardis:org",
|
|
8017
|
+
"apexlog:purge:org:hardis"
|
|
8018
|
+
]
|
|
8019
|
+
},
|
|
8020
|
+
"hardis:org:purge:flow": {
|
|
8021
|
+
"aliases": [],
|
|
8022
|
+
"args": {},
|
|
8023
|
+
"description": "\n**Purges old or unwanted Flow versions from a Salesforce org, with an option to delete related Flow Interviews.**\n\nThis command helps maintain a clean and performant Salesforce org by removing obsolete Flow versions. Over time, multiple versions of Flows can accumulate, consuming storage and potentially impacting performance. This tool provides a controlled way to clean up these versions.\n\nKey functionalities:\n\n- **Targeted Flow Selection:** Allows you to filter Flow versions to delete by name (`--name`) and status (`--status`, e.g., `Obsolete`, `Draft`, `Inactive`).\n- **Flow Interview Deletion:** If a Flow version cannot be deleted due to active Flow Interviews, the `--delete-flow-interviews` flag (or interactive prompt) allows you to delete these interviews first, then retry the Flow version deletion.\n- **Confirmation Prompt:** In interactive mode, it prompts for confirmation before proceeding with the deletion of Flow versions and Flow Interviews.\n- **Partial Success Handling:** The `--allowpurgefailure` flag (default `true`) allows the command to continue even if some deletions fail, reporting the errors.\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 `Flow` object (using the Tooling API) to list Flow versions based on the provided filters (name, status, manageable state).\n- **Bulk Deletion (Tooling API):** It uses `bulkDeleteTooling` to perform mass deletions of Flow versions. If deletion fails due to active interviews, it extracts the interview IDs.\n- **Flow Interview Management:** If `delete-flow-interviews` is enabled, it queries `FlowInterview` objects, performs bulk deletion of the identified interviews using `bulkDelete`, and then retries the Flow version deletion.\n- **Interactive Prompts:** Uses the `prompts` library to interact with the user for selecting Flows, statuses, and confirming deletion actions.\n- **Error Reporting:** Logs detailed error messages for failed deletions, including the specific reasons.\n- **Command-Line Execution:** Uses `execSfdxJson` to execute Salesforce CLI commands for querying Flow data.\n</details>\n",
|
|
8024
|
+
"examples": [
|
|
8025
|
+
"$ sf hardis:org:purge:flow",
|
|
8026
|
+
"$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --no-prompt --delete-flow-interviews",
|
|
8027
|
+
"$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --status \"Obsolete,Draft,InvalidDraft\" --name TestFlow"
|
|
8028
|
+
],
|
|
8029
|
+
"flags": {
|
|
8030
|
+
"json": {
|
|
8031
|
+
"description": "Format output as json.",
|
|
8032
|
+
"helpGroup": "GLOBAL",
|
|
8033
|
+
"name": "json",
|
|
8034
|
+
"allowNo": false,
|
|
8035
|
+
"type": "boolean"
|
|
8036
|
+
},
|
|
8037
|
+
"flags-dir": {
|
|
8038
|
+
"helpGroup": "GLOBAL",
|
|
8039
|
+
"name": "flags-dir",
|
|
8040
|
+
"summary": "Import flag values from a directory.",
|
|
8041
|
+
"hasDynamicHelp": false,
|
|
8042
|
+
"multiple": false,
|
|
8043
|
+
"type": "option"
|
|
8044
|
+
},
|
|
8045
|
+
"prompt": {
|
|
8046
|
+
"char": "z",
|
|
8047
|
+
"description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
|
|
8048
|
+
"name": "prompt",
|
|
8049
|
+
"allowNo": true,
|
|
8050
|
+
"type": "boolean"
|
|
8051
|
+
},
|
|
8052
|
+
"name": {
|
|
8053
|
+
"char": "n",
|
|
8054
|
+
"description": "Filter according to Name criteria",
|
|
8055
|
+
"name": "name",
|
|
8056
|
+
"hasDynamicHelp": false,
|
|
8057
|
+
"multiple": false,
|
|
8058
|
+
"type": "option"
|
|
8059
|
+
},
|
|
8060
|
+
"status": {
|
|
8061
|
+
"char": "s",
|
|
8062
|
+
"description": "Filter according to Status criteria",
|
|
8063
|
+
"name": "status",
|
|
8064
|
+
"hasDynamicHelp": false,
|
|
8065
|
+
"multiple": false,
|
|
8066
|
+
"type": "option"
|
|
8067
|
+
},
|
|
8068
|
+
"delete-flow-interviews": {
|
|
8069
|
+
"char": "w",
|
|
8070
|
+
"description": "If the presence of Flow interviews prevent to delete flows versions, delete them before retrying to delete flow versions",
|
|
8071
|
+
"name": "delete-flow-interviews",
|
|
8072
|
+
"allowNo": false,
|
|
8073
|
+
"type": "boolean"
|
|
8074
|
+
},
|
|
8075
|
+
"allowpurgefailure": {
|
|
8076
|
+
"char": "f",
|
|
8077
|
+
"description": "Allows purges to fail without exiting with 1. Use --no-allowpurgefailure to disable",
|
|
8078
|
+
"name": "allowpurgefailure",
|
|
8079
|
+
"allowNo": true,
|
|
8080
|
+
"type": "boolean"
|
|
8081
|
+
},
|
|
8082
|
+
"instanceurl": {
|
|
8083
|
+
"char": "r",
|
|
8084
|
+
"description": "URL of org instance",
|
|
8085
|
+
"name": "instanceurl",
|
|
8086
|
+
"default": "https://login.salesforce.com",
|
|
8087
|
+
"hasDynamicHelp": false,
|
|
8088
|
+
"multiple": false,
|
|
8089
|
+
"type": "option"
|
|
8090
|
+
},
|
|
8091
|
+
"debug": {
|
|
8092
|
+
"char": "d",
|
|
8093
|
+
"description": "Activate debug mode (more logs)",
|
|
8094
|
+
"name": "debug",
|
|
8095
|
+
"allowNo": false,
|
|
8096
|
+
"type": "boolean"
|
|
8097
|
+
},
|
|
8098
|
+
"websocket": {
|
|
8099
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8100
|
+
"name": "websocket",
|
|
8101
|
+
"hasDynamicHelp": false,
|
|
8102
|
+
"multiple": false,
|
|
8103
|
+
"type": "option"
|
|
8104
|
+
},
|
|
8105
|
+
"skipauth": {
|
|
8106
|
+
"description": "Skip authentication check when a default username is required",
|
|
8107
|
+
"name": "skipauth",
|
|
8108
|
+
"allowNo": false,
|
|
8109
|
+
"type": "boolean"
|
|
8110
|
+
},
|
|
8111
|
+
"target-org": {
|
|
8112
|
+
"aliases": [
|
|
8113
|
+
"targetusername",
|
|
8114
|
+
"u"
|
|
8115
|
+
],
|
|
8116
|
+
"char": "o",
|
|
8117
|
+
"deprecateAliases": true,
|
|
8118
|
+
"name": "target-org",
|
|
8119
|
+
"noCacheDefault": true,
|
|
8120
|
+
"required": true,
|
|
8121
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8122
|
+
"hasDynamicHelp": true,
|
|
8123
|
+
"multiple": false,
|
|
8124
|
+
"type": "option"
|
|
8125
|
+
}
|
|
8126
|
+
},
|
|
8127
|
+
"hasDynamicHelp": true,
|
|
8128
|
+
"hiddenAliases": [],
|
|
8129
|
+
"id": "hardis:org:purge:flow",
|
|
8130
|
+
"pluginAlias": "sfdx-hardis",
|
|
8131
|
+
"pluginName": "sfdx-hardis",
|
|
8132
|
+
"pluginType": "core",
|
|
8133
|
+
"strict": true,
|
|
8134
|
+
"enableJsonFlag": true,
|
|
8135
|
+
"title": "Purge Flow versions",
|
|
8136
|
+
"requiresProject": false,
|
|
8137
|
+
"isESM": true,
|
|
8138
|
+
"relativePath": [
|
|
8139
|
+
"lib",
|
|
8140
|
+
"commands",
|
|
8141
|
+
"hardis",
|
|
8142
|
+
"org",
|
|
8143
|
+
"purge",
|
|
8144
|
+
"flow.js"
|
|
8145
|
+
],
|
|
8146
|
+
"aliasPermutations": [],
|
|
8147
|
+
"permutations": [
|
|
8148
|
+
"hardis:org:purge:flow",
|
|
8149
|
+
"org:hardis:purge:flow",
|
|
8150
|
+
"org:purge:hardis:flow",
|
|
8151
|
+
"org:purge:flow:hardis",
|
|
8152
|
+
"hardis:purge:org:flow",
|
|
8153
|
+
"purge:hardis:org:flow",
|
|
8154
|
+
"purge:org:hardis:flow",
|
|
8155
|
+
"purge:org:flow:hardis",
|
|
8156
|
+
"hardis:purge:flow:org",
|
|
8157
|
+
"purge:hardis:flow:org",
|
|
8158
|
+
"purge:flow:hardis:org",
|
|
8159
|
+
"purge:flow:org:hardis",
|
|
8160
|
+
"hardis:org:flow:purge",
|
|
8161
|
+
"org:hardis:flow:purge",
|
|
8162
|
+
"org:flow:hardis:purge",
|
|
8163
|
+
"org:flow:purge:hardis",
|
|
8164
|
+
"hardis:flow:org:purge",
|
|
8165
|
+
"flow:hardis:org:purge",
|
|
8166
|
+
"flow:org:hardis:purge",
|
|
8167
|
+
"flow:org:purge:hardis",
|
|
8168
|
+
"hardis:flow:purge:org",
|
|
8169
|
+
"flow:hardis:purge:org",
|
|
8170
|
+
"flow:purge:hardis:org",
|
|
8171
|
+
"flow:purge:org:hardis"
|
|
8172
|
+
]
|
|
8173
|
+
},
|
|
8174
|
+
"hardis:org:refresh:after-refresh": {
|
|
8175
|
+
"aliases": [],
|
|
8176
|
+
"args": {},
|
|
8177
|
+
"description": "\n## Command Behavior\n\n**Restores all previously backed-up Connected Apps (including Consumer Secrets), certificates, custom settings, records and other metadata to a Salesforce org after a sandbox refresh.**\n\nThis command is the second step in the sandbox refresh process. It scans the backup folder created before the refresh, allows interactive or flag-driven selection of items to restore, and automates cleanup and redeployment to the refreshed org while preserving credentials and configuration.\n\nKey functionalities:\n\n- **Choose a backup to restore:** Lets you pick the saved sandbox project that contains the artifacts to restore.\n- **Select which items to restore:** Finds Connected App XMLs, certificates, custom settings and other artifacts and lets you pick what to restore (or restore all).\n- **Safety checks and validation:** Confirms files exist and prompts before making changes to the target org.\n- **Prepare org for restore:** Optionally cleans up existing Connected Apps so saved apps can be re-deployed without conflict.\n- **Redeploy saved artifacts:** Restores Connected Apps (with saved secrets), certificates, SAML SSO configs, custom settings and other metadata.\n- **Handle SAML configs:** Cleans and updates SAML XML files and helps you choose certificates to wire into restored configs.\n- **Restore records:** Optionally runs data import from selected SFDMU workspaces to restore record data.\n- **Reporting & persistence:** Sends restore reports and can update project config to record what was restored.\n\nThis command is part of [sfdx-hardis Sandbox Refresh](https://sfdx-hardis.cloudity.com/salesforce-sandbox-refresh/) and is intended to be run after a sandbox refresh to re-apply saved metadata, credentials and data.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\n- **Backup Folder Handling:** Reads the immediate subfolders of `scripts/sandbox-refresh/` and validates the chosen project contains the expected `manifest/` and `force-app` layout.\n- **Metadata & Deployment APIs:** Uses `sf project deploy start --manifest` for package-based deploys, `sf project deploy start --metadata-dir` for MDAPI artifacts (certificates), and utility functions for Connected App deployment that preserve consumer secrets.\n- **SAML Handling:** Queries active certificates via tooling API, updates SAML XML files, and deploys using `sf project deploy start -m SamlSsoConfig`.\n- **Records Handling:** Uses interactive selection of SFDMU workspaces and runs data import utilities to restore records.\n- **Error Handling & Summary:** Aggregates results, logs success/warnings/errors, and returns a structured result indicating which items were restored and any failures.\n\n</details>\n",
|
|
8178
|
+
"examples": [
|
|
8179
|
+
"$ sf hardis:org:refresh:after-refresh",
|
|
8180
|
+
"$ sf hardis:org:refresh:after-refresh --name \"MyConnectedApp\" // Process specific app, no selection prompt",
|
|
8181
|
+
"$ sf hardis:org:refresh:after-refresh --name \"App1,App2,App3\" // Process multiple apps, no selection prompt",
|
|
8182
|
+
"$ sf hardis:org:refresh:after-refresh --all // Process all apps, no selection prompt",
|
|
8183
|
+
"$ sf hardis:org:refresh:after-refresh --target-org myDevOrg"
|
|
8184
|
+
],
|
|
8185
|
+
"flags": {
|
|
8186
|
+
"json": {
|
|
8187
|
+
"description": "Format output as json.",
|
|
8188
|
+
"helpGroup": "GLOBAL",
|
|
8189
|
+
"name": "json",
|
|
8190
|
+
"allowNo": false,
|
|
8191
|
+
"type": "boolean"
|
|
8192
|
+
},
|
|
8193
|
+
"flags-dir": {
|
|
8194
|
+
"helpGroup": "GLOBAL",
|
|
8195
|
+
"name": "flags-dir",
|
|
8196
|
+
"summary": "Import flag values from a directory.",
|
|
8197
|
+
"hasDynamicHelp": false,
|
|
8198
|
+
"multiple": false,
|
|
8199
|
+
"type": "option"
|
|
8200
|
+
},
|
|
8201
|
+
"target-org": {
|
|
8202
|
+
"char": "o",
|
|
8203
|
+
"name": "target-org",
|
|
8204
|
+
"noCacheDefault": true,
|
|
8205
|
+
"required": true,
|
|
8206
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8207
|
+
"hasDynamicHelp": true,
|
|
8208
|
+
"multiple": false,
|
|
8209
|
+
"type": "option"
|
|
8210
|
+
},
|
|
8211
|
+
"name": {
|
|
8212
|
+
"char": "n",
|
|
7831
8213
|
"description": "Connected App name(s) to process (bypasses selection prompt). For multiple apps, separate with commas (e.g., \"App1,App2\")",
|
|
7832
8214
|
"name": "name",
|
|
7833
8215
|
"summary": "Filter according to Name criteria",
|
|
@@ -8028,128 +8410,13 @@
|
|
|
8028
8410
|
"before-refresh:refresh:org:hardis"
|
|
8029
8411
|
]
|
|
8030
8412
|
},
|
|
8031
|
-
"hardis:org:
|
|
8032
|
-
"aliases": [],
|
|
8033
|
-
"args": {},
|
|
8034
|
-
"description": "\n**Purges Apex debug logs from a Salesforce org.**\n\nThis command provides a quick and efficient way to clear out accumulated Apex debug logs from your Salesforce environment. This is particularly useful for:\n\n- **Storage Management:** Freeing up valuable data storage space in your Salesforce org.\n- **Performance Optimization:** Reducing the overhead associated with large volumes of debug logs.\n- **Troubleshooting:** Ensuring that new debug logs are generated cleanly without interference from old, irrelevant logs.\n\nKey functionalities:\n\n- **Log Identification:** Queries the `ApexLog` object to identify all existing debug logs.\n- **Confirmation Prompt:** Before deletion, it prompts for user confirmation, displaying the number of Apex logs that will be deleted.\n- **Bulk Deletion:** Uses the Salesforce Bulk API to efficiently delete a large number of Apex logs.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **SOQL Query:** It executes a SOQL query (`SELECT Id FROM ApexLog LIMIT 50000`) to retrieve the IDs of Apex logs to be deleted. The limit is set to 50,000 to handle large volumes of logs.\n- **CSV Export:** The retrieved log IDs are temporarily exported to a CSV file (`ApexLogsToDelete_*.csv`) in the `./tmp` directory.\n- **User Confirmation:** It uses the `prompts` library to ask for user confirmation before proceeding with the deletion, displaying the count of logs to be purged.\n- **Bulk API Deletion:** It then uses the Salesforce CLI's `sf data delete bulk` command, pointing to the generated CSV file, to perform the mass deletion of Apex logs.\n- **File System Operations:** It uses `fs-extra` to create the temporary directory and manage the CSV file.\n- **Error Handling:** Includes error handling for the query and deletion operations.\n</details>\n",
|
|
8035
|
-
"examples": [
|
|
8036
|
-
"$ sf hardis:org:purge:apexlog",
|
|
8037
|
-
"$ sf hardis:org:purge:apexlog --target-org nicolas.vuillamy@gmail.com"
|
|
8038
|
-
],
|
|
8039
|
-
"flags": {
|
|
8040
|
-
"json": {
|
|
8041
|
-
"description": "Format output as json.",
|
|
8042
|
-
"helpGroup": "GLOBAL",
|
|
8043
|
-
"name": "json",
|
|
8044
|
-
"allowNo": false,
|
|
8045
|
-
"type": "boolean"
|
|
8046
|
-
},
|
|
8047
|
-
"flags-dir": {
|
|
8048
|
-
"helpGroup": "GLOBAL",
|
|
8049
|
-
"name": "flags-dir",
|
|
8050
|
-
"summary": "Import flag values from a directory.",
|
|
8051
|
-
"hasDynamicHelp": false,
|
|
8052
|
-
"multiple": false,
|
|
8053
|
-
"type": "option"
|
|
8054
|
-
},
|
|
8055
|
-
"prompt": {
|
|
8056
|
-
"char": "z",
|
|
8057
|
-
"description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
|
|
8058
|
-
"name": "prompt",
|
|
8059
|
-
"allowNo": true,
|
|
8060
|
-
"type": "boolean"
|
|
8061
|
-
},
|
|
8062
|
-
"debug": {
|
|
8063
|
-
"char": "d",
|
|
8064
|
-
"description": "Activate debug mode (more logs)",
|
|
8065
|
-
"name": "debug",
|
|
8066
|
-
"allowNo": false,
|
|
8067
|
-
"type": "boolean"
|
|
8068
|
-
},
|
|
8069
|
-
"websocket": {
|
|
8070
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8071
|
-
"name": "websocket",
|
|
8072
|
-
"hasDynamicHelp": false,
|
|
8073
|
-
"multiple": false,
|
|
8074
|
-
"type": "option"
|
|
8075
|
-
},
|
|
8076
|
-
"skipauth": {
|
|
8077
|
-
"description": "Skip authentication check when a default username is required",
|
|
8078
|
-
"name": "skipauth",
|
|
8079
|
-
"allowNo": false,
|
|
8080
|
-
"type": "boolean"
|
|
8081
|
-
},
|
|
8082
|
-
"target-org": {
|
|
8083
|
-
"aliases": [
|
|
8084
|
-
"targetusername",
|
|
8085
|
-
"u"
|
|
8086
|
-
],
|
|
8087
|
-
"char": "o",
|
|
8088
|
-
"deprecateAliases": true,
|
|
8089
|
-
"name": "target-org",
|
|
8090
|
-
"noCacheDefault": true,
|
|
8091
|
-
"required": true,
|
|
8092
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8093
|
-
"hasDynamicHelp": true,
|
|
8094
|
-
"multiple": false,
|
|
8095
|
-
"type": "option"
|
|
8096
|
-
}
|
|
8097
|
-
},
|
|
8098
|
-
"hasDynamicHelp": true,
|
|
8099
|
-
"hiddenAliases": [],
|
|
8100
|
-
"id": "hardis:org:purge:apexlog",
|
|
8101
|
-
"pluginAlias": "sfdx-hardis",
|
|
8102
|
-
"pluginName": "sfdx-hardis",
|
|
8103
|
-
"pluginType": "core",
|
|
8104
|
-
"strict": true,
|
|
8105
|
-
"enableJsonFlag": true,
|
|
8106
|
-
"title": "Purge Apex Logs",
|
|
8107
|
-
"requiresProject": false,
|
|
8108
|
-
"isESM": true,
|
|
8109
|
-
"relativePath": [
|
|
8110
|
-
"lib",
|
|
8111
|
-
"commands",
|
|
8112
|
-
"hardis",
|
|
8113
|
-
"org",
|
|
8114
|
-
"purge",
|
|
8115
|
-
"apexlog.js"
|
|
8116
|
-
],
|
|
8117
|
-
"aliasPermutations": [],
|
|
8118
|
-
"permutations": [
|
|
8119
|
-
"hardis:org:purge:apexlog",
|
|
8120
|
-
"org:hardis:purge:apexlog",
|
|
8121
|
-
"org:purge:hardis:apexlog",
|
|
8122
|
-
"org:purge:apexlog:hardis",
|
|
8123
|
-
"hardis:purge:org:apexlog",
|
|
8124
|
-
"purge:hardis:org:apexlog",
|
|
8125
|
-
"purge:org:hardis:apexlog",
|
|
8126
|
-
"purge:org:apexlog:hardis",
|
|
8127
|
-
"hardis:purge:apexlog:org",
|
|
8128
|
-
"purge:hardis:apexlog:org",
|
|
8129
|
-
"purge:apexlog:hardis:org",
|
|
8130
|
-
"purge:apexlog:org:hardis",
|
|
8131
|
-
"hardis:org:apexlog:purge",
|
|
8132
|
-
"org:hardis:apexlog:purge",
|
|
8133
|
-
"org:apexlog:hardis:purge",
|
|
8134
|
-
"org:apexlog:purge:hardis",
|
|
8135
|
-
"hardis:apexlog:org:purge",
|
|
8136
|
-
"apexlog:hardis:org:purge",
|
|
8137
|
-
"apexlog:org:hardis:purge",
|
|
8138
|
-
"apexlog:org:purge:hardis",
|
|
8139
|
-
"hardis:apexlog:purge:org",
|
|
8140
|
-
"apexlog:hardis:purge:org",
|
|
8141
|
-
"apexlog:purge:hardis:org",
|
|
8142
|
-
"apexlog:purge:org:hardis"
|
|
8143
|
-
]
|
|
8144
|
-
},
|
|
8145
|
-
"hardis:org:purge:flow": {
|
|
8413
|
+
"hardis:org:retrieve:packageconfig": {
|
|
8146
8414
|
"aliases": [],
|
|
8147
8415
|
"args": {},
|
|
8148
|
-
"description": "\n**
|
|
8416
|
+
"description": "\n**Retrieves the installed package configuration from a Salesforce org and optionally updates the local project configuration.**\n\nThis command is useful for maintaining an accurate record of installed packages within your Salesforce project, which is crucial for managing dependencies and ensuring consistent deployments across environments.\n\nKey functionalities:\n\n- **Package Listing:** Connects to a specified Salesforce org (or prompts for one if not provided) and retrieves a list of all installed packages.\n- **Configuration Update:** Offers the option to update your local project's configuration with the retrieved list of installed packages. This can be beneficial for automating package installations during environment setup or CI/CD processes.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Org Connection:** It establishes a connection to the target Salesforce org using the provided or prompted username.\n- **Metadata Retrieval:** It utilizes `MetadataUtils.listInstalledPackages` to query the Salesforce org and obtain details about the installed packages.\n- **Interactive Prompt:** It uses the `prompts` library to ask the user whether they want to update their local project configuration with the retrieved package list.\n- **Configuration Management:** If the user confirms, it calls `managePackageConfig` to update the project's configuration file (likely `.sfdx-hardis.yml`) with the new package information.\n- **User Feedback:** Provides clear messages to the user about the success of the package retrieval and configuration update.\n</details>\n",
|
|
8149
8417
|
"examples": [
|
|
8150
|
-
"$ sf hardis:org:
|
|
8151
|
-
"
|
|
8152
|
-
"$ sf hardis:org:purge:flow --target-org nicolas.vuillamy@gmail.com --status \"Obsolete,Draft,InvalidDraft\" --name TestFlow"
|
|
8418
|
+
"$ sf hardis:org:retrieve:packageconfig",
|
|
8419
|
+
"sf hardis:org:retrieve:packageconfig -u myOrg"
|
|
8153
8420
|
],
|
|
8154
8421
|
"flags": {
|
|
8155
8422
|
"json": {
|
|
@@ -8162,53 +8429,7 @@
|
|
|
8162
8429
|
"flags-dir": {
|
|
8163
8430
|
"helpGroup": "GLOBAL",
|
|
8164
8431
|
"name": "flags-dir",
|
|
8165
|
-
"summary": "Import flag values from a directory.",
|
|
8166
|
-
"hasDynamicHelp": false,
|
|
8167
|
-
"multiple": false,
|
|
8168
|
-
"type": "option"
|
|
8169
|
-
},
|
|
8170
|
-
"prompt": {
|
|
8171
|
-
"char": "z",
|
|
8172
|
-
"description": "Prompt for confirmation (true by default, use --no-prompt to skip)",
|
|
8173
|
-
"name": "prompt",
|
|
8174
|
-
"allowNo": true,
|
|
8175
|
-
"type": "boolean"
|
|
8176
|
-
},
|
|
8177
|
-
"name": {
|
|
8178
|
-
"char": "n",
|
|
8179
|
-
"description": "Filter according to Name criteria",
|
|
8180
|
-
"name": "name",
|
|
8181
|
-
"hasDynamicHelp": false,
|
|
8182
|
-
"multiple": false,
|
|
8183
|
-
"type": "option"
|
|
8184
|
-
},
|
|
8185
|
-
"status": {
|
|
8186
|
-
"char": "s",
|
|
8187
|
-
"description": "Filter according to Status criteria",
|
|
8188
|
-
"name": "status",
|
|
8189
|
-
"hasDynamicHelp": false,
|
|
8190
|
-
"multiple": false,
|
|
8191
|
-
"type": "option"
|
|
8192
|
-
},
|
|
8193
|
-
"delete-flow-interviews": {
|
|
8194
|
-
"char": "w",
|
|
8195
|
-
"description": "If the presence of Flow interviews prevent to delete flows versions, delete them before retrying to delete flow versions",
|
|
8196
|
-
"name": "delete-flow-interviews",
|
|
8197
|
-
"allowNo": false,
|
|
8198
|
-
"type": "boolean"
|
|
8199
|
-
},
|
|
8200
|
-
"allowpurgefailure": {
|
|
8201
|
-
"char": "f",
|
|
8202
|
-
"description": "Allows purges to fail without exiting with 1. Use --no-allowpurgefailure to disable",
|
|
8203
|
-
"name": "allowpurgefailure",
|
|
8204
|
-
"allowNo": true,
|
|
8205
|
-
"type": "boolean"
|
|
8206
|
-
},
|
|
8207
|
-
"instanceurl": {
|
|
8208
|
-
"char": "r",
|
|
8209
|
-
"description": "URL of org instance",
|
|
8210
|
-
"name": "instanceurl",
|
|
8211
|
-
"default": "https://login.salesforce.com",
|
|
8432
|
+
"summary": "Import flag values from a directory.",
|
|
8212
8433
|
"hasDynamicHelp": false,
|
|
8213
8434
|
"multiple": false,
|
|
8214
8435
|
"type": "option"
|
|
@@ -8251,13 +8472,13 @@
|
|
|
8251
8472
|
},
|
|
8252
8473
|
"hasDynamicHelp": true,
|
|
8253
8474
|
"hiddenAliases": [],
|
|
8254
|
-
"id": "hardis:org:
|
|
8475
|
+
"id": "hardis:org:retrieve:packageconfig",
|
|
8255
8476
|
"pluginAlias": "sfdx-hardis",
|
|
8256
8477
|
"pluginName": "sfdx-hardis",
|
|
8257
8478
|
"pluginType": "core",
|
|
8258
8479
|
"strict": true,
|
|
8259
8480
|
"enableJsonFlag": true,
|
|
8260
|
-
"title": "
|
|
8481
|
+
"title": "Retrieve package configuration from an org",
|
|
8261
8482
|
"requiresProject": false,
|
|
8262
8483
|
"isESM": true,
|
|
8263
8484
|
"relativePath": [
|
|
@@ -8265,44 +8486,43 @@
|
|
|
8265
8486
|
"commands",
|
|
8266
8487
|
"hardis",
|
|
8267
8488
|
"org",
|
|
8268
|
-
"
|
|
8269
|
-
"
|
|
8489
|
+
"retrieve",
|
|
8490
|
+
"packageconfig.js"
|
|
8270
8491
|
],
|
|
8271
8492
|
"aliasPermutations": [],
|
|
8272
8493
|
"permutations": [
|
|
8273
|
-
"hardis:org:
|
|
8274
|
-
"org:hardis:
|
|
8275
|
-
"org:
|
|
8276
|
-
"org:
|
|
8277
|
-
"hardis:
|
|
8278
|
-
"
|
|
8279
|
-
"
|
|
8280
|
-
"
|
|
8281
|
-
"hardis:
|
|
8282
|
-
"
|
|
8283
|
-
"
|
|
8284
|
-
"
|
|
8285
|
-
"hardis:org:
|
|
8286
|
-
"org:hardis:
|
|
8287
|
-
"org:
|
|
8288
|
-
"org:
|
|
8289
|
-
"hardis:
|
|
8290
|
-
"
|
|
8291
|
-
"
|
|
8292
|
-
"
|
|
8293
|
-
"hardis:
|
|
8294
|
-
"
|
|
8295
|
-
"
|
|
8296
|
-
"
|
|
8494
|
+
"hardis:org:retrieve:packageconfig",
|
|
8495
|
+
"org:hardis:retrieve:packageconfig",
|
|
8496
|
+
"org:retrieve:hardis:packageconfig",
|
|
8497
|
+
"org:retrieve:packageconfig:hardis",
|
|
8498
|
+
"hardis:retrieve:org:packageconfig",
|
|
8499
|
+
"retrieve:hardis:org:packageconfig",
|
|
8500
|
+
"retrieve:org:hardis:packageconfig",
|
|
8501
|
+
"retrieve:org:packageconfig:hardis",
|
|
8502
|
+
"hardis:retrieve:packageconfig:org",
|
|
8503
|
+
"retrieve:hardis:packageconfig:org",
|
|
8504
|
+
"retrieve:packageconfig:hardis:org",
|
|
8505
|
+
"retrieve:packageconfig:org:hardis",
|
|
8506
|
+
"hardis:org:packageconfig:retrieve",
|
|
8507
|
+
"org:hardis:packageconfig:retrieve",
|
|
8508
|
+
"org:packageconfig:hardis:retrieve",
|
|
8509
|
+
"org:packageconfig:retrieve:hardis",
|
|
8510
|
+
"hardis:packageconfig:org:retrieve",
|
|
8511
|
+
"packageconfig:hardis:org:retrieve",
|
|
8512
|
+
"packageconfig:org:hardis:retrieve",
|
|
8513
|
+
"packageconfig:org:retrieve:hardis",
|
|
8514
|
+
"hardis:packageconfig:retrieve:org",
|
|
8515
|
+
"packageconfig:hardis:retrieve:org",
|
|
8516
|
+
"packageconfig:retrieve:hardis:org",
|
|
8517
|
+
"packageconfig:retrieve:org:hardis"
|
|
8297
8518
|
]
|
|
8298
8519
|
},
|
|
8299
|
-
"hardis:org:
|
|
8520
|
+
"hardis:org:test:apex": {
|
|
8300
8521
|
"aliases": [],
|
|
8301
8522
|
"args": {},
|
|
8302
|
-
"description": "
|
|
8523
|
+
"description": "Run apex tests in Salesforce org\n\nIf following configuration is defined, it will fail if apex coverage target is not reached:\n\n- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide`\n- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide`\n\nYou can override env var SFDX_TEST_WAIT_MINUTES to wait more than 120 minutes.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-apex-tests/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
8303
8524
|
"examples": [
|
|
8304
|
-
"$ sf hardis:org:
|
|
8305
|
-
"sf hardis:org:retrieve:packageconfig -u myOrg"
|
|
8525
|
+
"$ sf hardis:org:test:apex"
|
|
8306
8526
|
],
|
|
8307
8527
|
"flags": {
|
|
8308
8528
|
"json": {
|
|
@@ -8320,6 +8540,21 @@
|
|
|
8320
8540
|
"multiple": false,
|
|
8321
8541
|
"type": "option"
|
|
8322
8542
|
},
|
|
8543
|
+
"testlevel": {
|
|
8544
|
+
"char": "l",
|
|
8545
|
+
"description": "Level of tests to apply to validate deployment",
|
|
8546
|
+
"name": "testlevel",
|
|
8547
|
+
"default": "RunLocalTests",
|
|
8548
|
+
"hasDynamicHelp": false,
|
|
8549
|
+
"multiple": false,
|
|
8550
|
+
"options": [
|
|
8551
|
+
"NoTestRun",
|
|
8552
|
+
"RunSpecifiedTests",
|
|
8553
|
+
"RunLocalTests",
|
|
8554
|
+
"RunAllTestsInOrg"
|
|
8555
|
+
],
|
|
8556
|
+
"type": "option"
|
|
8557
|
+
},
|
|
8323
8558
|
"debug": {
|
|
8324
8559
|
"char": "d",
|
|
8325
8560
|
"description": "Activate debug mode (more logs)",
|
|
@@ -8358,49 +8593,48 @@
|
|
|
8358
8593
|
},
|
|
8359
8594
|
"hasDynamicHelp": true,
|
|
8360
8595
|
"hiddenAliases": [],
|
|
8361
|
-
"id": "hardis:org:
|
|
8596
|
+
"id": "hardis:org:test:apex",
|
|
8362
8597
|
"pluginAlias": "sfdx-hardis",
|
|
8363
8598
|
"pluginName": "sfdx-hardis",
|
|
8364
8599
|
"pluginType": "core",
|
|
8365
8600
|
"strict": true,
|
|
8366
8601
|
"enableJsonFlag": true,
|
|
8367
|
-
"title": "
|
|
8368
|
-
"requiresProject": false,
|
|
8602
|
+
"title": "Run apex tests",
|
|
8369
8603
|
"isESM": true,
|
|
8370
8604
|
"relativePath": [
|
|
8371
8605
|
"lib",
|
|
8372
8606
|
"commands",
|
|
8373
8607
|
"hardis",
|
|
8374
8608
|
"org",
|
|
8375
|
-
"
|
|
8376
|
-
"
|
|
8609
|
+
"test",
|
|
8610
|
+
"apex.js"
|
|
8377
8611
|
],
|
|
8378
8612
|
"aliasPermutations": [],
|
|
8379
8613
|
"permutations": [
|
|
8380
|
-
"hardis:org:
|
|
8381
|
-
"org:hardis:
|
|
8382
|
-
"org:
|
|
8383
|
-
"org:
|
|
8384
|
-
"hardis:
|
|
8385
|
-
"
|
|
8386
|
-
"
|
|
8387
|
-
"
|
|
8388
|
-
"hardis:
|
|
8389
|
-
"
|
|
8390
|
-
"
|
|
8391
|
-
"
|
|
8392
|
-
"hardis:org:
|
|
8393
|
-
"org:hardis:
|
|
8394
|
-
"org:
|
|
8395
|
-
"org:
|
|
8396
|
-
"hardis:
|
|
8397
|
-
"
|
|
8398
|
-
"
|
|
8399
|
-
"
|
|
8400
|
-
"hardis:
|
|
8401
|
-
"
|
|
8402
|
-
"
|
|
8403
|
-
"
|
|
8614
|
+
"hardis:org:test:apex",
|
|
8615
|
+
"org:hardis:test:apex",
|
|
8616
|
+
"org:test:hardis:apex",
|
|
8617
|
+
"org:test:apex:hardis",
|
|
8618
|
+
"hardis:test:org:apex",
|
|
8619
|
+
"test:hardis:org:apex",
|
|
8620
|
+
"test:org:hardis:apex",
|
|
8621
|
+
"test:org:apex:hardis",
|
|
8622
|
+
"hardis:test:apex:org",
|
|
8623
|
+
"test:hardis:apex:org",
|
|
8624
|
+
"test:apex:hardis:org",
|
|
8625
|
+
"test:apex:org:hardis",
|
|
8626
|
+
"hardis:org:apex:test",
|
|
8627
|
+
"org:hardis:apex:test",
|
|
8628
|
+
"org:apex:hardis:test",
|
|
8629
|
+
"org:apex:test:hardis",
|
|
8630
|
+
"hardis:apex:org:test",
|
|
8631
|
+
"apex:hardis:org:test",
|
|
8632
|
+
"apex:org:hardis:test",
|
|
8633
|
+
"apex:org:test:hardis",
|
|
8634
|
+
"hardis:apex:test:org",
|
|
8635
|
+
"apex:hardis:test:org",
|
|
8636
|
+
"apex:test:hardis:org",
|
|
8637
|
+
"apex:test:org:hardis"
|
|
8404
8638
|
]
|
|
8405
8639
|
},
|
|
8406
8640
|
"hardis:org:user:activateinvalid": {
|
|
@@ -8803,126 +9037,6 @@
|
|
|
8803
9037
|
"unfreeze:user:org:hardis"
|
|
8804
9038
|
]
|
|
8805
9039
|
},
|
|
8806
|
-
"hardis:org:test:apex": {
|
|
8807
|
-
"aliases": [],
|
|
8808
|
-
"args": {},
|
|
8809
|
-
"description": "Run apex tests in Salesforce org\n\nIf following configuration is defined, it will fail if apex coverage target is not reached:\n\n- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide`\n- Env `APEX_TESTS_MIN_COVERAGE_ORG_WIDE` or `.sfdx-hardis` property `apexTestsMinCoverageOrgWide`\n\nYou can override env var SFDX_TEST_WAIT_MINUTES to wait more than 120 minutes.\n\nThis command is part of [sfdx-hardis Monitoring](https://sfdx-hardis.cloudity.com/salesforce-monitoring-apex-tests/) and can output Grafana, Slack and MsTeams Notifications.\n",
|
|
8810
|
-
"examples": [
|
|
8811
|
-
"$ sf hardis:org:test:apex"
|
|
8812
|
-
],
|
|
8813
|
-
"flags": {
|
|
8814
|
-
"json": {
|
|
8815
|
-
"description": "Format output as json.",
|
|
8816
|
-
"helpGroup": "GLOBAL",
|
|
8817
|
-
"name": "json",
|
|
8818
|
-
"allowNo": false,
|
|
8819
|
-
"type": "boolean"
|
|
8820
|
-
},
|
|
8821
|
-
"flags-dir": {
|
|
8822
|
-
"helpGroup": "GLOBAL",
|
|
8823
|
-
"name": "flags-dir",
|
|
8824
|
-
"summary": "Import flag values from a directory.",
|
|
8825
|
-
"hasDynamicHelp": false,
|
|
8826
|
-
"multiple": false,
|
|
8827
|
-
"type": "option"
|
|
8828
|
-
},
|
|
8829
|
-
"testlevel": {
|
|
8830
|
-
"char": "l",
|
|
8831
|
-
"description": "Level of tests to apply to validate deployment",
|
|
8832
|
-
"name": "testlevel",
|
|
8833
|
-
"default": "RunLocalTests",
|
|
8834
|
-
"hasDynamicHelp": false,
|
|
8835
|
-
"multiple": false,
|
|
8836
|
-
"options": [
|
|
8837
|
-
"NoTestRun",
|
|
8838
|
-
"RunSpecifiedTests",
|
|
8839
|
-
"RunLocalTests",
|
|
8840
|
-
"RunAllTestsInOrg"
|
|
8841
|
-
],
|
|
8842
|
-
"type": "option"
|
|
8843
|
-
},
|
|
8844
|
-
"debug": {
|
|
8845
|
-
"char": "d",
|
|
8846
|
-
"description": "Activate debug mode (more logs)",
|
|
8847
|
-
"name": "debug",
|
|
8848
|
-
"allowNo": false,
|
|
8849
|
-
"type": "boolean"
|
|
8850
|
-
},
|
|
8851
|
-
"websocket": {
|
|
8852
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
8853
|
-
"name": "websocket",
|
|
8854
|
-
"hasDynamicHelp": false,
|
|
8855
|
-
"multiple": false,
|
|
8856
|
-
"type": "option"
|
|
8857
|
-
},
|
|
8858
|
-
"skipauth": {
|
|
8859
|
-
"description": "Skip authentication check when a default username is required",
|
|
8860
|
-
"name": "skipauth",
|
|
8861
|
-
"allowNo": false,
|
|
8862
|
-
"type": "boolean"
|
|
8863
|
-
},
|
|
8864
|
-
"target-org": {
|
|
8865
|
-
"aliases": [
|
|
8866
|
-
"targetusername",
|
|
8867
|
-
"u"
|
|
8868
|
-
],
|
|
8869
|
-
"char": "o",
|
|
8870
|
-
"deprecateAliases": true,
|
|
8871
|
-
"name": "target-org",
|
|
8872
|
-
"noCacheDefault": true,
|
|
8873
|
-
"required": true,
|
|
8874
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
8875
|
-
"hasDynamicHelp": true,
|
|
8876
|
-
"multiple": false,
|
|
8877
|
-
"type": "option"
|
|
8878
|
-
}
|
|
8879
|
-
},
|
|
8880
|
-
"hasDynamicHelp": true,
|
|
8881
|
-
"hiddenAliases": [],
|
|
8882
|
-
"id": "hardis:org:test:apex",
|
|
8883
|
-
"pluginAlias": "sfdx-hardis",
|
|
8884
|
-
"pluginName": "sfdx-hardis",
|
|
8885
|
-
"pluginType": "core",
|
|
8886
|
-
"strict": true,
|
|
8887
|
-
"enableJsonFlag": true,
|
|
8888
|
-
"title": "Run apex tests",
|
|
8889
|
-
"isESM": true,
|
|
8890
|
-
"relativePath": [
|
|
8891
|
-
"lib",
|
|
8892
|
-
"commands",
|
|
8893
|
-
"hardis",
|
|
8894
|
-
"org",
|
|
8895
|
-
"test",
|
|
8896
|
-
"apex.js"
|
|
8897
|
-
],
|
|
8898
|
-
"aliasPermutations": [],
|
|
8899
|
-
"permutations": [
|
|
8900
|
-
"hardis:org:test:apex",
|
|
8901
|
-
"org:hardis:test:apex",
|
|
8902
|
-
"org:test:hardis:apex",
|
|
8903
|
-
"org:test:apex:hardis",
|
|
8904
|
-
"hardis:test:org:apex",
|
|
8905
|
-
"test:hardis:org:apex",
|
|
8906
|
-
"test:org:hardis:apex",
|
|
8907
|
-
"test:org:apex:hardis",
|
|
8908
|
-
"hardis:test:apex:org",
|
|
8909
|
-
"test:hardis:apex:org",
|
|
8910
|
-
"test:apex:hardis:org",
|
|
8911
|
-
"test:apex:org:hardis",
|
|
8912
|
-
"hardis:org:apex:test",
|
|
8913
|
-
"org:hardis:apex:test",
|
|
8914
|
-
"org:apex:hardis:test",
|
|
8915
|
-
"org:apex:test:hardis",
|
|
8916
|
-
"hardis:apex:org:test",
|
|
8917
|
-
"apex:hardis:org:test",
|
|
8918
|
-
"apex:org:hardis:test",
|
|
8919
|
-
"apex:org:test:hardis",
|
|
8920
|
-
"hardis:apex:test:org",
|
|
8921
|
-
"apex:hardis:test:org",
|
|
8922
|
-
"apex:test:hardis:org",
|
|
8923
|
-
"apex:test:org:hardis"
|
|
8924
|
-
]
|
|
8925
|
-
},
|
|
8926
9040
|
"hardis:package:version:create": {
|
|
8927
9041
|
"aliases": [],
|
|
8928
9042
|
"args": {},
|
|
@@ -15370,5 +15484,5 @@
|
|
|
15370
15484
|
]
|
|
15371
15485
|
}
|
|
15372
15486
|
},
|
|
15373
|
-
"version": "6.
|
|
15487
|
+
"version": "6.10.0"
|
|
15374
15488
|
}
|