sfdx-hardis 6.15.2-beta202512140349.0 → 6.16.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/org/diagnose/legacyapi.d.ts +32 -8
- package/lib/commands/hardis/org/diagnose/legacyapi.js +272 -78
- package/lib/commands/hardis/org/diagnose/legacyapi.js.map +1 -1
- package/lib/common/utils/filesUtils.d.ts +6 -0
- package/lib/common/utils/filesUtils.js +1 -1
- package/lib/common/utils/filesUtils.js.map +1 -1
- package/oclif.manifest.json +1430 -1430
- package/package.json +1 -1
package/oclif.manifest.json
CHANGED
|
@@ -57,12 +57,13 @@
|
|
|
57
57
|
"world:hello"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
|
-
"hardis:
|
|
60
|
+
"hardis:auth:login": {
|
|
61
61
|
"aliases": [],
|
|
62
62
|
"args": {},
|
|
63
|
-
"description": "\n## Command Behavior\n\n**
|
|
63
|
+
"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",
|
|
64
64
|
"examples": [
|
|
65
|
-
"$ sf hardis:
|
|
65
|
+
"$ sf hardis:auth:login",
|
|
66
|
+
"CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
|
|
66
67
|
],
|
|
67
68
|
"flags": {
|
|
68
69
|
"json": {
|
|
@@ -80,6 +81,28 @@
|
|
|
80
81
|
"multiple": false,
|
|
81
82
|
"type": "option"
|
|
82
83
|
},
|
|
84
|
+
"instanceurl": {
|
|
85
|
+
"char": "r",
|
|
86
|
+
"description": "URL of org instance",
|
|
87
|
+
"name": "instanceurl",
|
|
88
|
+
"hasDynamicHelp": false,
|
|
89
|
+
"multiple": false,
|
|
90
|
+
"type": "option"
|
|
91
|
+
},
|
|
92
|
+
"devhub": {
|
|
93
|
+
"char": "h",
|
|
94
|
+
"description": "Also connect associated DevHub",
|
|
95
|
+
"name": "devhub",
|
|
96
|
+
"allowNo": false,
|
|
97
|
+
"type": "boolean"
|
|
98
|
+
},
|
|
99
|
+
"scratchorg": {
|
|
100
|
+
"char": "s",
|
|
101
|
+
"description": "Scratch org",
|
|
102
|
+
"name": "scratchorg",
|
|
103
|
+
"allowNo": false,
|
|
104
|
+
"type": "boolean"
|
|
105
|
+
},
|
|
83
106
|
"debug": {
|
|
84
107
|
"char": "d",
|
|
85
108
|
"description": "Activate debug mode (more logs)",
|
|
@@ -103,42 +126,38 @@
|
|
|
103
126
|
},
|
|
104
127
|
"hasDynamicHelp": false,
|
|
105
128
|
"hiddenAliases": [],
|
|
106
|
-
"id": "hardis:
|
|
129
|
+
"id": "hardis:auth:login",
|
|
107
130
|
"pluginAlias": "sfdx-hardis",
|
|
108
131
|
"pluginName": "sfdx-hardis",
|
|
109
132
|
"pluginType": "core",
|
|
110
133
|
"strict": true,
|
|
111
134
|
"enableJsonFlag": true,
|
|
112
|
-
"title": "
|
|
113
|
-
"uiConfig": {
|
|
114
|
-
"hide": true
|
|
115
|
-
},
|
|
135
|
+
"title": "Login",
|
|
116
136
|
"requiresProject": false,
|
|
117
137
|
"isESM": true,
|
|
118
138
|
"relativePath": [
|
|
119
139
|
"lib",
|
|
120
140
|
"commands",
|
|
121
141
|
"hardis",
|
|
122
|
-
"
|
|
123
|
-
"
|
|
142
|
+
"auth",
|
|
143
|
+
"login.js"
|
|
124
144
|
],
|
|
125
145
|
"aliasPermutations": [],
|
|
126
146
|
"permutations": [
|
|
127
|
-
"hardis:
|
|
128
|
-
"
|
|
129
|
-
"
|
|
130
|
-
"hardis:
|
|
131
|
-
"
|
|
132
|
-
"
|
|
147
|
+
"hardis:auth:login",
|
|
148
|
+
"auth:hardis:login",
|
|
149
|
+
"auth:login:hardis",
|
|
150
|
+
"hardis:login:auth",
|
|
151
|
+
"login:hardis:auth",
|
|
152
|
+
"login:auth:hardis"
|
|
133
153
|
]
|
|
134
154
|
},
|
|
135
|
-
"hardis:
|
|
155
|
+
"hardis:cache:clear": {
|
|
136
156
|
"aliases": [],
|
|
137
157
|
"args": {},
|
|
138
|
-
"description": "\n## Command Behavior\n\n**
|
|
158
|
+
"description": "\n## Command Behavior\n\n**Clears the local cache generated by the sfdx-hardis plugin.**\n\nThis command is designed to remove temporary files, stored configurations, and other cached data that sfdx-hardis uses to optimize its operations. Clearing the cache can be beneficial for:\n\n- **Troubleshooting:** Resolving unexpected behavior or inconsistencies.\n- **Disk Space Management:** Freeing up storage on your local machine.\n- **Ensuring Fresh Data:** Guaranteeing that the plugin operates with the most current data and configurations.\n\n## Technical explanations\n\nThe command's technical implementation is straightforward:\n\n- **Direct Function Call:** It directly invokes the `clearCache()` function, which is imported from \buri../../../common/cache/index.js\buri.\n- **Cache Management Logic:** The \buriclearCache()` function encapsulates the logic for identifying and removing the specific files and directories that constitute the sfdx-hardis cache.\n",
|
|
139
159
|
"examples": [
|
|
140
|
-
"$ sf hardis:
|
|
141
|
-
"CI=true CI_COMMIT_REF_NAME=monitoring_myclient sf hardis:auth:login"
|
|
160
|
+
"$ sf hardis:cache:clear"
|
|
142
161
|
],
|
|
143
162
|
"flags": {
|
|
144
163
|
"json": {
|
|
@@ -156,28 +175,6 @@
|
|
|
156
175
|
"multiple": false,
|
|
157
176
|
"type": "option"
|
|
158
177
|
},
|
|
159
|
-
"instanceurl": {
|
|
160
|
-
"char": "r",
|
|
161
|
-
"description": "URL of org instance",
|
|
162
|
-
"name": "instanceurl",
|
|
163
|
-
"hasDynamicHelp": false,
|
|
164
|
-
"multiple": false,
|
|
165
|
-
"type": "option"
|
|
166
|
-
},
|
|
167
|
-
"devhub": {
|
|
168
|
-
"char": "h",
|
|
169
|
-
"description": "Also connect associated DevHub",
|
|
170
|
-
"name": "devhub",
|
|
171
|
-
"allowNo": false,
|
|
172
|
-
"type": "boolean"
|
|
173
|
-
},
|
|
174
|
-
"scratchorg": {
|
|
175
|
-
"char": "s",
|
|
176
|
-
"description": "Scratch org",
|
|
177
|
-
"name": "scratchorg",
|
|
178
|
-
"allowNo": false,
|
|
179
|
-
"type": "boolean"
|
|
180
|
-
},
|
|
181
178
|
"debug": {
|
|
182
179
|
"char": "d",
|
|
183
180
|
"description": "Activate debug mode (more logs)",
|
|
@@ -201,30 +198,33 @@
|
|
|
201
198
|
},
|
|
202
199
|
"hasDynamicHelp": false,
|
|
203
200
|
"hiddenAliases": [],
|
|
204
|
-
"id": "hardis:
|
|
201
|
+
"id": "hardis:cache:clear",
|
|
205
202
|
"pluginAlias": "sfdx-hardis",
|
|
206
203
|
"pluginName": "sfdx-hardis",
|
|
207
204
|
"pluginType": "core",
|
|
208
205
|
"strict": true,
|
|
209
206
|
"enableJsonFlag": true,
|
|
210
|
-
"title": "
|
|
207
|
+
"title": "Clear sfdx-hardis cache",
|
|
208
|
+
"uiConfig": {
|
|
209
|
+
"hide": true
|
|
210
|
+
},
|
|
211
211
|
"requiresProject": false,
|
|
212
212
|
"isESM": true,
|
|
213
213
|
"relativePath": [
|
|
214
214
|
"lib",
|
|
215
215
|
"commands",
|
|
216
216
|
"hardis",
|
|
217
|
-
"
|
|
218
|
-
"
|
|
217
|
+
"cache",
|
|
218
|
+
"clear.js"
|
|
219
219
|
],
|
|
220
220
|
"aliasPermutations": [],
|
|
221
221
|
"permutations": [
|
|
222
|
-
"hardis:
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"hardis:
|
|
226
|
-
"
|
|
227
|
-
"
|
|
222
|
+
"hardis:cache:clear",
|
|
223
|
+
"cache:hardis:clear",
|
|
224
|
+
"cache:clear:hardis",
|
|
225
|
+
"hardis:clear:cache",
|
|
226
|
+
"clear:hardis:cache",
|
|
227
|
+
"clear:cache:hardis"
|
|
228
228
|
]
|
|
229
229
|
},
|
|
230
230
|
"hardis:config:get": {
|
|
@@ -3035,12 +3035,12 @@
|
|
|
3035
3035
|
"lint:project:hardis"
|
|
3036
3036
|
]
|
|
3037
3037
|
},
|
|
3038
|
-
"hardis:
|
|
3038
|
+
"hardis:source:deploy": {
|
|
3039
3039
|
"aliases": [],
|
|
3040
3040
|
"args": {},
|
|
3041
|
-
"description": "
|
|
3041
|
+
"description": "sfdx-hardis wrapper for sfdx force:source:deploy that displays tips to solve deployment errors.\n\nAdditional to the base command wrapper: If using **--checkonly**, add options **--checkcoverage** and **--coverageformatters json-summary** to check that org coverage is > 75% (or value defined in .sfdx-hardis.yml property **apexTestsMinCoverageOrgWide**)\n\n### Deployment results\n\nYou can also have deployment results as pull request comments, on:\n\n- GitHub (see [GitHub Pull Requests comments config](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-github/))\n- Gitlab (see [Gitlab integration configuration](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-gitlab/))\n- Azure DevOps (see [Azure integration configuration](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-setup-integration-azure/))\n\n\n[](https://nicolas.vuillamy.fr/assisted-solving-of-salesforce-deployments-errors-47f3666a9ed0)\n\n### Deployment pre or post commands\n\nYou can define command lines to run before or after a deployment, with parameters:\n\n- **id**: Unique Id for the command\n- **label**: Human readable label for the command\n- **skipIfError**: If defined to \"true\", the post-command won't be run if there is a deployment failure\n- **context**: Defines the context where the command will be run. Can be **all** (default), **check-deployment-only** or **process-deployment-only**\n- **runOnlyOnceByOrg**: If set to true, the command will be run only one time per org. A record of SfdxHardisTrace__c is stored to make that possible (it needs to be existing in target org)\n\nIf the commands are not the same depending on the target org, you can define them into **config/branches/.sfdx-hardis-BRANCHNAME.yml** instead of root **config/.sfdx-hardis.yml**\n\nExample:\n\n```yaml\ncommandsPreDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to the deployment user\n command: sf data update record --sobject User --where \"Username='deploy.github@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n\ncommandsPostDeploy:\n - id: knowledgeUnassign\n label: Remove KnowledgeUser right to the user who has it\n command: sf data update record --sobject User --where \"UserPermissionsKnowledgeUser='true'\" --values \"UserPermissionsKnowledgeUser='false'\" --json\n - id: knowledgeAssign\n label: Assign Knowledge user to desired username\n command: sf data update record --sobject User --where \"Username='admin-yser@myclient.com'\" --values \"UserPermissionsKnowledgeUser='true'\" --json\n - id: someActionToRunJustOneTime\n label: And to run only if deployment is success\n command: sf sfdmu:run ...\n skipIfError: true\n context: process-deployment-only\n runOnlyOnceByOrg: true\n```\n\nNotes:\n\n- You can disable coloring of errors in red by defining env variable SFDX_HARDIS_DEPLOY_ERR_COLORS=false\n\n[See documentation of Salesforce command](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_deploy)\n",
|
|
3042
3042
|
"examples": [
|
|
3043
|
-
"$ sf hardis:
|
|
3043
|
+
"$ sf hardis:source:deploy -x manifest/package.xml --wait 60 --ignorewarnings --testlevel RunLocalTests --postdestructivechanges ./manifest/destructiveChanges.xml --target-org nicolas.vuillamy@cloudity.com.sfdxhardis --checkonly --checkcoverage --verbose --coverageformatters json-summary"
|
|
3044
3044
|
],
|
|
3045
3045
|
"flags": {
|
|
3046
3046
|
"json": {
|
|
@@ -3058,213 +3058,205 @@
|
|
|
3058
3058
|
"multiple": false,
|
|
3059
3059
|
"type": "option"
|
|
3060
3060
|
},
|
|
3061
|
-
"
|
|
3062
|
-
"char": "
|
|
3063
|
-
"description": "
|
|
3064
|
-
"name": "
|
|
3061
|
+
"checkonly": {
|
|
3062
|
+
"char": "c",
|
|
3063
|
+
"description": "checkonly",
|
|
3064
|
+
"name": "checkonly",
|
|
3065
3065
|
"allowNo": false,
|
|
3066
3066
|
"type": "boolean"
|
|
3067
3067
|
},
|
|
3068
|
-
"
|
|
3069
|
-
"description": "
|
|
3070
|
-
"name": "
|
|
3068
|
+
"soapdeploy": {
|
|
3069
|
+
"description": "soapDeploy",
|
|
3070
|
+
"name": "soapdeploy",
|
|
3071
3071
|
"allowNo": false,
|
|
3072
3072
|
"type": "boolean"
|
|
3073
3073
|
},
|
|
3074
|
-
"
|
|
3075
|
-
"char": "
|
|
3076
|
-
"description": "
|
|
3077
|
-
"name": "
|
|
3078
|
-
"
|
|
3079
|
-
"
|
|
3074
|
+
"wait": {
|
|
3075
|
+
"char": "w",
|
|
3076
|
+
"description": "wait",
|
|
3077
|
+
"name": "wait",
|
|
3078
|
+
"default": 60,
|
|
3079
|
+
"hasDynamicHelp": false,
|
|
3080
|
+
"multiple": false,
|
|
3081
|
+
"type": "option"
|
|
3080
3082
|
},
|
|
3081
|
-
"
|
|
3082
|
-
"
|
|
3083
|
-
"
|
|
3083
|
+
"testlevel": {
|
|
3084
|
+
"char": "l",
|
|
3085
|
+
"description": "testlevel",
|
|
3086
|
+
"name": "testlevel",
|
|
3087
|
+
"default": "NoTestRun",
|
|
3084
3088
|
"hasDynamicHelp": false,
|
|
3085
3089
|
"multiple": false,
|
|
3090
|
+
"options": [
|
|
3091
|
+
"NoTestRun",
|
|
3092
|
+
"RunSpecifiedTests",
|
|
3093
|
+
"RunLocalTests",
|
|
3094
|
+
"RunAllTestsInOrg"
|
|
3095
|
+
],
|
|
3086
3096
|
"type": "option"
|
|
3087
3097
|
},
|
|
3088
|
-
"
|
|
3089
|
-
"
|
|
3090
|
-
"
|
|
3098
|
+
"runtests": {
|
|
3099
|
+
"char": "r",
|
|
3100
|
+
"description": "runTests",
|
|
3101
|
+
"name": "runtests",
|
|
3102
|
+
"default": [],
|
|
3103
|
+
"hasDynamicHelp": false,
|
|
3104
|
+
"multiple": true,
|
|
3105
|
+
"type": "option"
|
|
3106
|
+
},
|
|
3107
|
+
"ignoreerrors": {
|
|
3108
|
+
"description": "ignoreErrors",
|
|
3109
|
+
"name": "ignoreerrors",
|
|
3091
3110
|
"allowNo": false,
|
|
3092
3111
|
"type": "boolean"
|
|
3093
3112
|
},
|
|
3094
|
-
"
|
|
3095
|
-
"
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
"char": "v",
|
|
3099
|
-
"deprecateAliases": true,
|
|
3100
|
-
"name": "target-dev-hub",
|
|
3101
|
-
"noCacheDefault": true,
|
|
3102
|
-
"required": true,
|
|
3103
|
-
"summary": "Username or alias of the Dev Hub org. Not required if the `target-dev-hub` configuration variable is already set.",
|
|
3104
|
-
"hasDynamicHelp": true,
|
|
3105
|
-
"multiple": false,
|
|
3106
|
-
"type": "option"
|
|
3107
|
-
}
|
|
3108
|
-
},
|
|
3109
|
-
"hasDynamicHelp": true,
|
|
3110
|
-
"hiddenAliases": [],
|
|
3111
|
-
"id": "hardis:scratch:create",
|
|
3112
|
-
"pluginAlias": "sfdx-hardis",
|
|
3113
|
-
"pluginName": "sfdx-hardis",
|
|
3114
|
-
"pluginType": "core",
|
|
3115
|
-
"strict": true,
|
|
3116
|
-
"enableJsonFlag": true,
|
|
3117
|
-
"title": "Create and initialize scratch org",
|
|
3118
|
-
"requiresProject": true,
|
|
3119
|
-
"requiresSfdxPlugins": [
|
|
3120
|
-
"sfdmu"
|
|
3121
|
-
],
|
|
3122
|
-
"isESM": true,
|
|
3123
|
-
"relativePath": [
|
|
3124
|
-
"lib",
|
|
3125
|
-
"commands",
|
|
3126
|
-
"hardis",
|
|
3127
|
-
"scratch",
|
|
3128
|
-
"create.js"
|
|
3129
|
-
],
|
|
3130
|
-
"aliasPermutations": [],
|
|
3131
|
-
"permutations": [
|
|
3132
|
-
"hardis:scratch:create",
|
|
3133
|
-
"scratch:hardis:create",
|
|
3134
|
-
"scratch:create:hardis",
|
|
3135
|
-
"hardis:create:scratch",
|
|
3136
|
-
"create:hardis:scratch",
|
|
3137
|
-
"create:scratch:hardis"
|
|
3138
|
-
]
|
|
3139
|
-
},
|
|
3140
|
-
"hardis:scratch:delete": {
|
|
3141
|
-
"aliases": [],
|
|
3142
|
-
"args": {},
|
|
3143
|
-
"description": "## Command Behavior\n\n**Provides an assisted menu to delete Salesforce scratch orgs associated with a Dev Hub.**\n\nThis command simplifies the process of cleaning up your Salesforce development environments by allowing you to easily select and delete multiple scratch orgs. This is crucial for managing your scratch org limits and ensuring that you don't accumulate unnecessary or expired orgs.\n\nKey functionalities:\n\n- **Interactive Scratch Org Selection:** Displays a list of all active scratch orgs linked to your Dev Hub, including their usernames, instance URLs, and last used dates.\n- **Multi-Selection:** Allows you to select multiple scratch orgs for deletion.\n- **Confirmation Prompt:** Prompts for confirmation before proceeding with the deletion, ensuring that you don't accidentally delete important orgs.\n- **Dev Hub Integration:** Works with your configured Dev Hub to manage scratch orgs.\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 list` command to retrieve a list of all scratch orgs associated with the current Dev Hub. It then filters this list to show only active orgs.\n- **Interactive Prompts:** Uses the `prompts` library to present a multi-select menu of scratch orgs to the user.\n- **Scratch Org Deletion:** For each selected scratch org, it executes the `sf org delete scratch --no-prompt` command to perform the deletion.\n- **Error Handling:** Includes basic error handling for Salesforce CLI commands.\n- **Data Sorting:** Sorts the list of scratch orgs by username, alias, and instance URL for better readability in the interactive menu.\n</details>\n",
|
|
3144
|
-
"examples": [
|
|
3145
|
-
"$ sf hardis:scratch:delete"
|
|
3146
|
-
],
|
|
3147
|
-
"flags": {
|
|
3148
|
-
"json": {
|
|
3149
|
-
"description": "Format output as json.",
|
|
3150
|
-
"helpGroup": "GLOBAL",
|
|
3151
|
-
"name": "json",
|
|
3113
|
+
"ignorewarnings": {
|
|
3114
|
+
"char": "g",
|
|
3115
|
+
"description": "ignoreWarnings",
|
|
3116
|
+
"name": "ignorewarnings",
|
|
3152
3117
|
"allowNo": false,
|
|
3153
3118
|
"type": "boolean"
|
|
3154
3119
|
},
|
|
3155
|
-
"
|
|
3156
|
-
"
|
|
3157
|
-
"
|
|
3158
|
-
"
|
|
3120
|
+
"validateddeployrequestid": {
|
|
3121
|
+
"char": "q",
|
|
3122
|
+
"description": "validateDeployRequestId",
|
|
3123
|
+
"exclusive": [
|
|
3124
|
+
"manifest",
|
|
3125
|
+
"metadata",
|
|
3126
|
+
"sourcepath",
|
|
3127
|
+
"checkonly",
|
|
3128
|
+
"testlevel",
|
|
3129
|
+
"runtests",
|
|
3130
|
+
"ignoreerrors",
|
|
3131
|
+
"ignorewarnings"
|
|
3132
|
+
],
|
|
3133
|
+
"name": "validateddeployrequestid",
|
|
3159
3134
|
"hasDynamicHelp": false,
|
|
3160
3135
|
"multiple": false,
|
|
3161
3136
|
"type": "option"
|
|
3162
3137
|
},
|
|
3163
|
-
"
|
|
3164
|
-
"
|
|
3165
|
-
"
|
|
3166
|
-
"name": "debug",
|
|
3138
|
+
"verbose": {
|
|
3139
|
+
"description": "verbose",
|
|
3140
|
+
"name": "verbose",
|
|
3167
3141
|
"allowNo": false,
|
|
3168
3142
|
"type": "boolean"
|
|
3169
3143
|
},
|
|
3170
|
-
"
|
|
3171
|
-
"
|
|
3172
|
-
"
|
|
3144
|
+
"metadata": {
|
|
3145
|
+
"char": "m",
|
|
3146
|
+
"description": "metadata",
|
|
3147
|
+
"exclusive": [
|
|
3148
|
+
"manifest",
|
|
3149
|
+
"sourcepath"
|
|
3150
|
+
],
|
|
3151
|
+
"name": "metadata",
|
|
3152
|
+
"hasDynamicHelp": false,
|
|
3153
|
+
"multiple": true,
|
|
3154
|
+
"type": "option"
|
|
3155
|
+
},
|
|
3156
|
+
"sourcepath": {
|
|
3157
|
+
"char": "p",
|
|
3158
|
+
"description": "sourcePath",
|
|
3159
|
+
"exclusive": [
|
|
3160
|
+
"manifest",
|
|
3161
|
+
"metadata"
|
|
3162
|
+
],
|
|
3163
|
+
"name": "sourcepath",
|
|
3164
|
+
"hasDynamicHelp": false,
|
|
3165
|
+
"multiple": true,
|
|
3166
|
+
"type": "option"
|
|
3167
|
+
},
|
|
3168
|
+
"manifest": {
|
|
3169
|
+
"char": "x",
|
|
3170
|
+
"description": "flagsLong.manifest",
|
|
3171
|
+
"exclusive": [
|
|
3172
|
+
"metadata",
|
|
3173
|
+
"sourcepath"
|
|
3174
|
+
],
|
|
3175
|
+
"name": "manifest",
|
|
3173
3176
|
"hasDynamicHelp": false,
|
|
3174
3177
|
"multiple": false,
|
|
3175
3178
|
"type": "option"
|
|
3176
3179
|
},
|
|
3177
|
-
"
|
|
3178
|
-
"
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
"
|
|
3180
|
+
"predestructivechanges": {
|
|
3181
|
+
"dependsOn": [
|
|
3182
|
+
"manifest"
|
|
3183
|
+
],
|
|
3184
|
+
"description": "predestructivechanges",
|
|
3185
|
+
"name": "predestructivechanges",
|
|
3186
|
+
"hasDynamicHelp": false,
|
|
3187
|
+
"multiple": false,
|
|
3188
|
+
"type": "option"
|
|
3182
3189
|
},
|
|
3183
|
-
"
|
|
3184
|
-
"
|
|
3185
|
-
"
|
|
3190
|
+
"postdestructivechanges": {
|
|
3191
|
+
"dependsOn": [
|
|
3192
|
+
"manifest"
|
|
3186
3193
|
],
|
|
3187
|
-
"
|
|
3188
|
-
"
|
|
3189
|
-
"
|
|
3190
|
-
"noCacheDefault": true,
|
|
3191
|
-
"required": true,
|
|
3192
|
-
"summary": "Username or alias of the Dev Hub org. Not required if the `target-dev-hub` configuration variable is already set.",
|
|
3193
|
-
"hasDynamicHelp": true,
|
|
3194
|
+
"description": "postdestructivechanges",
|
|
3195
|
+
"name": "postdestructivechanges",
|
|
3196
|
+
"hasDynamicHelp": false,
|
|
3194
3197
|
"multiple": false,
|
|
3195
3198
|
"type": "option"
|
|
3196
|
-
}
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
"enableJsonFlag": true,
|
|
3206
|
-
"title": "Delete scratch orgs(s)",
|
|
3207
|
-
"isESM": true,
|
|
3208
|
-
"relativePath": [
|
|
3209
|
-
"lib",
|
|
3210
|
-
"commands",
|
|
3211
|
-
"hardis",
|
|
3212
|
-
"scratch",
|
|
3213
|
-
"delete.js"
|
|
3214
|
-
],
|
|
3215
|
-
"aliasPermutations": [],
|
|
3216
|
-
"permutations": [
|
|
3217
|
-
"hardis:scratch:delete",
|
|
3218
|
-
"scratch:hardis:delete",
|
|
3219
|
-
"scratch:delete:hardis",
|
|
3220
|
-
"hardis:delete:scratch",
|
|
3221
|
-
"delete:hardis:scratch",
|
|
3222
|
-
"delete:scratch:hardis"
|
|
3223
|
-
]
|
|
3224
|
-
},
|
|
3225
|
-
"hardis:scratch:pull": {
|
|
3226
|
-
"aliases": [],
|
|
3227
|
-
"args": {},
|
|
3228
|
-
"description": "\n## Command Behavior\n\n**Pulls metadata changes from your scratch org or source-tracked sandbox into your local project files.**\n\nThis command is essential for synchronizing your local development environment with the changes you've made directly in your Salesforce org. After pulling, you can then stage and commit the relevant files to your version control system.\n\nKey features and considerations:\n\n- **Underlying Command:** Internally, this command executes `sf project retrieve start` to fetch the metadata.\n- **Error Handling:** If the pull operation encounters errors, it offers to automatically add the problematic items to your `.forceignore` file and then attempts to pull again, helping you resolve conflicts and ignore unwanted metadata.\n- **Missing Updates:** If you don't see certain updated items in the pull results, you might need to manually retrieve them using the Salesforce Extension's **Org Browser** or the **Salesforce CLI** directly. Refer to the [Retrieve Metadatas documentation](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-publish-task/#retrieve-metadatas) for more details.\n- **Automatic Retrieval:** You can configure the `autoRetrieveWhenPull` property in your `.sfdx-hardis.yml` file to always retrieve specific metadata types (e.g., `CustomApplication`) that might not always be detected as updates by `project:retrieve:start`.\n\nExample `.sfdx-hardis.yml` configuration for `autoRetrieveWhenPull`:\n```yaml\nautoRetrieveWhenPull:\n - CustomApplication:MyCustomApplication\n - CustomApplication:MyOtherCustomApplication\n - CustomApplication:MyThirdCustomApp\n```\n\nFor a visual explanation of the process, watch this video:\n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/Ik6whtflmfY\" 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 focuses on robust metadata synchronization:\n\n- **Salesforce CLI Wrapper:** It acts as a wrapper around the standard Salesforce CLI `sf project retrieve start` command, providing enhanced error handling and configuration options.\n- **Force Source Pull Utility:** The core logic resides in the `forceSourcePull` utility function, which orchestrates the retrieval process, including handling `.forceignore` updates.\n- **Configuration Integration:** It reads the `autoRetrieveWhenPull` setting from the project's `.sfdx-hardis.yml` to determine additional metadata to retrieve automatically.\n- **User Feedback:** Provides clear messages to the user regarding the pull status and guidance for troubleshooting.\n</details>\n",
|
|
3229
|
-
"examples": [
|
|
3230
|
-
"$ sf hardis:scratch:pull"
|
|
3231
|
-
],
|
|
3232
|
-
"flags": {
|
|
3233
|
-
"json": {
|
|
3234
|
-
"description": "Format output as json.",
|
|
3235
|
-
"helpGroup": "GLOBAL",
|
|
3236
|
-
"name": "json",
|
|
3199
|
+
},
|
|
3200
|
+
"tracksource": {
|
|
3201
|
+
"char": "t",
|
|
3202
|
+
"description": "tracksource",
|
|
3203
|
+
"exclusive": [
|
|
3204
|
+
"checkonly",
|
|
3205
|
+
"validateddeployrequestid"
|
|
3206
|
+
],
|
|
3207
|
+
"name": "tracksource",
|
|
3237
3208
|
"allowNo": false,
|
|
3238
3209
|
"type": "boolean"
|
|
3239
3210
|
},
|
|
3240
|
-
"
|
|
3241
|
-
"
|
|
3242
|
-
"
|
|
3243
|
-
|
|
3211
|
+
"forceoverwrite": {
|
|
3212
|
+
"char": "f",
|
|
3213
|
+
"dependsOn": [
|
|
3214
|
+
"tracksource"
|
|
3215
|
+
],
|
|
3216
|
+
"description": "forceoverwrite",
|
|
3217
|
+
"name": "forceoverwrite",
|
|
3218
|
+
"allowNo": false,
|
|
3219
|
+
"type": "boolean"
|
|
3220
|
+
},
|
|
3221
|
+
"resultsdir": {
|
|
3222
|
+
"description": "resultsdir",
|
|
3223
|
+
"name": "resultsdir",
|
|
3244
3224
|
"hasDynamicHelp": false,
|
|
3245
3225
|
"multiple": false,
|
|
3246
3226
|
"type": "option"
|
|
3247
3227
|
},
|
|
3228
|
+
"coverageformatters": {
|
|
3229
|
+
"description": "coverageformatters",
|
|
3230
|
+
"name": "coverageformatters",
|
|
3231
|
+
"hasDynamicHelp": false,
|
|
3232
|
+
"multiple": true,
|
|
3233
|
+
"type": "option"
|
|
3234
|
+
},
|
|
3235
|
+
"junit": {
|
|
3236
|
+
"description": "junit",
|
|
3237
|
+
"name": "junit",
|
|
3238
|
+
"allowNo": false,
|
|
3239
|
+
"type": "boolean"
|
|
3240
|
+
},
|
|
3241
|
+
"checkcoverage": {
|
|
3242
|
+
"description": "Check Apex org coverage",
|
|
3243
|
+
"name": "checkcoverage",
|
|
3244
|
+
"allowNo": false,
|
|
3245
|
+
"type": "boolean"
|
|
3246
|
+
},
|
|
3248
3247
|
"debug": {
|
|
3249
|
-
"
|
|
3250
|
-
"description": "Activate debug mode (more logs)",
|
|
3248
|
+
"description": "debug",
|
|
3251
3249
|
"name": "debug",
|
|
3252
3250
|
"allowNo": false,
|
|
3253
3251
|
"type": "boolean"
|
|
3254
3252
|
},
|
|
3255
3253
|
"websocket": {
|
|
3256
|
-
"description": "
|
|
3254
|
+
"description": "websocket",
|
|
3257
3255
|
"name": "websocket",
|
|
3258
3256
|
"hasDynamicHelp": false,
|
|
3259
3257
|
"multiple": false,
|
|
3260
3258
|
"type": "option"
|
|
3261
3259
|
},
|
|
3262
|
-
"skipauth": {
|
|
3263
|
-
"description": "Skip authentication check when a default username is required",
|
|
3264
|
-
"name": "skipauth",
|
|
3265
|
-
"allowNo": false,
|
|
3266
|
-
"type": "boolean"
|
|
3267
|
-
},
|
|
3268
3260
|
"target-org": {
|
|
3269
3261
|
"aliases": [
|
|
3270
3262
|
"targetusername",
|
|
@@ -3283,39 +3275,35 @@
|
|
|
3283
3275
|
},
|
|
3284
3276
|
"hasDynamicHelp": true,
|
|
3285
3277
|
"hiddenAliases": [],
|
|
3286
|
-
"id": "hardis:
|
|
3278
|
+
"id": "hardis:source:deploy",
|
|
3287
3279
|
"pluginAlias": "sfdx-hardis",
|
|
3288
3280
|
"pluginName": "sfdx-hardis",
|
|
3289
3281
|
"pluginType": "core",
|
|
3290
3282
|
"strict": true,
|
|
3291
3283
|
"enableJsonFlag": true,
|
|
3292
|
-
"title": "Scratch PULL",
|
|
3293
3284
|
"requiresProject": true,
|
|
3294
3285
|
"isESM": true,
|
|
3295
3286
|
"relativePath": [
|
|
3296
3287
|
"lib",
|
|
3297
3288
|
"commands",
|
|
3298
3289
|
"hardis",
|
|
3299
|
-
"
|
|
3300
|
-
"
|
|
3290
|
+
"source",
|
|
3291
|
+
"deploy.js"
|
|
3301
3292
|
],
|
|
3302
3293
|
"aliasPermutations": [],
|
|
3303
3294
|
"permutations": [
|
|
3304
|
-
"hardis:
|
|
3305
|
-
"
|
|
3306
|
-
"
|
|
3307
|
-
"hardis:
|
|
3308
|
-
"
|
|
3309
|
-
"
|
|
3295
|
+
"hardis:source:deploy",
|
|
3296
|
+
"source:hardis:deploy",
|
|
3297
|
+
"source:deploy:hardis",
|
|
3298
|
+
"hardis:deploy:source",
|
|
3299
|
+
"deploy:hardis:source",
|
|
3300
|
+
"deploy:source:hardis"
|
|
3310
3301
|
]
|
|
3311
3302
|
},
|
|
3312
|
-
"hardis:
|
|
3303
|
+
"hardis:source:push": {
|
|
3313
3304
|
"aliases": [],
|
|
3314
3305
|
"args": {},
|
|
3315
|
-
"description": "
|
|
3316
|
-
"examples": [
|
|
3317
|
-
"$ sf hardis:scratch:push"
|
|
3318
|
-
],
|
|
3306
|
+
"description": "sfdx-hardis wrapper for sfdx force:source:push that displays tips to solve deployment errors.\n\n[](https://nicolas.vuillamy.fr/assisted-solving-of-salesforce-deployments-errors-47f3666a9ed0)\n\n[See documentation of Salesforce command](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm#cli_reference_force_source_push)\n",
|
|
3319
3307
|
"flags": {
|
|
3320
3308
|
"json": {
|
|
3321
3309
|
"description": "Format output as json.",
|
|
@@ -3332,26 +3320,48 @@
|
|
|
3332
3320
|
"multiple": false,
|
|
3333
3321
|
"type": "option"
|
|
3334
3322
|
},
|
|
3323
|
+
"forceoverwrite": {
|
|
3324
|
+
"char": "f",
|
|
3325
|
+
"description": "forceoverwrite",
|
|
3326
|
+
"name": "forceoverwrite",
|
|
3327
|
+
"allowNo": false,
|
|
3328
|
+
"type": "boolean"
|
|
3329
|
+
},
|
|
3330
|
+
"wait": {
|
|
3331
|
+
"char": "w",
|
|
3332
|
+
"description": "wait",
|
|
3333
|
+
"name": "wait",
|
|
3334
|
+
"default": 60,
|
|
3335
|
+
"hasDynamicHelp": false,
|
|
3336
|
+
"multiple": false,
|
|
3337
|
+
"type": "option"
|
|
3338
|
+
},
|
|
3339
|
+
"ignorewarnings": {
|
|
3340
|
+
"char": "g",
|
|
3341
|
+
"description": "ignorewarnings",
|
|
3342
|
+
"name": "ignorewarnings",
|
|
3343
|
+
"allowNo": false,
|
|
3344
|
+
"type": "boolean"
|
|
3345
|
+
},
|
|
3346
|
+
"quiet": {
|
|
3347
|
+
"description": "quiet",
|
|
3348
|
+
"name": "quiet",
|
|
3349
|
+
"allowNo": false,
|
|
3350
|
+
"type": "boolean"
|
|
3351
|
+
},
|
|
3335
3352
|
"debug": {
|
|
3336
|
-
"
|
|
3337
|
-
"description": "Activate debug mode (more logs)",
|
|
3353
|
+
"description": "debug",
|
|
3338
3354
|
"name": "debug",
|
|
3339
3355
|
"allowNo": false,
|
|
3340
3356
|
"type": "boolean"
|
|
3341
3357
|
},
|
|
3342
3358
|
"websocket": {
|
|
3343
|
-
"description": "
|
|
3359
|
+
"description": "websocket",
|
|
3344
3360
|
"name": "websocket",
|
|
3345
3361
|
"hasDynamicHelp": false,
|
|
3346
3362
|
"multiple": false,
|
|
3347
3363
|
"type": "option"
|
|
3348
3364
|
},
|
|
3349
|
-
"skipauth": {
|
|
3350
|
-
"description": "Skip authentication check when a default username is required",
|
|
3351
|
-
"name": "skipauth",
|
|
3352
|
-
"allowNo": false,
|
|
3353
|
-
"type": "boolean"
|
|
3354
|
-
},
|
|
3355
3365
|
"target-org": {
|
|
3356
3366
|
"aliases": [
|
|
3357
3367
|
"targetusername",
|
|
@@ -3370,39 +3380,36 @@
|
|
|
3370
3380
|
},
|
|
3371
3381
|
"hasDynamicHelp": true,
|
|
3372
3382
|
"hiddenAliases": [],
|
|
3373
|
-
"id": "hardis:
|
|
3383
|
+
"id": "hardis:source:push",
|
|
3374
3384
|
"pluginAlias": "sfdx-hardis",
|
|
3375
3385
|
"pluginName": "sfdx-hardis",
|
|
3376
3386
|
"pluginType": "core",
|
|
3377
3387
|
"strict": true,
|
|
3378
3388
|
"enableJsonFlag": true,
|
|
3379
|
-
"title": "Scratch PUSH",
|
|
3380
3389
|
"requiresProject": true,
|
|
3381
3390
|
"isESM": true,
|
|
3382
3391
|
"relativePath": [
|
|
3383
3392
|
"lib",
|
|
3384
3393
|
"commands",
|
|
3385
3394
|
"hardis",
|
|
3386
|
-
"
|
|
3395
|
+
"source",
|
|
3387
3396
|
"push.js"
|
|
3388
3397
|
],
|
|
3389
3398
|
"aliasPermutations": [],
|
|
3390
3399
|
"permutations": [
|
|
3391
|
-
"hardis:
|
|
3392
|
-
"
|
|
3393
|
-
"
|
|
3394
|
-
"hardis:push:
|
|
3395
|
-
"push:hardis:
|
|
3396
|
-
"push:
|
|
3400
|
+
"hardis:source:push",
|
|
3401
|
+
"source:hardis:push",
|
|
3402
|
+
"source:push:hardis",
|
|
3403
|
+
"hardis:push:source",
|
|
3404
|
+
"push:hardis:source",
|
|
3405
|
+
"push:source:hardis"
|
|
3397
3406
|
]
|
|
3398
3407
|
},
|
|
3399
|
-
"hardis:source:
|
|
3408
|
+
"hardis:source:retrieve": {
|
|
3400
3409
|
"aliases": [],
|
|
3401
3410
|
"args": {},
|
|
3402
|
-
"description": "
|
|
3403
|
-
"examples": [
|
|
3404
|
-
"$ sf hardis:source:deploy -x manifest/package.xml --wait 60 --ignorewarnings --testlevel RunLocalTests --postdestructivechanges ./manifest/destructiveChanges.xml --target-org nicolas.vuillamy@cloudity.com.sfdxhardis --checkonly --checkcoverage --verbose --coverageformatters json-summary"
|
|
3405
|
-
],
|
|
3411
|
+
"description": "\n## Command Behavior\n\n**A wrapper command for Salesforce CLI's `sf project retrieve start` (formerly `sfdx force:source:retrieve`), with enhanced interactive features.**\n\nThis command facilitates the retrieval of metadata from a Salesforce org into your local project. It provides an assisted experience, especially when no specific retrieval constraints are provided.\n\nKey features:\n\n- **Assisted Metadata Selection:** If no `sourcepath`, `manifest`, `metadata`, or `packagenames` flags are specified, an interactive menu will prompt you to select the metadata types you wish to retrieve.\n- **Assisted Org Selection:** If no target org is specified, an interactive menu will guide you to choose an org for the retrieval operation.\n- **Backward Compatibility:** While this command wraps the newer `sf project retrieve start`, it maintains compatibility with the older `sfdx force:source:retrieve` flags.\n\n**Important Note:** The underlying Salesforce CLI command `sfdx force:source:retrieve` is being deprecated by Salesforce in November 2024. It is recommended to migrate to `sf project retrieve start` for future compatibility. See [Salesforce CLI Migration Guide](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_mig_deploy_retrieve.htm) for more information.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThis command acts as an intelligent wrapper around the Salesforce CLI's source retrieval functionality:\n\n- **Command Wrapping:** It uses the `wrapSfdxCoreCommand` utility to execute the `sfdx force:source:retrieve` (or its equivalent `sf project retrieve start`) command, passing through all relevant flags and arguments.\n- **Interactive Prompts:** It leverages `MetadataUtils.promptMetadataTypes()` and `promptOrgUsernameDefault()` to provide interactive menus for metadata and org selection when the user does not provide them as flags.\n- **Argument Transformation:** It dynamically constructs the command-line arguments for the underlying Salesforce CLI command based on user selections and provided flags.\n- **Error Handling:** It includes basic error handling, such as prompting the user to re-select an org if an issue occurs during org selection.\n- **Deprecation Warning:** It explicitly logs warnings about the deprecation of `sfdx force:source:retrieve` to inform users about upcoming changes.\n</details>\n",
|
|
3412
|
+
"examples": [],
|
|
3406
3413
|
"flags": {
|
|
3407
3414
|
"json": {
|
|
3408
3415
|
"description": "Format output as json.",
|
|
@@ -3419,89 +3426,46 @@
|
|
|
3419
3426
|
"multiple": false,
|
|
3420
3427
|
"type": "option"
|
|
3421
3428
|
},
|
|
3422
|
-
"
|
|
3423
|
-
"char": "
|
|
3424
|
-
"description": "
|
|
3425
|
-
"name": "
|
|
3426
|
-
"allowNo": false,
|
|
3427
|
-
"type": "boolean"
|
|
3428
|
-
},
|
|
3429
|
-
"soapdeploy": {
|
|
3430
|
-
"description": "soapDeploy",
|
|
3431
|
-
"name": "soapdeploy",
|
|
3432
|
-
"allowNo": false,
|
|
3433
|
-
"type": "boolean"
|
|
3434
|
-
},
|
|
3435
|
-
"wait": {
|
|
3436
|
-
"char": "w",
|
|
3437
|
-
"description": "wait",
|
|
3438
|
-
"name": "wait",
|
|
3439
|
-
"default": 60,
|
|
3429
|
+
"apiversion": {
|
|
3430
|
+
"char": "a",
|
|
3431
|
+
"description": "Override the api version used for api requests made by this command",
|
|
3432
|
+
"name": "apiversion",
|
|
3440
3433
|
"hasDynamicHelp": false,
|
|
3441
3434
|
"multiple": false,
|
|
3442
3435
|
"type": "option"
|
|
3443
3436
|
},
|
|
3444
|
-
"
|
|
3445
|
-
"char": "
|
|
3446
|
-
"description": "
|
|
3447
|
-
"
|
|
3448
|
-
|
|
3449
|
-
|
|
3450
|
-
"multiple": false,
|
|
3451
|
-
"options": [
|
|
3452
|
-
"NoTestRun",
|
|
3453
|
-
"RunSpecifiedTests",
|
|
3454
|
-
"RunLocalTests",
|
|
3455
|
-
"RunAllTestsInOrg"
|
|
3437
|
+
"sourcepath": {
|
|
3438
|
+
"char": "p",
|
|
3439
|
+
"description": "sourcePath",
|
|
3440
|
+
"exclusive": [
|
|
3441
|
+
"manifest",
|
|
3442
|
+
"metadata"
|
|
3456
3443
|
],
|
|
3457
|
-
"
|
|
3458
|
-
},
|
|
3459
|
-
"runtests": {
|
|
3460
|
-
"char": "r",
|
|
3461
|
-
"description": "runTests",
|
|
3462
|
-
"name": "runtests",
|
|
3463
|
-
"default": [],
|
|
3444
|
+
"name": "sourcepath",
|
|
3464
3445
|
"hasDynamicHelp": false,
|
|
3465
3446
|
"multiple": true,
|
|
3466
3447
|
"type": "option"
|
|
3467
3448
|
},
|
|
3468
|
-
"
|
|
3469
|
-
"
|
|
3470
|
-
"
|
|
3471
|
-
"
|
|
3472
|
-
"
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
"char": "g",
|
|
3476
|
-
"description": "ignoreWarnings",
|
|
3477
|
-
"name": "ignorewarnings",
|
|
3478
|
-
"allowNo": false,
|
|
3479
|
-
"type": "boolean"
|
|
3449
|
+
"wait": {
|
|
3450
|
+
"char": "w",
|
|
3451
|
+
"description": "wait",
|
|
3452
|
+
"name": "wait",
|
|
3453
|
+
"hasDynamicHelp": false,
|
|
3454
|
+
"multiple": false,
|
|
3455
|
+
"type": "option"
|
|
3480
3456
|
},
|
|
3481
|
-
"
|
|
3482
|
-
"char": "
|
|
3483
|
-
"description": "
|
|
3457
|
+
"manifest": {
|
|
3458
|
+
"char": "x",
|
|
3459
|
+
"description": "manifest",
|
|
3484
3460
|
"exclusive": [
|
|
3485
|
-
"manifest",
|
|
3486
3461
|
"metadata",
|
|
3487
|
-
"sourcepath"
|
|
3488
|
-
"checkonly",
|
|
3489
|
-
"testlevel",
|
|
3490
|
-
"runtests",
|
|
3491
|
-
"ignoreerrors",
|
|
3492
|
-
"ignorewarnings"
|
|
3462
|
+
"sourcepath"
|
|
3493
3463
|
],
|
|
3494
|
-
"name": "
|
|
3464
|
+
"name": "manifest",
|
|
3495
3465
|
"hasDynamicHelp": false,
|
|
3496
3466
|
"multiple": false,
|
|
3497
3467
|
"type": "option"
|
|
3498
3468
|
},
|
|
3499
|
-
"verbose": {
|
|
3500
|
-
"description": "verbose",
|
|
3501
|
-
"name": "verbose",
|
|
3502
|
-
"allowNo": false,
|
|
3503
|
-
"type": "boolean"
|
|
3504
|
-
},
|
|
3505
3469
|
"metadata": {
|
|
3506
3470
|
"char": "m",
|
|
3507
3471
|
"description": "metadata",
|
|
@@ -3514,121 +3478,255 @@
|
|
|
3514
3478
|
"multiple": true,
|
|
3515
3479
|
"type": "option"
|
|
3516
3480
|
},
|
|
3517
|
-
"
|
|
3518
|
-
"char": "
|
|
3519
|
-
"description": "
|
|
3520
|
-
"
|
|
3521
|
-
"manifest",
|
|
3522
|
-
"metadata"
|
|
3523
|
-
],
|
|
3524
|
-
"name": "sourcepath",
|
|
3481
|
+
"packagenames": {
|
|
3482
|
+
"char": "n",
|
|
3483
|
+
"description": "packagenames",
|
|
3484
|
+
"name": "packagenames",
|
|
3525
3485
|
"hasDynamicHelp": false,
|
|
3526
3486
|
"multiple": true,
|
|
3527
3487
|
"type": "option"
|
|
3528
3488
|
},
|
|
3529
|
-
"
|
|
3530
|
-
"char": "
|
|
3531
|
-
"description": "
|
|
3532
|
-
"
|
|
3533
|
-
|
|
3534
|
-
|
|
3489
|
+
"tracksource": {
|
|
3490
|
+
"char": "t",
|
|
3491
|
+
"description": "tracksource",
|
|
3492
|
+
"name": "tracksource",
|
|
3493
|
+
"allowNo": false,
|
|
3494
|
+
"type": "boolean"
|
|
3495
|
+
},
|
|
3496
|
+
"forceoverwrite": {
|
|
3497
|
+
"char": "f",
|
|
3498
|
+
"dependsOn": [
|
|
3499
|
+
"tracksource"
|
|
3535
3500
|
],
|
|
3536
|
-
"
|
|
3501
|
+
"description": "forceoverwrite",
|
|
3502
|
+
"name": "forceoverwrite",
|
|
3503
|
+
"allowNo": false,
|
|
3504
|
+
"type": "boolean"
|
|
3505
|
+
},
|
|
3506
|
+
"verbose": {
|
|
3507
|
+
"description": "verbose",
|
|
3508
|
+
"name": "verbose",
|
|
3509
|
+
"allowNo": false,
|
|
3510
|
+
"type": "boolean"
|
|
3511
|
+
},
|
|
3512
|
+
"debug": {
|
|
3513
|
+
"char": "d",
|
|
3514
|
+
"description": "debugMode",
|
|
3515
|
+
"name": "debug",
|
|
3516
|
+
"allowNo": false,
|
|
3517
|
+
"type": "boolean"
|
|
3518
|
+
},
|
|
3519
|
+
"websocket": {
|
|
3520
|
+
"description": "websocket",
|
|
3521
|
+
"name": "websocket",
|
|
3537
3522
|
"hasDynamicHelp": false,
|
|
3538
3523
|
"multiple": false,
|
|
3539
3524
|
"type": "option"
|
|
3540
3525
|
},
|
|
3541
|
-
"
|
|
3542
|
-
"
|
|
3543
|
-
|
|
3526
|
+
"skipauth": {
|
|
3527
|
+
"description": "Skip authentication check when a default username is required",
|
|
3528
|
+
"name": "skipauth",
|
|
3529
|
+
"allowNo": false,
|
|
3530
|
+
"type": "boolean"
|
|
3531
|
+
},
|
|
3532
|
+
"target-org": {
|
|
3533
|
+
"aliases": [
|
|
3534
|
+
"targetusername",
|
|
3535
|
+
"u"
|
|
3544
3536
|
],
|
|
3545
|
-
"
|
|
3546
|
-
"
|
|
3537
|
+
"char": "o",
|
|
3538
|
+
"deprecateAliases": true,
|
|
3539
|
+
"name": "target-org",
|
|
3540
|
+
"noCacheDefault": true,
|
|
3541
|
+
"required": true,
|
|
3542
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
3543
|
+
"hasDynamicHelp": true,
|
|
3544
|
+
"multiple": false,
|
|
3545
|
+
"type": "option"
|
|
3546
|
+
}
|
|
3547
|
+
},
|
|
3548
|
+
"hasDynamicHelp": true,
|
|
3549
|
+
"hiddenAliases": [],
|
|
3550
|
+
"id": "hardis:source:retrieve",
|
|
3551
|
+
"pluginAlias": "sfdx-hardis",
|
|
3552
|
+
"pluginName": "sfdx-hardis",
|
|
3553
|
+
"pluginType": "core",
|
|
3554
|
+
"strict": true,
|
|
3555
|
+
"enableJsonFlag": true,
|
|
3556
|
+
"requiresProject": true,
|
|
3557
|
+
"isESM": true,
|
|
3558
|
+
"relativePath": [
|
|
3559
|
+
"lib",
|
|
3560
|
+
"commands",
|
|
3561
|
+
"hardis",
|
|
3562
|
+
"source",
|
|
3563
|
+
"retrieve.js"
|
|
3564
|
+
],
|
|
3565
|
+
"aliasPermutations": [],
|
|
3566
|
+
"permutations": [
|
|
3567
|
+
"hardis:source:retrieve",
|
|
3568
|
+
"source:hardis:retrieve",
|
|
3569
|
+
"source:retrieve:hardis",
|
|
3570
|
+
"hardis:retrieve:source",
|
|
3571
|
+
"retrieve:hardis:source",
|
|
3572
|
+
"retrieve:source:hardis"
|
|
3573
|
+
]
|
|
3574
|
+
},
|
|
3575
|
+
"hardis:scratch:create": {
|
|
3576
|
+
"aliases": [],
|
|
3577
|
+
"args": {},
|
|
3578
|
+
"description": "\n## Command Behavior\n\n**Creates and fully initializes a Salesforce scratch org with complete development environment setup.**\n\nThis command is a comprehensive scratch org provisioning tool that automates the entire process of creating, configuring, and initializing a Salesforce scratch org for development work. It handles everything from basic org creation to advanced configuration including package installation, metadata deployment, and data initialization.\n\nKey functionalities:\n\n- **Intelligent Org Management:** Automatically generates unique scratch org aliases based on username, git branch, and timestamp, with options to reuse existing orgs or force creation of new ones.\n- **Scratch Org Pool Integration:** Supports fetching pre-configured scratch orgs from pools for faster development cycles and CI/CD optimization.\n- **Custom Scratch Definition:** Dynamically builds project-scratch-def.json files with user-specific configurations including email, username patterns, and org shape settings (set variable **SCRATCH_ORG_SHAPE** to use org shapes).\n- **Package Installation:** Automatically installs all configured packages defined in `installedPackages` configuration property.\n- **Metadata Deployment:** Pushes source code and deploys metadata using optimized deployment strategies for scratch org environments.\n- **Permission Set Assignment:** Assigns specified permission sets defined in `initPermissionSets` configuration to the scratch org user.\n- **Apex Script Execution:** Runs custom Apex initialization scripts defined in `scratchOrgInitApexScripts` for org-specific setup.\n- **Data Loading:** Loads initial data using SFDMU data packages from `dataPackages` configuration for realistic development environments.\n- **User Configuration:** Automatically configures the scratch org admin user with proper names, email, country settings, and marketing user permissions.\n- **Password Generation:** Creates and stores secure passwords for easy scratch org access during development.\n- **CI/CD Integration:** Provides specialized handling for continuous integration environments including automated cleanup and pool management.\n- **Error Handling:** Comprehensive error recovery including scratch org cleanup on failure and detailed troubleshooting messages.\n\nThe command configuration can be customized using:\n\n- `config/.sfdx-hardis.yml` file with properties like `installedPackages`, `initPermissionSets`, `scratchOrgInitApexScripts`, and `dataPackages`.\n- Environment variable **SCRATCH_ORG_SHAPE** with shape org id, if you want to use org shapes\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Configuration Management:** Loads hierarchical configuration from `.sfdx-hardis.yml`, branch-specific, and user-specific configuration files using `getConfig('user')`.\n- **Alias Generation Logic:** Creates intelligent scratch org aliases using username, git branch, timestamp patterns with CI and pool prefixes for different environments.\n- **Scratch Org Definition Building:** Dynamically constructs `project-scratch-def.json` with user email, custom usernames, org shapes, and feature flags like StateAndCountryPicklist and MarketingUser.\n- **Pool Integration:** Implements scratch org pool fetching using `fetchScratchOrg` for rapid org provisioning in development and CI environments.\n- **Salesforce CLI Integration:** Executes `sf org create scratch` commands with proper parameter handling including wait times, duration, and dev hub targeting.\n- **Package Installation Pipeline:** Uses `installPackages` utility to install managed and unmanaged packages with dependency resolution and error handling.\n- **Metadata Deployment:** Leverages `initOrgMetadatas` for optimized source pushing and metadata deployment specific to scratch org environments.\n- **Permission Set Assignment:** Implements `initPermissionSetAssignments` for automated permission set assignment to scratch org users.\n- **Apex Script Execution:** Runs custom Apex initialization scripts using `initApexScripts` for org-specific configuration and setup.\n- **Data Loading Integration:** Uses SFDMU integration through `initOrgData` for comprehensive data loading from configured data packages.\n- **User Management:** Performs SOQL queries and DML operations to configure scratch org users with proper names, emails, country codes, and permission flags.\n- **Authentication Management:** Handles SFDX auth URL generation and storage for CI/CD environments and scratch org pool management.\n- **Error Recovery:** Implements comprehensive error handling with scratch org cleanup, pool management, and detailed error messaging for troubleshooting.\n- **WebSocket Integration:** Provides real-time status updates and file reporting through WebSocket connections for VS Code extension integration.\n</details>\n",
|
|
3579
|
+
"examples": [
|
|
3580
|
+
"$ sf hardis:scratch:create"
|
|
3581
|
+
],
|
|
3582
|
+
"flags": {
|
|
3583
|
+
"json": {
|
|
3584
|
+
"description": "Format output as json.",
|
|
3585
|
+
"helpGroup": "GLOBAL",
|
|
3586
|
+
"name": "json",
|
|
3587
|
+
"allowNo": false,
|
|
3588
|
+
"type": "boolean"
|
|
3589
|
+
},
|
|
3590
|
+
"flags-dir": {
|
|
3591
|
+
"helpGroup": "GLOBAL",
|
|
3592
|
+
"name": "flags-dir",
|
|
3593
|
+
"summary": "Import flag values from a directory.",
|
|
3547
3594
|
"hasDynamicHelp": false,
|
|
3548
3595
|
"multiple": false,
|
|
3549
3596
|
"type": "option"
|
|
3550
3597
|
},
|
|
3551
|
-
"
|
|
3552
|
-
"
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
"
|
|
3556
|
-
"
|
|
3598
|
+
"forcenew": {
|
|
3599
|
+
"char": "n",
|
|
3600
|
+
"description": "If an existing scratch org exists, do not reuse it but create a new one",
|
|
3601
|
+
"name": "forcenew",
|
|
3602
|
+
"allowNo": false,
|
|
3603
|
+
"type": "boolean"
|
|
3604
|
+
},
|
|
3605
|
+
"pool": {
|
|
3606
|
+
"description": "Creates the scratch org for a scratch org pool",
|
|
3607
|
+
"name": "pool",
|
|
3608
|
+
"allowNo": false,
|
|
3609
|
+
"type": "boolean"
|
|
3610
|
+
},
|
|
3611
|
+
"debug": {
|
|
3612
|
+
"char": "d",
|
|
3613
|
+
"description": "Activate debug mode (more logs)",
|
|
3614
|
+
"name": "debug",
|
|
3615
|
+
"allowNo": false,
|
|
3616
|
+
"type": "boolean"
|
|
3617
|
+
},
|
|
3618
|
+
"websocket": {
|
|
3619
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
3620
|
+
"name": "websocket",
|
|
3557
3621
|
"hasDynamicHelp": false,
|
|
3558
3622
|
"multiple": false,
|
|
3559
3623
|
"type": "option"
|
|
3560
3624
|
},
|
|
3561
|
-
"
|
|
3562
|
-
"
|
|
3563
|
-
"
|
|
3564
|
-
"exclusive": [
|
|
3565
|
-
"checkonly",
|
|
3566
|
-
"validateddeployrequestid"
|
|
3567
|
-
],
|
|
3568
|
-
"name": "tracksource",
|
|
3625
|
+
"skipauth": {
|
|
3626
|
+
"description": "Skip authentication check when a default username is required",
|
|
3627
|
+
"name": "skipauth",
|
|
3569
3628
|
"allowNo": false,
|
|
3570
3629
|
"type": "boolean"
|
|
3571
3630
|
},
|
|
3572
|
-
"
|
|
3573
|
-
"
|
|
3574
|
-
|
|
3575
|
-
"tracksource"
|
|
3631
|
+
"target-dev-hub": {
|
|
3632
|
+
"aliases": [
|
|
3633
|
+
"targetdevhubusername"
|
|
3576
3634
|
],
|
|
3577
|
-
"
|
|
3578
|
-
"
|
|
3635
|
+
"char": "v",
|
|
3636
|
+
"deprecateAliases": true,
|
|
3637
|
+
"name": "target-dev-hub",
|
|
3638
|
+
"noCacheDefault": true,
|
|
3639
|
+
"required": true,
|
|
3640
|
+
"summary": "Username or alias of the Dev Hub org. Not required if the `target-dev-hub` configuration variable is already set.",
|
|
3641
|
+
"hasDynamicHelp": true,
|
|
3642
|
+
"multiple": false,
|
|
3643
|
+
"type": "option"
|
|
3644
|
+
}
|
|
3645
|
+
},
|
|
3646
|
+
"hasDynamicHelp": true,
|
|
3647
|
+
"hiddenAliases": [],
|
|
3648
|
+
"id": "hardis:scratch:create",
|
|
3649
|
+
"pluginAlias": "sfdx-hardis",
|
|
3650
|
+
"pluginName": "sfdx-hardis",
|
|
3651
|
+
"pluginType": "core",
|
|
3652
|
+
"strict": true,
|
|
3653
|
+
"enableJsonFlag": true,
|
|
3654
|
+
"title": "Create and initialize scratch org",
|
|
3655
|
+
"requiresProject": true,
|
|
3656
|
+
"requiresSfdxPlugins": [
|
|
3657
|
+
"sfdmu"
|
|
3658
|
+
],
|
|
3659
|
+
"isESM": true,
|
|
3660
|
+
"relativePath": [
|
|
3661
|
+
"lib",
|
|
3662
|
+
"commands",
|
|
3663
|
+
"hardis",
|
|
3664
|
+
"scratch",
|
|
3665
|
+
"create.js"
|
|
3666
|
+
],
|
|
3667
|
+
"aliasPermutations": [],
|
|
3668
|
+
"permutations": [
|
|
3669
|
+
"hardis:scratch:create",
|
|
3670
|
+
"scratch:hardis:create",
|
|
3671
|
+
"scratch:create:hardis",
|
|
3672
|
+
"hardis:create:scratch",
|
|
3673
|
+
"create:hardis:scratch",
|
|
3674
|
+
"create:scratch:hardis"
|
|
3675
|
+
]
|
|
3676
|
+
},
|
|
3677
|
+
"hardis:scratch:delete": {
|
|
3678
|
+
"aliases": [],
|
|
3679
|
+
"args": {},
|
|
3680
|
+
"description": "## Command Behavior\n\n**Provides an assisted menu to delete Salesforce scratch orgs associated with a Dev Hub.**\n\nThis command simplifies the process of cleaning up your Salesforce development environments by allowing you to easily select and delete multiple scratch orgs. This is crucial for managing your scratch org limits and ensuring that you don't accumulate unnecessary or expired orgs.\n\nKey functionalities:\n\n- **Interactive Scratch Org Selection:** Displays a list of all active scratch orgs linked to your Dev Hub, including their usernames, instance URLs, and last used dates.\n- **Multi-Selection:** Allows you to select multiple scratch orgs for deletion.\n- **Confirmation Prompt:** Prompts for confirmation before proceeding with the deletion, ensuring that you don't accidentally delete important orgs.\n- **Dev Hub Integration:** Works with your configured Dev Hub to manage scratch orgs.\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 list` command to retrieve a list of all scratch orgs associated with the current Dev Hub. It then filters this list to show only active orgs.\n- **Interactive Prompts:** Uses the `prompts` library to present a multi-select menu of scratch orgs to the user.\n- **Scratch Org Deletion:** For each selected scratch org, it executes the `sf org delete scratch --no-prompt` command to perform the deletion.\n- **Error Handling:** Includes basic error handling for Salesforce CLI commands.\n- **Data Sorting:** Sorts the list of scratch orgs by username, alias, and instance URL for better readability in the interactive menu.\n</details>\n",
|
|
3681
|
+
"examples": [
|
|
3682
|
+
"$ sf hardis:scratch:delete"
|
|
3683
|
+
],
|
|
3684
|
+
"flags": {
|
|
3685
|
+
"json": {
|
|
3686
|
+
"description": "Format output as json.",
|
|
3687
|
+
"helpGroup": "GLOBAL",
|
|
3688
|
+
"name": "json",
|
|
3579
3689
|
"allowNo": false,
|
|
3580
3690
|
"type": "boolean"
|
|
3581
3691
|
},
|
|
3582
|
-
"
|
|
3583
|
-
"
|
|
3584
|
-
"name": "
|
|
3692
|
+
"flags-dir": {
|
|
3693
|
+
"helpGroup": "GLOBAL",
|
|
3694
|
+
"name": "flags-dir",
|
|
3695
|
+
"summary": "Import flag values from a directory.",
|
|
3585
3696
|
"hasDynamicHelp": false,
|
|
3586
3697
|
"multiple": false,
|
|
3587
3698
|
"type": "option"
|
|
3588
3699
|
},
|
|
3589
|
-
"coverageformatters": {
|
|
3590
|
-
"description": "coverageformatters",
|
|
3591
|
-
"name": "coverageformatters",
|
|
3592
|
-
"hasDynamicHelp": false,
|
|
3593
|
-
"multiple": true,
|
|
3594
|
-
"type": "option"
|
|
3595
|
-
},
|
|
3596
|
-
"junit": {
|
|
3597
|
-
"description": "junit",
|
|
3598
|
-
"name": "junit",
|
|
3599
|
-
"allowNo": false,
|
|
3600
|
-
"type": "boolean"
|
|
3601
|
-
},
|
|
3602
|
-
"checkcoverage": {
|
|
3603
|
-
"description": "Check Apex org coverage",
|
|
3604
|
-
"name": "checkcoverage",
|
|
3605
|
-
"allowNo": false,
|
|
3606
|
-
"type": "boolean"
|
|
3607
|
-
},
|
|
3608
3700
|
"debug": {
|
|
3609
|
-
"
|
|
3701
|
+
"char": "d",
|
|
3702
|
+
"description": "Activate debug mode (more logs)",
|
|
3610
3703
|
"name": "debug",
|
|
3611
3704
|
"allowNo": false,
|
|
3612
3705
|
"type": "boolean"
|
|
3613
3706
|
},
|
|
3614
3707
|
"websocket": {
|
|
3615
|
-
"description": "
|
|
3708
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
3616
3709
|
"name": "websocket",
|
|
3617
3710
|
"hasDynamicHelp": false,
|
|
3618
3711
|
"multiple": false,
|
|
3619
3712
|
"type": "option"
|
|
3620
3713
|
},
|
|
3621
|
-
"
|
|
3714
|
+
"skipauth": {
|
|
3715
|
+
"description": "Skip authentication check when a default username is required",
|
|
3716
|
+
"name": "skipauth",
|
|
3717
|
+
"allowNo": false,
|
|
3718
|
+
"type": "boolean"
|
|
3719
|
+
},
|
|
3720
|
+
"target-dev-hub": {
|
|
3622
3721
|
"aliases": [
|
|
3623
|
-
"
|
|
3624
|
-
"u"
|
|
3722
|
+
"targetdevhubusername"
|
|
3625
3723
|
],
|
|
3626
|
-
"char": "
|
|
3724
|
+
"char": "v",
|
|
3627
3725
|
"deprecateAliases": true,
|
|
3628
|
-
"name": "target-
|
|
3726
|
+
"name": "target-dev-hub",
|
|
3629
3727
|
"noCacheDefault": true,
|
|
3630
3728
|
"required": true,
|
|
3631
|
-
"summary": "Username or alias of the
|
|
3729
|
+
"summary": "Username or alias of the Dev Hub org. Not required if the `target-dev-hub` configuration variable is already set.",
|
|
3632
3730
|
"hasDynamicHelp": true,
|
|
3633
3731
|
"multiple": false,
|
|
3634
3732
|
"type": "option"
|
|
@@ -3636,35 +3734,38 @@
|
|
|
3636
3734
|
},
|
|
3637
3735
|
"hasDynamicHelp": true,
|
|
3638
3736
|
"hiddenAliases": [],
|
|
3639
|
-
"id": "hardis:
|
|
3737
|
+
"id": "hardis:scratch:delete",
|
|
3640
3738
|
"pluginAlias": "sfdx-hardis",
|
|
3641
3739
|
"pluginName": "sfdx-hardis",
|
|
3642
3740
|
"pluginType": "core",
|
|
3643
3741
|
"strict": true,
|
|
3644
3742
|
"enableJsonFlag": true,
|
|
3645
|
-
"
|
|
3743
|
+
"title": "Delete scratch orgs(s)",
|
|
3646
3744
|
"isESM": true,
|
|
3647
3745
|
"relativePath": [
|
|
3648
3746
|
"lib",
|
|
3649
3747
|
"commands",
|
|
3650
3748
|
"hardis",
|
|
3651
|
-
"
|
|
3652
|
-
"
|
|
3749
|
+
"scratch",
|
|
3750
|
+
"delete.js"
|
|
3653
3751
|
],
|
|
3654
3752
|
"aliasPermutations": [],
|
|
3655
3753
|
"permutations": [
|
|
3656
|
-
"hardis:
|
|
3657
|
-
"
|
|
3658
|
-
"
|
|
3659
|
-
"hardis:
|
|
3660
|
-
"
|
|
3661
|
-
"
|
|
3754
|
+
"hardis:scratch:delete",
|
|
3755
|
+
"scratch:hardis:delete",
|
|
3756
|
+
"scratch:delete:hardis",
|
|
3757
|
+
"hardis:delete:scratch",
|
|
3758
|
+
"delete:hardis:scratch",
|
|
3759
|
+
"delete:scratch:hardis"
|
|
3662
3760
|
]
|
|
3663
3761
|
},
|
|
3664
|
-
"hardis:
|
|
3762
|
+
"hardis:scratch:pull": {
|
|
3665
3763
|
"aliases": [],
|
|
3666
3764
|
"args": {},
|
|
3667
|
-
"description": "
|
|
3765
|
+
"description": "\n## Command Behavior\n\n**Pulls metadata changes from your scratch org or source-tracked sandbox into your local project files.**\n\nThis command is essential for synchronizing your local development environment with the changes you've made directly in your Salesforce org. After pulling, you can then stage and commit the relevant files to your version control system.\n\nKey features and considerations:\n\n- **Underlying Command:** Internally, this command executes `sf project retrieve start` to fetch the metadata.\n- **Error Handling:** If the pull operation encounters errors, it offers to automatically add the problematic items to your `.forceignore` file and then attempts to pull again, helping you resolve conflicts and ignore unwanted metadata.\n- **Missing Updates:** If you don't see certain updated items in the pull results, you might need to manually retrieve them using the Salesforce Extension's **Org Browser** or the **Salesforce CLI** directly. Refer to the [Retrieve Metadatas documentation](https://sfdx-hardis.cloudity.com/salesforce-ci-cd-publish-task/#retrieve-metadatas) for more details.\n- **Automatic Retrieval:** You can configure the `autoRetrieveWhenPull` property in your `.sfdx-hardis.yml` file to always retrieve specific metadata types (e.g., `CustomApplication`) that might not always be detected as updates by `project:retrieve:start`.\n\nExample `.sfdx-hardis.yml` configuration for `autoRetrieveWhenPull`:\n```yaml\nautoRetrieveWhenPull:\n - CustomApplication:MyCustomApplication\n - CustomApplication:MyOtherCustomApplication\n - CustomApplication:MyThirdCustomApp\n```\n\nFor a visual explanation of the process, watch this video:\n\n<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/Ik6whtflmfY\" 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 focuses on robust metadata synchronization:\n\n- **Salesforce CLI Wrapper:** It acts as a wrapper around the standard Salesforce CLI `sf project retrieve start` command, providing enhanced error handling and configuration options.\n- **Force Source Pull Utility:** The core logic resides in the `forceSourcePull` utility function, which orchestrates the retrieval process, including handling `.forceignore` updates.\n- **Configuration Integration:** It reads the `autoRetrieveWhenPull` setting from the project's `.sfdx-hardis.yml` to determine additional metadata to retrieve automatically.\n- **User Feedback:** Provides clear messages to the user regarding the pull status and guidance for troubleshooting.\n</details>\n",
|
|
3766
|
+
"examples": [
|
|
3767
|
+
"$ sf hardis:scratch:pull"
|
|
3768
|
+
],
|
|
3668
3769
|
"flags": {
|
|
3669
3770
|
"json": {
|
|
3670
3771
|
"description": "Format output as json.",
|
|
@@ -3681,48 +3782,26 @@
|
|
|
3681
3782
|
"multiple": false,
|
|
3682
3783
|
"type": "option"
|
|
3683
3784
|
},
|
|
3684
|
-
"forceoverwrite": {
|
|
3685
|
-
"char": "f",
|
|
3686
|
-
"description": "forceoverwrite",
|
|
3687
|
-
"name": "forceoverwrite",
|
|
3688
|
-
"allowNo": false,
|
|
3689
|
-
"type": "boolean"
|
|
3690
|
-
},
|
|
3691
|
-
"wait": {
|
|
3692
|
-
"char": "w",
|
|
3693
|
-
"description": "wait",
|
|
3694
|
-
"name": "wait",
|
|
3695
|
-
"default": 60,
|
|
3696
|
-
"hasDynamicHelp": false,
|
|
3697
|
-
"multiple": false,
|
|
3698
|
-
"type": "option"
|
|
3699
|
-
},
|
|
3700
|
-
"ignorewarnings": {
|
|
3701
|
-
"char": "g",
|
|
3702
|
-
"description": "ignorewarnings",
|
|
3703
|
-
"name": "ignorewarnings",
|
|
3704
|
-
"allowNo": false,
|
|
3705
|
-
"type": "boolean"
|
|
3706
|
-
},
|
|
3707
|
-
"quiet": {
|
|
3708
|
-
"description": "quiet",
|
|
3709
|
-
"name": "quiet",
|
|
3710
|
-
"allowNo": false,
|
|
3711
|
-
"type": "boolean"
|
|
3712
|
-
},
|
|
3713
3785
|
"debug": {
|
|
3714
|
-
"
|
|
3786
|
+
"char": "d",
|
|
3787
|
+
"description": "Activate debug mode (more logs)",
|
|
3715
3788
|
"name": "debug",
|
|
3716
3789
|
"allowNo": false,
|
|
3717
3790
|
"type": "boolean"
|
|
3718
3791
|
},
|
|
3719
3792
|
"websocket": {
|
|
3720
|
-
"description": "
|
|
3793
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
3721
3794
|
"name": "websocket",
|
|
3722
3795
|
"hasDynamicHelp": false,
|
|
3723
3796
|
"multiple": false,
|
|
3724
3797
|
"type": "option"
|
|
3725
3798
|
},
|
|
3799
|
+
"skipauth": {
|
|
3800
|
+
"description": "Skip authentication check when a default username is required",
|
|
3801
|
+
"name": "skipauth",
|
|
3802
|
+
"allowNo": false,
|
|
3803
|
+
"type": "boolean"
|
|
3804
|
+
},
|
|
3726
3805
|
"target-org": {
|
|
3727
3806
|
"aliases": [
|
|
3728
3807
|
"targetusername",
|
|
@@ -3741,36 +3820,39 @@
|
|
|
3741
3820
|
},
|
|
3742
3821
|
"hasDynamicHelp": true,
|
|
3743
3822
|
"hiddenAliases": [],
|
|
3744
|
-
"id": "hardis:
|
|
3823
|
+
"id": "hardis:scratch:pull",
|
|
3745
3824
|
"pluginAlias": "sfdx-hardis",
|
|
3746
3825
|
"pluginName": "sfdx-hardis",
|
|
3747
3826
|
"pluginType": "core",
|
|
3748
3827
|
"strict": true,
|
|
3749
3828
|
"enableJsonFlag": true,
|
|
3829
|
+
"title": "Scratch PULL",
|
|
3750
3830
|
"requiresProject": true,
|
|
3751
3831
|
"isESM": true,
|
|
3752
3832
|
"relativePath": [
|
|
3753
3833
|
"lib",
|
|
3754
3834
|
"commands",
|
|
3755
3835
|
"hardis",
|
|
3756
|
-
"
|
|
3757
|
-
"
|
|
3836
|
+
"scratch",
|
|
3837
|
+
"pull.js"
|
|
3758
3838
|
],
|
|
3759
3839
|
"aliasPermutations": [],
|
|
3760
3840
|
"permutations": [
|
|
3761
|
-
"hardis:
|
|
3762
|
-
"
|
|
3763
|
-
"
|
|
3764
|
-
"hardis:
|
|
3765
|
-
"
|
|
3766
|
-
"
|
|
3841
|
+
"hardis:scratch:pull",
|
|
3842
|
+
"scratch:hardis:pull",
|
|
3843
|
+
"scratch:pull:hardis",
|
|
3844
|
+
"hardis:pull:scratch",
|
|
3845
|
+
"pull:hardis:scratch",
|
|
3846
|
+
"pull:scratch:hardis"
|
|
3767
3847
|
]
|
|
3768
3848
|
},
|
|
3769
|
-
"hardis:
|
|
3849
|
+
"hardis:scratch:push": {
|
|
3770
3850
|
"aliases": [],
|
|
3771
3851
|
"args": {},
|
|
3772
|
-
"description": "
|
|
3773
|
-
"examples": [
|
|
3852
|
+
"description": "## Command Behavior\n\n**Pushes local Salesforce DX source files to a scratch org or source-tracked sandbox.**\n\nThis command is a fundamental operation in Salesforce DX development, allowing developers to synchronize their local codebase with their development org. It ensures that changes made locally are reflected in the scratch org, enabling testing and validation.\n\nKey functionalities:\n\n- **Source Synchronization:** Deploys all local changes (metadata and code) to the target scratch org.\n- **Underlying Command:** Internally, this command executes `sf project deploy start` to perform the push operation.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Salesforce CLI Wrapper:** It acts as a wrapper around the standard Salesforce CLI `sf project deploy start` command.\n- **`forceSourcePush` Utility:** The core logic resides in the `forceSourcePush` utility function, which orchestrates the deployment process.\n- **Connection Handling:** It uses the connection to the target org to perform the push operation.\n</details>\n",
|
|
3853
|
+
"examples": [
|
|
3854
|
+
"$ sf hardis:scratch:push"
|
|
3855
|
+
],
|
|
3774
3856
|
"flags": {
|
|
3775
3857
|
"json": {
|
|
3776
3858
|
"description": "Format output as json.",
|
|
@@ -3787,98 +3869,15 @@
|
|
|
3787
3869
|
"multiple": false,
|
|
3788
3870
|
"type": "option"
|
|
3789
3871
|
},
|
|
3790
|
-
"apiversion": {
|
|
3791
|
-
"char": "a",
|
|
3792
|
-
"description": "Override the api version used for api requests made by this command",
|
|
3793
|
-
"name": "apiversion",
|
|
3794
|
-
"hasDynamicHelp": false,
|
|
3795
|
-
"multiple": false,
|
|
3796
|
-
"type": "option"
|
|
3797
|
-
},
|
|
3798
|
-
"sourcepath": {
|
|
3799
|
-
"char": "p",
|
|
3800
|
-
"description": "sourcePath",
|
|
3801
|
-
"exclusive": [
|
|
3802
|
-
"manifest",
|
|
3803
|
-
"metadata"
|
|
3804
|
-
],
|
|
3805
|
-
"name": "sourcepath",
|
|
3806
|
-
"hasDynamicHelp": false,
|
|
3807
|
-
"multiple": true,
|
|
3808
|
-
"type": "option"
|
|
3809
|
-
},
|
|
3810
|
-
"wait": {
|
|
3811
|
-
"char": "w",
|
|
3812
|
-
"description": "wait",
|
|
3813
|
-
"name": "wait",
|
|
3814
|
-
"hasDynamicHelp": false,
|
|
3815
|
-
"multiple": false,
|
|
3816
|
-
"type": "option"
|
|
3817
|
-
},
|
|
3818
|
-
"manifest": {
|
|
3819
|
-
"char": "x",
|
|
3820
|
-
"description": "manifest",
|
|
3821
|
-
"exclusive": [
|
|
3822
|
-
"metadata",
|
|
3823
|
-
"sourcepath"
|
|
3824
|
-
],
|
|
3825
|
-
"name": "manifest",
|
|
3826
|
-
"hasDynamicHelp": false,
|
|
3827
|
-
"multiple": false,
|
|
3828
|
-
"type": "option"
|
|
3829
|
-
},
|
|
3830
|
-
"metadata": {
|
|
3831
|
-
"char": "m",
|
|
3832
|
-
"description": "metadata",
|
|
3833
|
-
"exclusive": [
|
|
3834
|
-
"manifest",
|
|
3835
|
-
"sourcepath"
|
|
3836
|
-
],
|
|
3837
|
-
"name": "metadata",
|
|
3838
|
-
"hasDynamicHelp": false,
|
|
3839
|
-
"multiple": true,
|
|
3840
|
-
"type": "option"
|
|
3841
|
-
},
|
|
3842
|
-
"packagenames": {
|
|
3843
|
-
"char": "n",
|
|
3844
|
-
"description": "packagenames",
|
|
3845
|
-
"name": "packagenames",
|
|
3846
|
-
"hasDynamicHelp": false,
|
|
3847
|
-
"multiple": true,
|
|
3848
|
-
"type": "option"
|
|
3849
|
-
},
|
|
3850
|
-
"tracksource": {
|
|
3851
|
-
"char": "t",
|
|
3852
|
-
"description": "tracksource",
|
|
3853
|
-
"name": "tracksource",
|
|
3854
|
-
"allowNo": false,
|
|
3855
|
-
"type": "boolean"
|
|
3856
|
-
},
|
|
3857
|
-
"forceoverwrite": {
|
|
3858
|
-
"char": "f",
|
|
3859
|
-
"dependsOn": [
|
|
3860
|
-
"tracksource"
|
|
3861
|
-
],
|
|
3862
|
-
"description": "forceoverwrite",
|
|
3863
|
-
"name": "forceoverwrite",
|
|
3864
|
-
"allowNo": false,
|
|
3865
|
-
"type": "boolean"
|
|
3866
|
-
},
|
|
3867
|
-
"verbose": {
|
|
3868
|
-
"description": "verbose",
|
|
3869
|
-
"name": "verbose",
|
|
3870
|
-
"allowNo": false,
|
|
3871
|
-
"type": "boolean"
|
|
3872
|
-
},
|
|
3873
3872
|
"debug": {
|
|
3874
3873
|
"char": "d",
|
|
3875
|
-
"description": "
|
|
3874
|
+
"description": "Activate debug mode (more logs)",
|
|
3876
3875
|
"name": "debug",
|
|
3877
3876
|
"allowNo": false,
|
|
3878
3877
|
"type": "boolean"
|
|
3879
3878
|
},
|
|
3880
3879
|
"websocket": {
|
|
3881
|
-
"description": "
|
|
3880
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
3882
3881
|
"name": "websocket",
|
|
3883
3882
|
"hasDynamicHelp": false,
|
|
3884
3883
|
"multiple": false,
|
|
@@ -3908,29 +3907,30 @@
|
|
|
3908
3907
|
},
|
|
3909
3908
|
"hasDynamicHelp": true,
|
|
3910
3909
|
"hiddenAliases": [],
|
|
3911
|
-
"id": "hardis:
|
|
3910
|
+
"id": "hardis:scratch:push",
|
|
3912
3911
|
"pluginAlias": "sfdx-hardis",
|
|
3913
3912
|
"pluginName": "sfdx-hardis",
|
|
3914
3913
|
"pluginType": "core",
|
|
3915
3914
|
"strict": true,
|
|
3916
3915
|
"enableJsonFlag": true,
|
|
3916
|
+
"title": "Scratch PUSH",
|
|
3917
3917
|
"requiresProject": true,
|
|
3918
3918
|
"isESM": true,
|
|
3919
3919
|
"relativePath": [
|
|
3920
3920
|
"lib",
|
|
3921
3921
|
"commands",
|
|
3922
3922
|
"hardis",
|
|
3923
|
-
"
|
|
3924
|
-
"
|
|
3923
|
+
"scratch",
|
|
3924
|
+
"push.js"
|
|
3925
3925
|
],
|
|
3926
3926
|
"aliasPermutations": [],
|
|
3927
3927
|
"permutations": [
|
|
3928
|
-
"hardis:
|
|
3929
|
-
"
|
|
3930
|
-
"
|
|
3931
|
-
"hardis:
|
|
3932
|
-
"
|
|
3933
|
-
"
|
|
3928
|
+
"hardis:scratch:push",
|
|
3929
|
+
"scratch:hardis:push",
|
|
3930
|
+
"scratch:push:hardis",
|
|
3931
|
+
"hardis:push:scratch",
|
|
3932
|
+
"push:hardis:scratch",
|
|
3933
|
+
"push:scratch:hardis"
|
|
3934
3934
|
]
|
|
3935
3935
|
},
|
|
3936
3936
|
"hardis:work:new": {
|
|
@@ -5539,12 +5539,15 @@
|
|
|
5539
5539
|
"import:data:org:hardis"
|
|
5540
5540
|
]
|
|
5541
5541
|
},
|
|
5542
|
-
"hardis:org:
|
|
5542
|
+
"hardis:org:diagnose:audittrail": {
|
|
5543
5543
|
"aliases": [],
|
|
5544
5544
|
"args": {},
|
|
5545
|
-
"description": "
|
|
5545
|
+
"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",
|
|
5546
5546
|
"examples": [
|
|
5547
|
-
"$ sf hardis:org:
|
|
5547
|
+
"$ sf hardis:org:diagnose:audittrail",
|
|
5548
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5549
|
+
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5550
|
+
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5548
5551
|
],
|
|
5549
5552
|
"flags": {
|
|
5550
5553
|
"json": {
|
|
@@ -5562,48 +5565,30 @@
|
|
|
5562
5565
|
"multiple": false,
|
|
5563
5566
|
"type": "option"
|
|
5564
5567
|
},
|
|
5565
|
-
"
|
|
5566
|
-
"char": "
|
|
5567
|
-
"description": "
|
|
5568
|
-
"name": "
|
|
5569
|
-
"hasDynamicHelp": false,
|
|
5570
|
-
"multiple": false,
|
|
5571
|
-
"type": "option"
|
|
5572
|
-
},
|
|
5573
|
-
"chunksize": {
|
|
5574
|
-
"char": "c",
|
|
5575
|
-
"description": "Number of records to add in a chunk before it is processed",
|
|
5576
|
-
"name": "chunksize",
|
|
5577
|
-
"default": 1000,
|
|
5568
|
+
"excludeusers": {
|
|
5569
|
+
"char": "e",
|
|
5570
|
+
"description": "Comma-separated list of usernames to exclude",
|
|
5571
|
+
"name": "excludeusers",
|
|
5578
5572
|
"hasDynamicHelp": false,
|
|
5579
5573
|
"multiple": false,
|
|
5580
5574
|
"type": "option"
|
|
5581
5575
|
},
|
|
5582
|
-
"
|
|
5576
|
+
"lastndays": {
|
|
5583
5577
|
"char": "t",
|
|
5584
|
-
"description": "
|
|
5585
|
-
"name": "
|
|
5586
|
-
"default": 300000,
|
|
5578
|
+
"description": "Number of days to extract from today (included)",
|
|
5579
|
+
"name": "lastndays",
|
|
5587
5580
|
"hasDynamicHelp": false,
|
|
5588
5581
|
"multiple": false,
|
|
5589
5582
|
"type": "option"
|
|
5590
5583
|
},
|
|
5591
|
-
"
|
|
5592
|
-
"char": "
|
|
5593
|
-
"description": "
|
|
5594
|
-
"name": "
|
|
5595
|
-
"default": 0,
|
|
5584
|
+
"outputfile": {
|
|
5585
|
+
"char": "f",
|
|
5586
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5587
|
+
"name": "outputfile",
|
|
5596
5588
|
"hasDynamicHelp": false,
|
|
5597
5589
|
"multiple": false,
|
|
5598
5590
|
"type": "option"
|
|
5599
5591
|
},
|
|
5600
|
-
"resume": {
|
|
5601
|
-
"char": "r",
|
|
5602
|
-
"description": "Resume previous export by checking existing files (default in CI)",
|
|
5603
|
-
"name": "resume",
|
|
5604
|
-
"allowNo": false,
|
|
5605
|
-
"type": "boolean"
|
|
5606
|
-
},
|
|
5607
5592
|
"debug": {
|
|
5608
5593
|
"char": "d",
|
|
5609
5594
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5642,13 +5627,13 @@
|
|
|
5642
5627
|
},
|
|
5643
5628
|
"hasDynamicHelp": true,
|
|
5644
5629
|
"hiddenAliases": [],
|
|
5645
|
-
"id": "hardis:org:
|
|
5630
|
+
"id": "hardis:org:diagnose:audittrail",
|
|
5646
5631
|
"pluginAlias": "sfdx-hardis",
|
|
5647
5632
|
"pluginName": "sfdx-hardis",
|
|
5648
5633
|
"pluginType": "core",
|
|
5649
5634
|
"strict": true,
|
|
5650
5635
|
"enableJsonFlag": true,
|
|
5651
|
-
"title": "
|
|
5636
|
+
"title": "Diagnose content of Setup Audit Trail",
|
|
5652
5637
|
"requiresProject": false,
|
|
5653
5638
|
"isESM": true,
|
|
5654
5639
|
"relativePath": [
|
|
@@ -5656,43 +5641,43 @@
|
|
|
5656
5641
|
"commands",
|
|
5657
5642
|
"hardis",
|
|
5658
5643
|
"org",
|
|
5659
|
-
"
|
|
5660
|
-
"
|
|
5644
|
+
"diagnose",
|
|
5645
|
+
"audittrail.js"
|
|
5661
5646
|
],
|
|
5662
5647
|
"aliasPermutations": [],
|
|
5663
5648
|
"permutations": [
|
|
5664
|
-
"hardis:org:
|
|
5665
|
-
"org:hardis:
|
|
5666
|
-
"org:
|
|
5667
|
-
"org:
|
|
5668
|
-
"hardis:
|
|
5669
|
-
"
|
|
5670
|
-
"
|
|
5671
|
-
"
|
|
5672
|
-
"hardis:
|
|
5673
|
-
"
|
|
5674
|
-
"
|
|
5675
|
-
"
|
|
5676
|
-
"hardis:org:
|
|
5677
|
-
"org:hardis:
|
|
5678
|
-
"org:
|
|
5679
|
-
"org:
|
|
5680
|
-
"hardis:
|
|
5681
|
-
"
|
|
5682
|
-
"
|
|
5683
|
-
"
|
|
5684
|
-
"hardis:
|
|
5685
|
-
"
|
|
5686
|
-
"
|
|
5687
|
-
"
|
|
5649
|
+
"hardis:org:diagnose:audittrail",
|
|
5650
|
+
"org:hardis:diagnose:audittrail",
|
|
5651
|
+
"org:diagnose:hardis:audittrail",
|
|
5652
|
+
"org:diagnose:audittrail:hardis",
|
|
5653
|
+
"hardis:diagnose:org:audittrail",
|
|
5654
|
+
"diagnose:hardis:org:audittrail",
|
|
5655
|
+
"diagnose:org:hardis:audittrail",
|
|
5656
|
+
"diagnose:org:audittrail:hardis",
|
|
5657
|
+
"hardis:diagnose:audittrail:org",
|
|
5658
|
+
"diagnose:hardis:audittrail:org",
|
|
5659
|
+
"diagnose:audittrail:hardis:org",
|
|
5660
|
+
"diagnose:audittrail:org:hardis",
|
|
5661
|
+
"hardis:org:audittrail:diagnose",
|
|
5662
|
+
"org:hardis:audittrail:diagnose",
|
|
5663
|
+
"org:audittrail:hardis:diagnose",
|
|
5664
|
+
"org:audittrail:diagnose:hardis",
|
|
5665
|
+
"hardis:audittrail:org:diagnose",
|
|
5666
|
+
"audittrail:hardis:org:diagnose",
|
|
5667
|
+
"audittrail:org:hardis:diagnose",
|
|
5668
|
+
"audittrail:org:diagnose:hardis",
|
|
5669
|
+
"hardis:audittrail:diagnose:org",
|
|
5670
|
+
"audittrail:hardis:diagnose:org",
|
|
5671
|
+
"audittrail:diagnose:hardis:org",
|
|
5672
|
+
"audittrail:diagnose:org:hardis"
|
|
5688
5673
|
]
|
|
5689
5674
|
},
|
|
5690
|
-
"hardis:org:
|
|
5675
|
+
"hardis:org:diagnose:instanceupgrade": {
|
|
5691
5676
|
"aliases": [],
|
|
5692
5677
|
"args": {},
|
|
5693
|
-
"description": "\
|
|
5678
|
+
"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",
|
|
5694
5679
|
"examples": [
|
|
5695
|
-
"$ sf hardis:org:
|
|
5680
|
+
"$ sf hardis:org:diagnose:instanceupgrade"
|
|
5696
5681
|
],
|
|
5697
5682
|
"flags": {
|
|
5698
5683
|
"json": {
|
|
@@ -5710,21 +5695,6 @@
|
|
|
5710
5695
|
"multiple": false,
|
|
5711
5696
|
"type": "option"
|
|
5712
5697
|
},
|
|
5713
|
-
"path": {
|
|
5714
|
-
"char": "p",
|
|
5715
|
-
"description": "Path to the file export project",
|
|
5716
|
-
"name": "path",
|
|
5717
|
-
"hasDynamicHelp": false,
|
|
5718
|
-
"multiple": false,
|
|
5719
|
-
"type": "option"
|
|
5720
|
-
},
|
|
5721
|
-
"overwrite": {
|
|
5722
|
-
"char": "f",
|
|
5723
|
-
"description": "Override existing files (doubles the number of API calls)",
|
|
5724
|
-
"name": "overwrite",
|
|
5725
|
-
"allowNo": false,
|
|
5726
|
-
"type": "boolean"
|
|
5727
|
-
},
|
|
5728
5698
|
"debug": {
|
|
5729
5699
|
"char": "d",
|
|
5730
5700
|
"description": "Activate debug mode (more logs)",
|
|
@@ -5763,13 +5733,13 @@
|
|
|
5763
5733
|
},
|
|
5764
5734
|
"hasDynamicHelp": true,
|
|
5765
5735
|
"hiddenAliases": [],
|
|
5766
|
-
"id": "hardis:org:
|
|
5736
|
+
"id": "hardis:org:diagnose:instanceupgrade",
|
|
5767
5737
|
"pluginAlias": "sfdx-hardis",
|
|
5768
5738
|
"pluginName": "sfdx-hardis",
|
|
5769
5739
|
"pluginType": "core",
|
|
5770
5740
|
"strict": true,
|
|
5771
5741
|
"enableJsonFlag": true,
|
|
5772
|
-
"title": "
|
|
5742
|
+
"title": "Get Instance Upgrade date",
|
|
5773
5743
|
"requiresProject": false,
|
|
5774
5744
|
"isESM": true,
|
|
5775
5745
|
"relativePath": [
|
|
@@ -5777,44 +5747,46 @@
|
|
|
5777
5747
|
"commands",
|
|
5778
5748
|
"hardis",
|
|
5779
5749
|
"org",
|
|
5780
|
-
"
|
|
5781
|
-
"
|
|
5750
|
+
"diagnose",
|
|
5751
|
+
"instanceupgrade.js"
|
|
5782
5752
|
],
|
|
5783
5753
|
"aliasPermutations": [],
|
|
5784
5754
|
"permutations": [
|
|
5785
|
-
"hardis:org:
|
|
5786
|
-
"org:hardis:
|
|
5787
|
-
"org:
|
|
5788
|
-
"org:
|
|
5789
|
-
"hardis:
|
|
5790
|
-
"
|
|
5791
|
-
"
|
|
5792
|
-
"
|
|
5793
|
-
"hardis:
|
|
5794
|
-
"
|
|
5795
|
-
"
|
|
5796
|
-
"
|
|
5797
|
-
"hardis:org:
|
|
5798
|
-
"org:hardis:
|
|
5799
|
-
"org:
|
|
5800
|
-
"org:
|
|
5801
|
-
"hardis:
|
|
5802
|
-
"
|
|
5803
|
-
"
|
|
5804
|
-
"
|
|
5805
|
-
"hardis:
|
|
5806
|
-
"
|
|
5807
|
-
"
|
|
5808
|
-
"
|
|
5755
|
+
"hardis:org:diagnose:instanceupgrade",
|
|
5756
|
+
"org:hardis:diagnose:instanceupgrade",
|
|
5757
|
+
"org:diagnose:hardis:instanceupgrade",
|
|
5758
|
+
"org:diagnose:instanceupgrade:hardis",
|
|
5759
|
+
"hardis:diagnose:org:instanceupgrade",
|
|
5760
|
+
"diagnose:hardis:org:instanceupgrade",
|
|
5761
|
+
"diagnose:org:hardis:instanceupgrade",
|
|
5762
|
+
"diagnose:org:instanceupgrade:hardis",
|
|
5763
|
+
"hardis:diagnose:instanceupgrade:org",
|
|
5764
|
+
"diagnose:hardis:instanceupgrade:org",
|
|
5765
|
+
"diagnose:instanceupgrade:hardis:org",
|
|
5766
|
+
"diagnose:instanceupgrade:org:hardis",
|
|
5767
|
+
"hardis:org:instanceupgrade:diagnose",
|
|
5768
|
+
"org:hardis:instanceupgrade:diagnose",
|
|
5769
|
+
"org:instanceupgrade:hardis:diagnose",
|
|
5770
|
+
"org:instanceupgrade:diagnose:hardis",
|
|
5771
|
+
"hardis:instanceupgrade:org:diagnose",
|
|
5772
|
+
"instanceupgrade:hardis:org:diagnose",
|
|
5773
|
+
"instanceupgrade:org:hardis:diagnose",
|
|
5774
|
+
"instanceupgrade:org:diagnose:hardis",
|
|
5775
|
+
"hardis:instanceupgrade:diagnose:org",
|
|
5776
|
+
"instanceupgrade:hardis:diagnose:org",
|
|
5777
|
+
"instanceupgrade:diagnose:hardis:org",
|
|
5778
|
+
"instanceupgrade:diagnose:org:hardis"
|
|
5809
5779
|
]
|
|
5810
5780
|
},
|
|
5811
|
-
"hardis:org:
|
|
5781
|
+
"hardis:org:diagnose:legacyapi": {
|
|
5812
5782
|
"aliases": [],
|
|
5813
5783
|
"args": {},
|
|
5814
|
-
"description": "
|
|
5784
|
+
"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",
|
|
5815
5785
|
"examples": [
|
|
5816
|
-
"$ sf hardis:org:
|
|
5817
|
-
"$ sf hardis:org:
|
|
5786
|
+
"$ sf hardis:org:diagnose:legacyapi",
|
|
5787
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com",
|
|
5788
|
+
"$ sf hardis:org:diagnose:legacyapi --outputfile 'c:/path/to/folder/legacyapi.csv'",
|
|
5789
|
+
"$ sf hardis:org:diagnose:legacyapi -u hardis@myclient.com --outputfile ./tmp/legacyapi.csv"
|
|
5818
5790
|
],
|
|
5819
5791
|
"flags": {
|
|
5820
5792
|
"json": {
|
|
@@ -5832,10 +5804,28 @@
|
|
|
5832
5804
|
"multiple": false,
|
|
5833
5805
|
"type": "option"
|
|
5834
5806
|
},
|
|
5835
|
-
"
|
|
5807
|
+
"eventtype": {
|
|
5808
|
+
"char": "e",
|
|
5809
|
+
"description": "Type of EventLogFile event to analyze",
|
|
5810
|
+
"name": "eventtype",
|
|
5811
|
+
"default": "ApiTotalUsage",
|
|
5812
|
+
"hasDynamicHelp": false,
|
|
5813
|
+
"multiple": false,
|
|
5814
|
+
"type": "option"
|
|
5815
|
+
},
|
|
5816
|
+
"limit": {
|
|
5836
5817
|
"char": "l",
|
|
5837
|
-
"description": "
|
|
5838
|
-
"name": "
|
|
5818
|
+
"description": "Number of latest EventLogFile events to analyze",
|
|
5819
|
+
"name": "limit",
|
|
5820
|
+
"default": 999,
|
|
5821
|
+
"hasDynamicHelp": false,
|
|
5822
|
+
"multiple": false,
|
|
5823
|
+
"type": "option"
|
|
5824
|
+
},
|
|
5825
|
+
"outputfile": {
|
|
5826
|
+
"char": "f",
|
|
5827
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
5828
|
+
"name": "outputfile",
|
|
5839
5829
|
"hasDynamicHelp": false,
|
|
5840
5830
|
"multiple": false,
|
|
5841
5831
|
"type": "option"
|
|
@@ -5878,60 +5868,57 @@
|
|
|
5878
5868
|
},
|
|
5879
5869
|
"hasDynamicHelp": true,
|
|
5880
5870
|
"hiddenAliases": [],
|
|
5881
|
-
"id": "hardis:org:
|
|
5871
|
+
"id": "hardis:org:diagnose:legacyapi",
|
|
5882
5872
|
"pluginAlias": "sfdx-hardis",
|
|
5883
5873
|
"pluginName": "sfdx-hardis",
|
|
5884
5874
|
"pluginType": "core",
|
|
5885
5875
|
"strict": true,
|
|
5886
5876
|
"enableJsonFlag": true,
|
|
5887
|
-
"title": "
|
|
5888
|
-
"requiresProject":
|
|
5877
|
+
"title": "Check for legacy API use",
|
|
5878
|
+
"requiresProject": false,
|
|
5889
5879
|
"isESM": true,
|
|
5890
5880
|
"relativePath": [
|
|
5891
5881
|
"lib",
|
|
5892
5882
|
"commands",
|
|
5893
5883
|
"hardis",
|
|
5894
5884
|
"org",
|
|
5895
|
-
"
|
|
5896
|
-
"
|
|
5885
|
+
"diagnose",
|
|
5886
|
+
"legacyapi.js"
|
|
5897
5887
|
],
|
|
5898
5888
|
"aliasPermutations": [],
|
|
5899
5889
|
"permutations": [
|
|
5900
|
-
"hardis:org:
|
|
5901
|
-
"org:hardis:
|
|
5902
|
-
"org:
|
|
5903
|
-
"org:
|
|
5904
|
-
"hardis:
|
|
5905
|
-
"
|
|
5906
|
-
"
|
|
5907
|
-
"
|
|
5908
|
-
"hardis:
|
|
5909
|
-
"
|
|
5910
|
-
"
|
|
5911
|
-
"
|
|
5912
|
-
"hardis:org:
|
|
5913
|
-
"org:hardis:
|
|
5914
|
-
"org:
|
|
5915
|
-
"org:
|
|
5916
|
-
"hardis:
|
|
5917
|
-
"
|
|
5918
|
-
"
|
|
5919
|
-
"
|
|
5920
|
-
"hardis:
|
|
5921
|
-
"
|
|
5922
|
-
"
|
|
5923
|
-
"
|
|
5890
|
+
"hardis:org:diagnose:legacyapi",
|
|
5891
|
+
"org:hardis:diagnose:legacyapi",
|
|
5892
|
+
"org:diagnose:hardis:legacyapi",
|
|
5893
|
+
"org:diagnose:legacyapi:hardis",
|
|
5894
|
+
"hardis:diagnose:org:legacyapi",
|
|
5895
|
+
"diagnose:hardis:org:legacyapi",
|
|
5896
|
+
"diagnose:org:hardis:legacyapi",
|
|
5897
|
+
"diagnose:org:legacyapi:hardis",
|
|
5898
|
+
"hardis:diagnose:legacyapi:org",
|
|
5899
|
+
"diagnose:hardis:legacyapi:org",
|
|
5900
|
+
"diagnose:legacyapi:hardis:org",
|
|
5901
|
+
"diagnose:legacyapi:org:hardis",
|
|
5902
|
+
"hardis:org:legacyapi:diagnose",
|
|
5903
|
+
"org:hardis:legacyapi:diagnose",
|
|
5904
|
+
"org:legacyapi:hardis:diagnose",
|
|
5905
|
+
"org:legacyapi:diagnose:hardis",
|
|
5906
|
+
"hardis:legacyapi:org:diagnose",
|
|
5907
|
+
"legacyapi:hardis:org:diagnose",
|
|
5908
|
+
"legacyapi:org:hardis:diagnose",
|
|
5909
|
+
"legacyapi:org:diagnose:hardis",
|
|
5910
|
+
"hardis:legacyapi:diagnose:org",
|
|
5911
|
+
"legacyapi:hardis:diagnose:org",
|
|
5912
|
+
"legacyapi:diagnose:hardis:org",
|
|
5913
|
+
"legacyapi:diagnose:org:hardis"
|
|
5924
5914
|
]
|
|
5925
5915
|
},
|
|
5926
|
-
"hardis:org:diagnose:
|
|
5916
|
+
"hardis:org:diagnose:licenses": {
|
|
5927
5917
|
"aliases": [],
|
|
5928
5918
|
"args": {},
|
|
5929
|
-
"description": "
|
|
5919
|
+
"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",
|
|
5930
5920
|
"examples": [
|
|
5931
|
-
"$ sf hardis:org:diagnose:
|
|
5932
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com",
|
|
5933
|
-
"$ sf hardis:org:diagnose:audittrail --excludeusers baptiste@titi.com,bertrand@titi.com",
|
|
5934
|
-
"$ sf hardis:org:diagnose:audittrail --lastndays 5"
|
|
5921
|
+
"$ sf hardis:org:diagnose:licenses"
|
|
5935
5922
|
],
|
|
5936
5923
|
"flags": {
|
|
5937
5924
|
"json": {
|
|
@@ -5949,22 +5936,6 @@
|
|
|
5949
5936
|
"multiple": false,
|
|
5950
5937
|
"type": "option"
|
|
5951
5938
|
},
|
|
5952
|
-
"excludeusers": {
|
|
5953
|
-
"char": "e",
|
|
5954
|
-
"description": "Comma-separated list of usernames to exclude",
|
|
5955
|
-
"name": "excludeusers",
|
|
5956
|
-
"hasDynamicHelp": false,
|
|
5957
|
-
"multiple": false,
|
|
5958
|
-
"type": "option"
|
|
5959
|
-
},
|
|
5960
|
-
"lastndays": {
|
|
5961
|
-
"char": "t",
|
|
5962
|
-
"description": "Number of days to extract from today (included)",
|
|
5963
|
-
"name": "lastndays",
|
|
5964
|
-
"hasDynamicHelp": false,
|
|
5965
|
-
"multiple": false,
|
|
5966
|
-
"type": "option"
|
|
5967
|
-
},
|
|
5968
5939
|
"outputfile": {
|
|
5969
5940
|
"char": "f",
|
|
5970
5941
|
"description": "Force the path and name of output report file. Must end with .csv",
|
|
@@ -5973,6 +5944,13 @@
|
|
|
5973
5944
|
"multiple": false,
|
|
5974
5945
|
"type": "option"
|
|
5975
5946
|
},
|
|
5947
|
+
"usedonly": {
|
|
5948
|
+
"char": "u",
|
|
5949
|
+
"description": "Filter to have only used licenses",
|
|
5950
|
+
"name": "usedonly",
|
|
5951
|
+
"allowNo": false,
|
|
5952
|
+
"type": "boolean"
|
|
5953
|
+
},
|
|
5976
5954
|
"debug": {
|
|
5977
5955
|
"char": "d",
|
|
5978
5956
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6011,13 +5989,13 @@
|
|
|
6011
5989
|
},
|
|
6012
5990
|
"hasDynamicHelp": true,
|
|
6013
5991
|
"hiddenAliases": [],
|
|
6014
|
-
"id": "hardis:org:diagnose:
|
|
5992
|
+
"id": "hardis:org:diagnose:licenses",
|
|
6015
5993
|
"pluginAlias": "sfdx-hardis",
|
|
6016
5994
|
"pluginName": "sfdx-hardis",
|
|
6017
5995
|
"pluginType": "core",
|
|
6018
5996
|
"strict": true,
|
|
6019
5997
|
"enableJsonFlag": true,
|
|
6020
|
-
"title": "
|
|
5998
|
+
"title": "List licenses subscribed and used in a Salesforce org",
|
|
6021
5999
|
"requiresProject": false,
|
|
6022
6000
|
"isESM": true,
|
|
6023
6001
|
"relativePath": [
|
|
@@ -6026,42 +6004,42 @@
|
|
|
6026
6004
|
"hardis",
|
|
6027
6005
|
"org",
|
|
6028
6006
|
"diagnose",
|
|
6029
|
-
"
|
|
6007
|
+
"licenses.js"
|
|
6030
6008
|
],
|
|
6031
6009
|
"aliasPermutations": [],
|
|
6032
6010
|
"permutations": [
|
|
6033
|
-
"hardis:org:diagnose:
|
|
6034
|
-
"org:hardis:diagnose:
|
|
6035
|
-
"org:diagnose:hardis:
|
|
6036
|
-
"org:diagnose:
|
|
6037
|
-
"hardis:diagnose:org:
|
|
6038
|
-
"diagnose:hardis:org:
|
|
6039
|
-
"diagnose:org:hardis:
|
|
6040
|
-
"diagnose:org:
|
|
6041
|
-
"hardis:diagnose:
|
|
6042
|
-
"diagnose:hardis:
|
|
6043
|
-
"diagnose:
|
|
6044
|
-
"diagnose:
|
|
6045
|
-
"hardis:org:
|
|
6046
|
-
"org:hardis:
|
|
6047
|
-
"org:
|
|
6048
|
-
"org:
|
|
6049
|
-
"hardis:
|
|
6050
|
-
"
|
|
6051
|
-
"
|
|
6052
|
-
"
|
|
6053
|
-
"hardis:
|
|
6054
|
-
"
|
|
6055
|
-
"
|
|
6056
|
-
"
|
|
6011
|
+
"hardis:org:diagnose:licenses",
|
|
6012
|
+
"org:hardis:diagnose:licenses",
|
|
6013
|
+
"org:diagnose:hardis:licenses",
|
|
6014
|
+
"org:diagnose:licenses:hardis",
|
|
6015
|
+
"hardis:diagnose:org:licenses",
|
|
6016
|
+
"diagnose:hardis:org:licenses",
|
|
6017
|
+
"diagnose:org:hardis:licenses",
|
|
6018
|
+
"diagnose:org:licenses:hardis",
|
|
6019
|
+
"hardis:diagnose:licenses:org",
|
|
6020
|
+
"diagnose:hardis:licenses:org",
|
|
6021
|
+
"diagnose:licenses:hardis:org",
|
|
6022
|
+
"diagnose:licenses:org:hardis",
|
|
6023
|
+
"hardis:org:licenses:diagnose",
|
|
6024
|
+
"org:hardis:licenses:diagnose",
|
|
6025
|
+
"org:licenses:hardis:diagnose",
|
|
6026
|
+
"org:licenses:diagnose:hardis",
|
|
6027
|
+
"hardis:licenses:org:diagnose",
|
|
6028
|
+
"licenses:hardis:org:diagnose",
|
|
6029
|
+
"licenses:org:hardis:diagnose",
|
|
6030
|
+
"licenses:org:diagnose:hardis",
|
|
6031
|
+
"hardis:licenses:diagnose:org",
|
|
6032
|
+
"licenses:hardis:diagnose:org",
|
|
6033
|
+
"licenses:diagnose:hardis:org",
|
|
6034
|
+
"licenses:diagnose:org:hardis"
|
|
6057
6035
|
]
|
|
6058
6036
|
},
|
|
6059
|
-
"hardis:org:diagnose:
|
|
6037
|
+
"hardis:org:diagnose:releaseupdates": {
|
|
6060
6038
|
"aliases": [],
|
|
6061
6039
|
"args": {},
|
|
6062
|
-
"description": "
|
|
6040
|
+
"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",
|
|
6063
6041
|
"examples": [
|
|
6064
|
-
"$ sf hardis:org:diagnose:
|
|
6042
|
+
"$ sf hardis:org:diagnose:releaseupdates"
|
|
6065
6043
|
],
|
|
6066
6044
|
"flags": {
|
|
6067
6045
|
"json": {
|
|
@@ -6079,6 +6057,14 @@
|
|
|
6079
6057
|
"multiple": false,
|
|
6080
6058
|
"type": "option"
|
|
6081
6059
|
},
|
|
6060
|
+
"outputfile": {
|
|
6061
|
+
"char": "f",
|
|
6062
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6063
|
+
"name": "outputfile",
|
|
6064
|
+
"hasDynamicHelp": false,
|
|
6065
|
+
"multiple": false,
|
|
6066
|
+
"type": "option"
|
|
6067
|
+
},
|
|
6082
6068
|
"debug": {
|
|
6083
6069
|
"char": "d",
|
|
6084
6070
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6117,13 +6103,13 @@
|
|
|
6117
6103
|
},
|
|
6118
6104
|
"hasDynamicHelp": true,
|
|
6119
6105
|
"hiddenAliases": [],
|
|
6120
|
-
"id": "hardis:org:diagnose:
|
|
6106
|
+
"id": "hardis:org:diagnose:releaseupdates",
|
|
6121
6107
|
"pluginAlias": "sfdx-hardis",
|
|
6122
6108
|
"pluginName": "sfdx-hardis",
|
|
6123
6109
|
"pluginType": "core",
|
|
6124
6110
|
"strict": true,
|
|
6125
6111
|
"enableJsonFlag": true,
|
|
6126
|
-
"title": "
|
|
6112
|
+
"title": "Check Release Updates of an org",
|
|
6127
6113
|
"requiresProject": false,
|
|
6128
6114
|
"isESM": true,
|
|
6129
6115
|
"relativePath": [
|
|
@@ -6132,45 +6118,47 @@
|
|
|
6132
6118
|
"hardis",
|
|
6133
6119
|
"org",
|
|
6134
6120
|
"diagnose",
|
|
6135
|
-
"
|
|
6121
|
+
"releaseupdates.js"
|
|
6136
6122
|
],
|
|
6137
6123
|
"aliasPermutations": [],
|
|
6138
6124
|
"permutations": [
|
|
6139
|
-
"hardis:org:diagnose:
|
|
6140
|
-
"org:hardis:diagnose:
|
|
6141
|
-
"org:diagnose:hardis:
|
|
6142
|
-
"org:diagnose:
|
|
6143
|
-
"hardis:diagnose:org:
|
|
6144
|
-
"diagnose:hardis:org:
|
|
6145
|
-
"diagnose:org:hardis:
|
|
6146
|
-
"diagnose:org:
|
|
6147
|
-
"hardis:diagnose:
|
|
6148
|
-
"diagnose:hardis:
|
|
6149
|
-
"diagnose:
|
|
6150
|
-
"diagnose:
|
|
6151
|
-
"hardis:org:
|
|
6152
|
-
"org:hardis:
|
|
6153
|
-
"org:
|
|
6154
|
-
"org:
|
|
6155
|
-
"hardis:
|
|
6156
|
-
"
|
|
6157
|
-
"
|
|
6158
|
-
"
|
|
6159
|
-
"hardis:
|
|
6160
|
-
"
|
|
6161
|
-
"
|
|
6162
|
-
"
|
|
6125
|
+
"hardis:org:diagnose:releaseupdates",
|
|
6126
|
+
"org:hardis:diagnose:releaseupdates",
|
|
6127
|
+
"org:diagnose:hardis:releaseupdates",
|
|
6128
|
+
"org:diagnose:releaseupdates:hardis",
|
|
6129
|
+
"hardis:diagnose:org:releaseupdates",
|
|
6130
|
+
"diagnose:hardis:org:releaseupdates",
|
|
6131
|
+
"diagnose:org:hardis:releaseupdates",
|
|
6132
|
+
"diagnose:org:releaseupdates:hardis",
|
|
6133
|
+
"hardis:diagnose:releaseupdates:org",
|
|
6134
|
+
"diagnose:hardis:releaseupdates:org",
|
|
6135
|
+
"diagnose:releaseupdates:hardis:org",
|
|
6136
|
+
"diagnose:releaseupdates:org:hardis",
|
|
6137
|
+
"hardis:org:releaseupdates:diagnose",
|
|
6138
|
+
"org:hardis:releaseupdates:diagnose",
|
|
6139
|
+
"org:releaseupdates:hardis:diagnose",
|
|
6140
|
+
"org:releaseupdates:diagnose:hardis",
|
|
6141
|
+
"hardis:releaseupdates:org:diagnose",
|
|
6142
|
+
"releaseupdates:hardis:org:diagnose",
|
|
6143
|
+
"releaseupdates:org:hardis:diagnose",
|
|
6144
|
+
"releaseupdates:org:diagnose:hardis",
|
|
6145
|
+
"hardis:releaseupdates:diagnose:org",
|
|
6146
|
+
"releaseupdates:hardis:diagnose:org",
|
|
6147
|
+
"releaseupdates:diagnose:hardis:org",
|
|
6148
|
+
"releaseupdates:diagnose:org:hardis"
|
|
6163
6149
|
]
|
|
6164
6150
|
},
|
|
6165
|
-
"hardis:org:diagnose:
|
|
6151
|
+
"hardis:org:diagnose:storage-stats": {
|
|
6166
6152
|
"aliases": [],
|
|
6167
6153
|
"args": {},
|
|
6168
|
-
"description": "
|
|
6154
|
+
"description": "**Extracts and analyzes Data Storage usage for a Salesforce org, providing detailed per-object breakdowns with flexible grouping options.**\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 breakdown fields (date fields, RecordType, custom fields, or relationship fields).\n- **Flexible Breakdown Field:** Supports grouping by any field including:\n - Date/DateTime fields (`CreatedDate`, `LastModifiedDate`, custom date fields)\n - RecordType (`RecordType.Name`)\n - Custom fields (`Status__c`, picklists, text fields)\n - Nested relationship fields (`SBQQ__Quote__r.RecordType.Name`)\n- **Date Granularity Options:** For date/datetime fields, choose between:\n - Year-based grouping (`CALENDAR_YEAR`)\n - Month-based grouping (`CALENDAR_MONTH`)\n - Day-based grouping (exact date)\n- **WHERE Clause Filtering:** Apply SOQL WHERE conditions to filter records before calculating storage (e.g., only active records, records from the last year).\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 breakdown by selected field 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, breakdown field selection, granularity choice (for date fields), and optional WHERE conditions. All objects are pre-selected by default for user convenience.\n- **Field Validation:** Recursively validates breakdown fields including nested relationships (e.g., `SBQQ__Quote__r.RecordType.Name`) by traversing the relationship chain and checking field existence on each related object. Automatically handles special cases like `RecordType` -> `RecordTypeId` and `__r` -> `__c` conversions.\n- **Dynamic Query Generation:** Builds SOQL queries based on field type and granularity:\n - For date fields with year granularity: `SELECT CALENDAR_YEAR(<Field>) breakdown, COUNT(Id) total FROM <SObject> [WHERE ...] GROUP BY CALENDAR_YEAR(<Field>) ORDER BY CALENDAR_YEAR(<Field>)`\n - For date fields with month granularity: `SELECT CALENDAR_YEAR(<Field>) year, CALENDAR_MONTH(<Field>) month, COUNT(Id) total FROM <SObject> [WHERE ...] GROUP BY CALENDAR_YEAR(<Field>), CALENDAR_MONTH(<Field>) ORDER BY CALENDAR_YEAR(<Field>), CALENDAR_MONTH(<Field>)`\n - For non-date fields: `SELECT <Field> breakdown, COUNT(Id) total FROM <SObject> [WHERE ...] GROUP BY <Field> ORDER BY <Field>`\n- **WHERE Clause Support:** Accepts user-provided WHERE conditions via flag (`--where`) or interactive prompt. Injects the condition into all SOQL queries for consistent filtering across all objects.\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 breakdown value.\n- **Report Generation:** Uses `generateCsvFile` and `generateReportPath` helpers to create two CSV files in the reports directory:\n - Detailed breakdown: includes all statistics per breakdown value per object (e.g., by year, by month, by RecordType)\n - Totals summary: includes only aggregate totals per object\n - File naming includes breakdown field, granularity (for date fields), and `-filtered` suffix when WHERE clause is applied\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",
|
|
6169
6155
|
"examples": [
|
|
6170
|
-
"$ sf hardis:org:diagnose:
|
|
6171
|
-
"$ sf hardis:org:diagnose:
|
|
6172
|
-
"$ sf hardis:org:diagnose:
|
|
6173
|
-
"$ sf hardis:org:diagnose:
|
|
6156
|
+
"$ sf hardis:org:diagnose:storage-stats",
|
|
6157
|
+
"$ sf hardis:org:diagnose:storage-stats --breakdown-field \"CreatedDate\"",
|
|
6158
|
+
"$ sf hardis:org:diagnose:storage-stats -b \"RecordType.Name\"",
|
|
6159
|
+
"$ sf hardis:org:diagnose:storage-stats --where \"CreatedDate = LAST_N_DAYS:365\"",
|
|
6160
|
+
"$ sf hardis:org:diagnose:storage-stats -w \"Status__c = 'Active'\"",
|
|
6161
|
+
"$ sf hardis:org:diagnose:storage-stats -b \"LastModifiedDate\" -w \"IsDeleted = false\""
|
|
6174
6162
|
],
|
|
6175
6163
|
"flags": {
|
|
6176
6164
|
"json": {
|
|
@@ -6188,28 +6176,26 @@
|
|
|
6188
6176
|
"multiple": false,
|
|
6189
6177
|
"type": "option"
|
|
6190
6178
|
},
|
|
6191
|
-
"
|
|
6192
|
-
"char": "
|
|
6193
|
-
"description": "
|
|
6194
|
-
"name": "
|
|
6195
|
-
"default": "ApiTotalUsage",
|
|
6179
|
+
"outputfile": {
|
|
6180
|
+
"char": "f",
|
|
6181
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6182
|
+
"name": "outputfile",
|
|
6196
6183
|
"hasDynamicHelp": false,
|
|
6197
6184
|
"multiple": false,
|
|
6198
6185
|
"type": "option"
|
|
6199
6186
|
},
|
|
6200
|
-
"
|
|
6201
|
-
"char": "
|
|
6202
|
-
"description": "
|
|
6203
|
-
"name": "
|
|
6204
|
-
"default": 999,
|
|
6187
|
+
"breakdown-field": {
|
|
6188
|
+
"char": "b",
|
|
6189
|
+
"description": "Field to use for storage stats breakdown. Example: \"CreatedDate\", \"LastModifiedDate\", \"RecordType.Name\", or custom fields like \"Status__c\"",
|
|
6190
|
+
"name": "breakdown-field",
|
|
6205
6191
|
"hasDynamicHelp": false,
|
|
6206
6192
|
"multiple": false,
|
|
6207
6193
|
"type": "option"
|
|
6208
6194
|
},
|
|
6209
|
-
"
|
|
6210
|
-
"char": "
|
|
6211
|
-
"description": "
|
|
6212
|
-
"name": "
|
|
6195
|
+
"where": {
|
|
6196
|
+
"char": "w",
|
|
6197
|
+
"description": "WHERE clause to filter records in the query (without the WHERE keyword). Example: \"CreatedDate = LAST_N_DAYS:365\" or \"Status__c = 'Active'\"",
|
|
6198
|
+
"name": "where",
|
|
6213
6199
|
"hasDynamicHelp": false,
|
|
6214
6200
|
"multiple": false,
|
|
6215
6201
|
"type": "option"
|
|
@@ -6252,57 +6238,57 @@
|
|
|
6252
6238
|
},
|
|
6253
6239
|
"hasDynamicHelp": true,
|
|
6254
6240
|
"hiddenAliases": [],
|
|
6255
|
-
"id": "hardis:org:diagnose:
|
|
6241
|
+
"id": "hardis:org:diagnose:storage-stats",
|
|
6256
6242
|
"pluginAlias": "sfdx-hardis",
|
|
6257
6243
|
"pluginName": "sfdx-hardis",
|
|
6258
6244
|
"pluginType": "core",
|
|
6259
6245
|
"strict": true,
|
|
6260
6246
|
"enableJsonFlag": true,
|
|
6261
|
-
"title": "
|
|
6262
|
-
"requiresProject":
|
|
6247
|
+
"title": "Extract Data Storage stats",
|
|
6248
|
+
"requiresProject": true,
|
|
6263
6249
|
"isESM": true,
|
|
6264
|
-
"relativePath": [
|
|
6265
|
-
"lib",
|
|
6266
|
-
"commands",
|
|
6267
|
-
"hardis",
|
|
6268
|
-
"org",
|
|
6269
|
-
"diagnose",
|
|
6270
|
-
"
|
|
6271
|
-
],
|
|
6272
|
-
"aliasPermutations": [],
|
|
6273
|
-
"permutations": [
|
|
6274
|
-
"hardis:org:diagnose:
|
|
6275
|
-
"org:hardis:diagnose:
|
|
6276
|
-
"org:diagnose:hardis:
|
|
6277
|
-
"org:diagnose:
|
|
6278
|
-
"hardis:diagnose:org:
|
|
6279
|
-
"diagnose:hardis:org:
|
|
6280
|
-
"diagnose:org:hardis:
|
|
6281
|
-
"diagnose:org:
|
|
6282
|
-
"hardis:diagnose:
|
|
6283
|
-
"diagnose:hardis:
|
|
6284
|
-
"diagnose:
|
|
6285
|
-
"diagnose:
|
|
6286
|
-
"hardis:org:
|
|
6287
|
-
"org:hardis:
|
|
6288
|
-
"org:
|
|
6289
|
-
"org:
|
|
6290
|
-
"hardis:
|
|
6291
|
-
"
|
|
6292
|
-
"
|
|
6293
|
-
"
|
|
6294
|
-
"hardis:
|
|
6295
|
-
"
|
|
6296
|
-
"
|
|
6297
|
-
"
|
|
6250
|
+
"relativePath": [
|
|
6251
|
+
"lib",
|
|
6252
|
+
"commands",
|
|
6253
|
+
"hardis",
|
|
6254
|
+
"org",
|
|
6255
|
+
"diagnose",
|
|
6256
|
+
"storage-stats.js"
|
|
6257
|
+
],
|
|
6258
|
+
"aliasPermutations": [],
|
|
6259
|
+
"permutations": [
|
|
6260
|
+
"hardis:org:diagnose:storage-stats",
|
|
6261
|
+
"org:hardis:diagnose:storage-stats",
|
|
6262
|
+
"org:diagnose:hardis:storage-stats",
|
|
6263
|
+
"org:diagnose:storage-stats:hardis",
|
|
6264
|
+
"hardis:diagnose:org:storage-stats",
|
|
6265
|
+
"diagnose:hardis:org:storage-stats",
|
|
6266
|
+
"diagnose:org:hardis:storage-stats",
|
|
6267
|
+
"diagnose:org:storage-stats:hardis",
|
|
6268
|
+
"hardis:diagnose:storage-stats:org",
|
|
6269
|
+
"diagnose:hardis:storage-stats:org",
|
|
6270
|
+
"diagnose:storage-stats:hardis:org",
|
|
6271
|
+
"diagnose:storage-stats:org:hardis",
|
|
6272
|
+
"hardis:org:storage-stats:diagnose",
|
|
6273
|
+
"org:hardis:storage-stats:diagnose",
|
|
6274
|
+
"org:storage-stats:hardis:diagnose",
|
|
6275
|
+
"org:storage-stats:diagnose:hardis",
|
|
6276
|
+
"hardis:storage-stats:org:diagnose",
|
|
6277
|
+
"storage-stats:hardis:org:diagnose",
|
|
6278
|
+
"storage-stats:org:hardis:diagnose",
|
|
6279
|
+
"storage-stats:org:diagnose:hardis",
|
|
6280
|
+
"hardis:storage-stats:diagnose:org",
|
|
6281
|
+
"storage-stats:hardis:diagnose:org",
|
|
6282
|
+
"storage-stats:diagnose:hardis:org",
|
|
6283
|
+
"storage-stats:diagnose:org:hardis"
|
|
6298
6284
|
]
|
|
6299
6285
|
},
|
|
6300
|
-
"hardis:org:diagnose:
|
|
6286
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
6301
6287
|
"aliases": [],
|
|
6302
6288
|
"args": {},
|
|
6303
|
-
"description": "\n
|
|
6289
|
+
"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",
|
|
6304
6290
|
"examples": [
|
|
6305
|
-
"$ sf hardis:org:diagnose:
|
|
6291
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
6306
6292
|
],
|
|
6307
6293
|
"flags": {
|
|
6308
6294
|
"json": {
|
|
@@ -6328,13 +6314,6 @@
|
|
|
6328
6314
|
"multiple": false,
|
|
6329
6315
|
"type": "option"
|
|
6330
6316
|
},
|
|
6331
|
-
"usedonly": {
|
|
6332
|
-
"char": "u",
|
|
6333
|
-
"description": "Filter to have only used licenses",
|
|
6334
|
-
"name": "usedonly",
|
|
6335
|
-
"allowNo": false,
|
|
6336
|
-
"type": "boolean"
|
|
6337
|
-
},
|
|
6338
6317
|
"debug": {
|
|
6339
6318
|
"char": "d",
|
|
6340
6319
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6373,13 +6352,13 @@
|
|
|
6373
6352
|
},
|
|
6374
6353
|
"hasDynamicHelp": true,
|
|
6375
6354
|
"hiddenAliases": [],
|
|
6376
|
-
"id": "hardis:org:diagnose:
|
|
6355
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
6377
6356
|
"pluginAlias": "sfdx-hardis",
|
|
6378
6357
|
"pluginName": "sfdx-hardis",
|
|
6379
6358
|
"pluginType": "core",
|
|
6380
6359
|
"strict": true,
|
|
6381
6360
|
"enableJsonFlag": true,
|
|
6382
|
-
"title": "
|
|
6361
|
+
"title": "Detect Unsecured Connected Apps",
|
|
6383
6362
|
"requiresProject": false,
|
|
6384
6363
|
"isESM": true,
|
|
6385
6364
|
"relativePath": [
|
|
@@ -6388,42 +6367,43 @@
|
|
|
6388
6367
|
"hardis",
|
|
6389
6368
|
"org",
|
|
6390
6369
|
"diagnose",
|
|
6391
|
-
"
|
|
6370
|
+
"unsecure-connected-apps.js"
|
|
6392
6371
|
],
|
|
6393
6372
|
"aliasPermutations": [],
|
|
6394
6373
|
"permutations": [
|
|
6395
|
-
"hardis:org:diagnose:
|
|
6396
|
-
"org:hardis:diagnose:
|
|
6397
|
-
"org:diagnose:hardis:
|
|
6398
|
-
"org:diagnose:
|
|
6399
|
-
"hardis:diagnose:org:
|
|
6400
|
-
"diagnose:hardis:org:
|
|
6401
|
-
"diagnose:org:hardis:
|
|
6402
|
-
"diagnose:org:
|
|
6403
|
-
"hardis:diagnose:
|
|
6404
|
-
"diagnose:hardis:
|
|
6405
|
-
"diagnose:
|
|
6406
|
-
"diagnose:
|
|
6407
|
-
"hardis:org:
|
|
6408
|
-
"org:hardis:
|
|
6409
|
-
"org:
|
|
6410
|
-
"org:
|
|
6411
|
-
"hardis:
|
|
6412
|
-
"
|
|
6413
|
-
"
|
|
6414
|
-
"
|
|
6415
|
-
"hardis:
|
|
6416
|
-
"
|
|
6417
|
-
"
|
|
6418
|
-
"
|
|
6374
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
6375
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
6376
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
6377
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
6378
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
6379
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
6380
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
6381
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
6382
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
6383
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
6384
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
6385
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
6386
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
6387
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
6388
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
6389
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
6390
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
6391
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
6392
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
6393
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
6394
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
6395
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
6396
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
6397
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
6419
6398
|
]
|
|
6420
6399
|
},
|
|
6421
|
-
"hardis:org:diagnose:
|
|
6400
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6422
6401
|
"aliases": [],
|
|
6423
6402
|
"args": {},
|
|
6424
|
-
"description": "
|
|
6403
|
+
"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",
|
|
6425
6404
|
"examples": [
|
|
6426
|
-
"$ sf hardis:org:diagnose:
|
|
6405
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6406
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6427
6407
|
],
|
|
6428
6408
|
"flags": {
|
|
6429
6409
|
"json": {
|
|
@@ -6449,6 +6429,14 @@
|
|
|
6449
6429
|
"multiple": false,
|
|
6450
6430
|
"type": "option"
|
|
6451
6431
|
},
|
|
6432
|
+
"days": {
|
|
6433
|
+
"char": "t",
|
|
6434
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6435
|
+
"name": "days",
|
|
6436
|
+
"hasDynamicHelp": false,
|
|
6437
|
+
"multiple": false,
|
|
6438
|
+
"type": "option"
|
|
6439
|
+
},
|
|
6452
6440
|
"debug": {
|
|
6453
6441
|
"char": "d",
|
|
6454
6442
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6487,13 +6475,13 @@
|
|
|
6487
6475
|
},
|
|
6488
6476
|
"hasDynamicHelp": true,
|
|
6489
6477
|
"hiddenAliases": [],
|
|
6490
|
-
"id": "hardis:org:diagnose:
|
|
6478
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6491
6479
|
"pluginAlias": "sfdx-hardis",
|
|
6492
6480
|
"pluginName": "sfdx-hardis",
|
|
6493
6481
|
"pluginType": "core",
|
|
6494
6482
|
"strict": true,
|
|
6495
6483
|
"enableJsonFlag": true,
|
|
6496
|
-
"title": "
|
|
6484
|
+
"title": "Detect unused Apex classes in an org",
|
|
6497
6485
|
"requiresProject": false,
|
|
6498
6486
|
"isESM": true,
|
|
6499
6487
|
"relativePath": [
|
|
@@ -6502,47 +6490,42 @@
|
|
|
6502
6490
|
"hardis",
|
|
6503
6491
|
"org",
|
|
6504
6492
|
"diagnose",
|
|
6505
|
-
"
|
|
6493
|
+
"unused-apex-classes.js"
|
|
6506
6494
|
],
|
|
6507
6495
|
"aliasPermutations": [],
|
|
6508
6496
|
"permutations": [
|
|
6509
|
-
"hardis:org:diagnose:
|
|
6510
|
-
"org:hardis:diagnose:
|
|
6511
|
-
"org:diagnose:hardis:
|
|
6512
|
-
"org:diagnose:
|
|
6513
|
-
"hardis:diagnose:org:
|
|
6514
|
-
"diagnose:hardis:org:
|
|
6515
|
-
"diagnose:org:hardis:
|
|
6516
|
-
"diagnose:org:
|
|
6517
|
-
"hardis:diagnose:
|
|
6518
|
-
"diagnose:hardis:
|
|
6519
|
-
"diagnose:
|
|
6520
|
-
"diagnose:
|
|
6521
|
-
"hardis:org:
|
|
6522
|
-
"org:hardis:
|
|
6523
|
-
"org:
|
|
6524
|
-
"org:
|
|
6525
|
-
"hardis:
|
|
6526
|
-
"
|
|
6527
|
-
"
|
|
6528
|
-
"
|
|
6529
|
-
"hardis:
|
|
6530
|
-
"
|
|
6531
|
-
"
|
|
6532
|
-
"
|
|
6497
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6498
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6499
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6500
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6501
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6502
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6503
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6504
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6505
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6506
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6507
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6508
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6509
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6510
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6511
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6512
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6513
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6514
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6515
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6516
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6517
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6518
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6519
|
+
"unused-apex-classes:diagnose:hardis:org",
|
|
6520
|
+
"unused-apex-classes:diagnose:org:hardis"
|
|
6533
6521
|
]
|
|
6534
6522
|
},
|
|
6535
|
-
"hardis:org:diagnose:
|
|
6523
|
+
"hardis:org:diagnose:unused-connected-apps": {
|
|
6536
6524
|
"aliases": [],
|
|
6537
6525
|
"args": {},
|
|
6538
|
-
"description": "**
|
|
6526
|
+
"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",
|
|
6539
6527
|
"examples": [
|
|
6540
|
-
"$ sf hardis:org:diagnose:
|
|
6541
|
-
"$ sf hardis:org:diagnose:storage-stats --breakdown-field \"CreatedDate\"",
|
|
6542
|
-
"$ sf hardis:org:diagnose:storage-stats -b \"RecordType.Name\"",
|
|
6543
|
-
"$ sf hardis:org:diagnose:storage-stats --where \"CreatedDate = LAST_N_DAYS:365\"",
|
|
6544
|
-
"$ sf hardis:org:diagnose:storage-stats -w \"Status__c = 'Active'\"",
|
|
6545
|
-
"$ sf hardis:org:diagnose:storage-stats -b \"LastModifiedDate\" -w \"IsDeleted = false\""
|
|
6528
|
+
"$ sf hardis:org:diagnose:unused-connected-apps"
|
|
6546
6529
|
],
|
|
6547
6530
|
"flags": {
|
|
6548
6531
|
"json": {
|
|
@@ -6568,22 +6551,6 @@
|
|
|
6568
6551
|
"multiple": false,
|
|
6569
6552
|
"type": "option"
|
|
6570
6553
|
},
|
|
6571
|
-
"breakdown-field": {
|
|
6572
|
-
"char": "b",
|
|
6573
|
-
"description": "Field to use for storage stats breakdown. Example: \"CreatedDate\", \"LastModifiedDate\", \"RecordType.Name\", or custom fields like \"Status__c\"",
|
|
6574
|
-
"name": "breakdown-field",
|
|
6575
|
-
"hasDynamicHelp": false,
|
|
6576
|
-
"multiple": false,
|
|
6577
|
-
"type": "option"
|
|
6578
|
-
},
|
|
6579
|
-
"where": {
|
|
6580
|
-
"char": "w",
|
|
6581
|
-
"description": "WHERE clause to filter records in the query (without the WHERE keyword). Example: \"CreatedDate = LAST_N_DAYS:365\" or \"Status__c = 'Active'\"",
|
|
6582
|
-
"name": "where",
|
|
6583
|
-
"hasDynamicHelp": false,
|
|
6584
|
-
"multiple": false,
|
|
6585
|
-
"type": "option"
|
|
6586
|
-
},
|
|
6587
6554
|
"debug": {
|
|
6588
6555
|
"char": "d",
|
|
6589
6556
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6622,14 +6589,31 @@
|
|
|
6622
6589
|
},
|
|
6623
6590
|
"hasDynamicHelp": true,
|
|
6624
6591
|
"hiddenAliases": [],
|
|
6625
|
-
"id": "hardis:org:diagnose:
|
|
6592
|
+
"id": "hardis:org:diagnose:unused-connected-apps",
|
|
6626
6593
|
"pluginAlias": "sfdx-hardis",
|
|
6627
6594
|
"pluginName": "sfdx-hardis",
|
|
6628
6595
|
"pluginType": "core",
|
|
6629
6596
|
"strict": true,
|
|
6630
6597
|
"enableJsonFlag": true,
|
|
6631
|
-
"title": "
|
|
6632
|
-
"
|
|
6598
|
+
"title": "Unused Connected Apps in an org",
|
|
6599
|
+
"allowedInactiveConnectedApps": [
|
|
6600
|
+
"Ant Migration Tool",
|
|
6601
|
+
"Chatter Desktop",
|
|
6602
|
+
"Chatter Mobile for BlackBerry",
|
|
6603
|
+
"Force.com IDE",
|
|
6604
|
+
"OIQ_Integration",
|
|
6605
|
+
"Salesforce CLI",
|
|
6606
|
+
"Salesforce Files",
|
|
6607
|
+
"Salesforce Mobile Dashboards",
|
|
6608
|
+
"Salesforce Touch",
|
|
6609
|
+
"Salesforce for Outlook",
|
|
6610
|
+
"SalesforceA",
|
|
6611
|
+
"SalesforceA for Android",
|
|
6612
|
+
"SalesforceA for iOS",
|
|
6613
|
+
"SalesforceDX Namespace Registry",
|
|
6614
|
+
"SalesforceIQ"
|
|
6615
|
+
],
|
|
6616
|
+
"requiresProject": false,
|
|
6633
6617
|
"isESM": true,
|
|
6634
6618
|
"relativePath": [
|
|
6635
6619
|
"lib",
|
|
@@ -6637,42 +6621,43 @@
|
|
|
6637
6621
|
"hardis",
|
|
6638
6622
|
"org",
|
|
6639
6623
|
"diagnose",
|
|
6640
|
-
"
|
|
6624
|
+
"unused-connected-apps.js"
|
|
6641
6625
|
],
|
|
6642
6626
|
"aliasPermutations": [],
|
|
6643
6627
|
"permutations": [
|
|
6644
|
-
"hardis:org:diagnose:
|
|
6645
|
-
"org:hardis:diagnose:
|
|
6646
|
-
"org:diagnose:hardis:
|
|
6647
|
-
"org:diagnose:
|
|
6648
|
-
"hardis:diagnose:org:
|
|
6649
|
-
"diagnose:hardis:org:
|
|
6650
|
-
"diagnose:org:hardis:
|
|
6651
|
-
"diagnose:org:
|
|
6652
|
-
"hardis:diagnose:
|
|
6653
|
-
"diagnose:hardis:
|
|
6654
|
-
"diagnose:
|
|
6655
|
-
"diagnose:
|
|
6656
|
-
"hardis:org:
|
|
6657
|
-
"org:hardis:
|
|
6658
|
-
"org:
|
|
6659
|
-
"org:
|
|
6660
|
-
"hardis:
|
|
6661
|
-
"
|
|
6662
|
-
"
|
|
6663
|
-
"
|
|
6664
|
-
"hardis:
|
|
6665
|
-
"
|
|
6666
|
-
"
|
|
6667
|
-
"
|
|
6628
|
+
"hardis:org:diagnose:unused-connected-apps",
|
|
6629
|
+
"org:hardis:diagnose:unused-connected-apps",
|
|
6630
|
+
"org:diagnose:hardis:unused-connected-apps",
|
|
6631
|
+
"org:diagnose:unused-connected-apps:hardis",
|
|
6632
|
+
"hardis:diagnose:org:unused-connected-apps",
|
|
6633
|
+
"diagnose:hardis:org:unused-connected-apps",
|
|
6634
|
+
"diagnose:org:hardis:unused-connected-apps",
|
|
6635
|
+
"diagnose:org:unused-connected-apps:hardis",
|
|
6636
|
+
"hardis:diagnose:unused-connected-apps:org",
|
|
6637
|
+
"diagnose:hardis:unused-connected-apps:org",
|
|
6638
|
+
"diagnose:unused-connected-apps:hardis:org",
|
|
6639
|
+
"diagnose:unused-connected-apps:org:hardis",
|
|
6640
|
+
"hardis:org:unused-connected-apps:diagnose",
|
|
6641
|
+
"org:hardis:unused-connected-apps:diagnose",
|
|
6642
|
+
"org:unused-connected-apps:hardis:diagnose",
|
|
6643
|
+
"org:unused-connected-apps:diagnose:hardis",
|
|
6644
|
+
"hardis:unused-connected-apps:org:diagnose",
|
|
6645
|
+
"unused-connected-apps:hardis:org:diagnose",
|
|
6646
|
+
"unused-connected-apps:org:hardis:diagnose",
|
|
6647
|
+
"unused-connected-apps:org:diagnose:hardis",
|
|
6648
|
+
"hardis:unused-connected-apps:diagnose:org",
|
|
6649
|
+
"unused-connected-apps:hardis:diagnose:org",
|
|
6650
|
+
"unused-connected-apps:diagnose:hardis:org",
|
|
6651
|
+
"unused-connected-apps:diagnose:org:hardis"
|
|
6668
6652
|
]
|
|
6669
6653
|
},
|
|
6670
|
-
"hardis:org:diagnose:
|
|
6654
|
+
"hardis:org:diagnose:unusedlicenses": {
|
|
6671
6655
|
"aliases": [],
|
|
6672
6656
|
"args": {},
|
|
6673
|
-
"description": "\n## Command Behavior\n\n**Detects
|
|
6657
|
+
"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",
|
|
6674
6658
|
"examples": [
|
|
6675
|
-
"$ sf hardis:org:diagnose:
|
|
6659
|
+
"$ sf hardis:org:diagnose:unusedlicenses",
|
|
6660
|
+
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
6676
6661
|
],
|
|
6677
6662
|
"flags": {
|
|
6678
6663
|
"json": {
|
|
@@ -6736,14 +6721,32 @@
|
|
|
6736
6721
|
},
|
|
6737
6722
|
"hasDynamicHelp": true,
|
|
6738
6723
|
"hiddenAliases": [],
|
|
6739
|
-
"id": "hardis:org:diagnose:
|
|
6724
|
+
"id": "hardis:org:diagnose:unusedlicenses",
|
|
6740
6725
|
"pluginAlias": "sfdx-hardis",
|
|
6741
6726
|
"pluginName": "sfdx-hardis",
|
|
6742
6727
|
"pluginType": "core",
|
|
6743
6728
|
"strict": true,
|
|
6744
6729
|
"enableJsonFlag": true,
|
|
6745
|
-
"title": "Detect
|
|
6730
|
+
"title": "Detect unused Permission Set Licenses (beta)",
|
|
6746
6731
|
"requiresProject": false,
|
|
6732
|
+
"additionalPermissionSetsToAlwaysGet": [
|
|
6733
|
+
"Sales_User"
|
|
6734
|
+
],
|
|
6735
|
+
"permSetsPermSetLicenses": [
|
|
6736
|
+
{
|
|
6737
|
+
"permSet": "Sales_User",
|
|
6738
|
+
"permSetLicense": "SalesUserPsl"
|
|
6739
|
+
}
|
|
6740
|
+
],
|
|
6741
|
+
"profilesPermissionSetLicenses": [
|
|
6742
|
+
{
|
|
6743
|
+
"profile": "Salesforce API Only",
|
|
6744
|
+
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
6745
|
+
}
|
|
6746
|
+
],
|
|
6747
|
+
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
6748
|
+
"IdentityConnect"
|
|
6749
|
+
],
|
|
6747
6750
|
"isESM": true,
|
|
6748
6751
|
"relativePath": [
|
|
6749
6752
|
"lib",
|
|
@@ -6751,43 +6754,46 @@
|
|
|
6751
6754
|
"hardis",
|
|
6752
6755
|
"org",
|
|
6753
6756
|
"diagnose",
|
|
6754
|
-
"
|
|
6757
|
+
"unusedlicenses.js"
|
|
6755
6758
|
],
|
|
6756
6759
|
"aliasPermutations": [],
|
|
6757
6760
|
"permutations": [
|
|
6758
|
-
"hardis:org:diagnose:
|
|
6759
|
-
"org:hardis:diagnose:
|
|
6760
|
-
"org:diagnose:hardis:
|
|
6761
|
-
"org:diagnose:
|
|
6762
|
-
"hardis:diagnose:org:
|
|
6763
|
-
"diagnose:hardis:org:
|
|
6764
|
-
"diagnose:org:hardis:
|
|
6765
|
-
"diagnose:org:
|
|
6766
|
-
"hardis:diagnose:
|
|
6767
|
-
"diagnose:hardis:
|
|
6768
|
-
"diagnose:
|
|
6769
|
-
"diagnose:
|
|
6770
|
-
"hardis:org:
|
|
6771
|
-
"org:hardis:
|
|
6772
|
-
"org:
|
|
6773
|
-
"org:
|
|
6774
|
-
"hardis:
|
|
6775
|
-
"
|
|
6776
|
-
"
|
|
6777
|
-
"
|
|
6778
|
-
"hardis:
|
|
6779
|
-
"
|
|
6780
|
-
"
|
|
6781
|
-
"
|
|
6761
|
+
"hardis:org:diagnose:unusedlicenses",
|
|
6762
|
+
"org:hardis:diagnose:unusedlicenses",
|
|
6763
|
+
"org:diagnose:hardis:unusedlicenses",
|
|
6764
|
+
"org:diagnose:unusedlicenses:hardis",
|
|
6765
|
+
"hardis:diagnose:org:unusedlicenses",
|
|
6766
|
+
"diagnose:hardis:org:unusedlicenses",
|
|
6767
|
+
"diagnose:org:hardis:unusedlicenses",
|
|
6768
|
+
"diagnose:org:unusedlicenses:hardis",
|
|
6769
|
+
"hardis:diagnose:unusedlicenses:org",
|
|
6770
|
+
"diagnose:hardis:unusedlicenses:org",
|
|
6771
|
+
"diagnose:unusedlicenses:hardis:org",
|
|
6772
|
+
"diagnose:unusedlicenses:org:hardis",
|
|
6773
|
+
"hardis:org:unusedlicenses:diagnose",
|
|
6774
|
+
"org:hardis:unusedlicenses:diagnose",
|
|
6775
|
+
"org:unusedlicenses:hardis:diagnose",
|
|
6776
|
+
"org:unusedlicenses:diagnose:hardis",
|
|
6777
|
+
"hardis:unusedlicenses:org:diagnose",
|
|
6778
|
+
"unusedlicenses:hardis:org:diagnose",
|
|
6779
|
+
"unusedlicenses:org:hardis:diagnose",
|
|
6780
|
+
"unusedlicenses:org:diagnose:hardis",
|
|
6781
|
+
"hardis:unusedlicenses:diagnose:org",
|
|
6782
|
+
"unusedlicenses:hardis:diagnose:org",
|
|
6783
|
+
"unusedlicenses:diagnose:hardis:org",
|
|
6784
|
+
"unusedlicenses:diagnose:org:hardis"
|
|
6782
6785
|
]
|
|
6783
6786
|
},
|
|
6784
|
-
"hardis:org:diagnose:
|
|
6787
|
+
"hardis:org:diagnose:unusedusers": {
|
|
6785
6788
|
"aliases": [],
|
|
6786
6789
|
"args": {},
|
|
6787
|
-
"description": "
|
|
6790
|
+
"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>",
|
|
6788
6791
|
"examples": [
|
|
6789
|
-
"$ sf hardis:org:diagnose:
|
|
6790
|
-
"$ sf hardis:org:diagnose:
|
|
6792
|
+
"$ sf hardis:org:diagnose:unusedusers",
|
|
6793
|
+
"$ sf hardis:org:diagnose:unusedusers --days 365",
|
|
6794
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
6795
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
6796
|
+
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
6791
6797
|
],
|
|
6792
6798
|
"flags": {
|
|
6793
6799
|
"json": {
|
|
@@ -6821,6 +6827,33 @@
|
|
|
6821
6827
|
"multiple": false,
|
|
6822
6828
|
"type": "option"
|
|
6823
6829
|
},
|
|
6830
|
+
"licensetypes": {
|
|
6831
|
+
"char": "l",
|
|
6832
|
+
"description": "Type of licenses to check. If set, do not use licenseidentifiers option. In CI, default is all-crm",
|
|
6833
|
+
"name": "licensetypes",
|
|
6834
|
+
"hasDynamicHelp": false,
|
|
6835
|
+
"multiple": false,
|
|
6836
|
+
"options": [
|
|
6837
|
+
"all",
|
|
6838
|
+
"all-crm",
|
|
6839
|
+
"all-paying"
|
|
6840
|
+
],
|
|
6841
|
+
"type": "option"
|
|
6842
|
+
},
|
|
6843
|
+
"licenseidentifiers": {
|
|
6844
|
+
"char": "i",
|
|
6845
|
+
"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",
|
|
6846
|
+
"name": "licenseidentifiers",
|
|
6847
|
+
"hasDynamicHelp": false,
|
|
6848
|
+
"multiple": false,
|
|
6849
|
+
"type": "option"
|
|
6850
|
+
},
|
|
6851
|
+
"returnactiveusers": {
|
|
6852
|
+
"description": "Inverts the command by returning the active users",
|
|
6853
|
+
"name": "returnactiveusers",
|
|
6854
|
+
"allowNo": false,
|
|
6855
|
+
"type": "boolean"
|
|
6856
|
+
},
|
|
6824
6857
|
"debug": {
|
|
6825
6858
|
"char": "d",
|
|
6826
6859
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6859,13 +6892,13 @@
|
|
|
6859
6892
|
},
|
|
6860
6893
|
"hasDynamicHelp": true,
|
|
6861
6894
|
"hiddenAliases": [],
|
|
6862
|
-
"id": "hardis:org:diagnose:
|
|
6895
|
+
"id": "hardis:org:diagnose:unusedusers",
|
|
6863
6896
|
"pluginAlias": "sfdx-hardis",
|
|
6864
6897
|
"pluginName": "sfdx-hardis",
|
|
6865
6898
|
"pluginType": "core",
|
|
6866
6899
|
"strict": true,
|
|
6867
6900
|
"enableJsonFlag": true,
|
|
6868
|
-
"title": "Detect unused
|
|
6901
|
+
"title": "Detect unused Users in Salesforce",
|
|
6869
6902
|
"requiresProject": false,
|
|
6870
6903
|
"isESM": true,
|
|
6871
6904
|
"relativePath": [
|
|
@@ -6874,42 +6907,42 @@
|
|
|
6874
6907
|
"hardis",
|
|
6875
6908
|
"org",
|
|
6876
6909
|
"diagnose",
|
|
6877
|
-
"
|
|
6910
|
+
"unusedusers.js"
|
|
6878
6911
|
],
|
|
6879
6912
|
"aliasPermutations": [],
|
|
6880
6913
|
"permutations": [
|
|
6881
|
-
"hardis:org:diagnose:
|
|
6882
|
-
"org:hardis:diagnose:
|
|
6883
|
-
"org:diagnose:hardis:
|
|
6884
|
-
"org:diagnose:
|
|
6885
|
-
"hardis:diagnose:org:
|
|
6886
|
-
"diagnose:hardis:org:
|
|
6887
|
-
"diagnose:org:hardis:
|
|
6888
|
-
"diagnose:org:
|
|
6889
|
-
"hardis:diagnose:
|
|
6890
|
-
"diagnose:hardis:
|
|
6891
|
-
"diagnose:
|
|
6892
|
-
"diagnose:
|
|
6893
|
-
"hardis:org:
|
|
6894
|
-
"org:hardis:
|
|
6895
|
-
"org:
|
|
6896
|
-
"org:
|
|
6897
|
-
"hardis:
|
|
6898
|
-
"
|
|
6899
|
-
"
|
|
6900
|
-
"
|
|
6901
|
-
"hardis:
|
|
6902
|
-
"
|
|
6903
|
-
"
|
|
6904
|
-
"
|
|
6914
|
+
"hardis:org:diagnose:unusedusers",
|
|
6915
|
+
"org:hardis:diagnose:unusedusers",
|
|
6916
|
+
"org:diagnose:hardis:unusedusers",
|
|
6917
|
+
"org:diagnose:unusedusers:hardis",
|
|
6918
|
+
"hardis:diagnose:org:unusedusers",
|
|
6919
|
+
"diagnose:hardis:org:unusedusers",
|
|
6920
|
+
"diagnose:org:hardis:unusedusers",
|
|
6921
|
+
"diagnose:org:unusedusers:hardis",
|
|
6922
|
+
"hardis:diagnose:unusedusers:org",
|
|
6923
|
+
"diagnose:hardis:unusedusers:org",
|
|
6924
|
+
"diagnose:unusedusers:hardis:org",
|
|
6925
|
+
"diagnose:unusedusers:org:hardis",
|
|
6926
|
+
"hardis:org:unusedusers:diagnose",
|
|
6927
|
+
"org:hardis:unusedusers:diagnose",
|
|
6928
|
+
"org:unusedusers:hardis:diagnose",
|
|
6929
|
+
"org:unusedusers:diagnose:hardis",
|
|
6930
|
+
"hardis:unusedusers:org:diagnose",
|
|
6931
|
+
"unusedusers:hardis:org:diagnose",
|
|
6932
|
+
"unusedusers:org:hardis:diagnose",
|
|
6933
|
+
"unusedusers:org:diagnose:hardis",
|
|
6934
|
+
"hardis:unusedusers:diagnose:org",
|
|
6935
|
+
"unusedusers:hardis:diagnose:org",
|
|
6936
|
+
"unusedusers:diagnose:hardis:org",
|
|
6937
|
+
"unusedusers:diagnose:org:hardis"
|
|
6905
6938
|
]
|
|
6906
6939
|
},
|
|
6907
|
-
"hardis:org:
|
|
6940
|
+
"hardis:org:files:export": {
|
|
6908
6941
|
"aliases": [],
|
|
6909
6942
|
"args": {},
|
|
6910
|
-
"description": "\n## Command Behavior\n\n**
|
|
6943
|
+
"description": "\n## Command Behavior\n\n**Exports file attachments (ContentVersion, Attachment) from a Salesforce org based on a predefined configuration.**\n\nThis command enables the mass download of files associated with Salesforce records, providing a robust solution for backing up files, migrating them to other systems, or integrating them with external document management solutions.\n\nKey functionalities:\n\n- **Configuration-Driven Export:** Relies on an `export.json` file within a designated file export project to define the export criteria, including the SOQL query for parent records, file types to export, output naming conventions, and file size filtering.\n- **File Size Filtering:** Supports minimum file size filtering via the `fileSizeMin` configuration parameter (in KB). Files smaller than the specified size will be skipped during export.\n- **File Validation:** After downloading each file, validates the integrity by:\n - **Checksum Validation:** For ContentVersion files, compares MD5 checksum with Salesforce's stored checksum\n - **Size Validation:** For both ContentVersion and Attachment files, verifies actual file size matches expected size\n - **Status Tracking:** Files are categorized with specific statuses: `success` (valid files), `failed` (download errors), `skipped` (filtered files), `invalid` (downloaded but failed validation)\n - All validation results are logged in the CSV export log for audit purposes\n- **Resume/Restart Capability:** \n - **Resume Mode:** When `--resume` flag is used (default in CI environments), checks existing downloaded files for validity. Valid files are skipped, invalid files are re-downloaded.\n - **Restart Mode:** When resume is disabled, clears the output folder and starts a fresh export.\n - **Interactive Mode:** When existing files are found and `--resume` is not explicitly specified (non-CI environments), prompts the user to choose between resume or restart.\n- **Interactive Project Selection:** If the file export project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Configurable Export Options:** Allows overriding default export settings such as `chunksize` (number of records processed in a batch), `polltimeout` (timeout for Bulk API calls), and `startchunknumber` (to resume a failed export).\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for a practical example:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesExporter Class:** The core logic is encapsulated within the `FilesExporter` class, which orchestrates the entire export process.\n- **SOQL Queries (Bulk API):** It uses Salesforce Bulk API queries to efficiently retrieve large volumes of parent record IDs and file metadata, including checksums and file sizes.\n- **File Download:** Downloads the actual file content from Salesforce.\n- **File Validation:** After each successful download, validates file integrity by comparing checksums (ContentVersion) and file sizes (both ContentVersion and Attachment) against Salesforce metadata.\n- **Resume Logic:** In resume mode, checks for existing files before downloading, validates their integrity, and only re-downloads invalid or missing files. This enables efficient recovery from interrupted exports.\n- **File System Operations:** Writes the downloaded files to the local file system, organizing them into folders based on the configured naming conventions.\n- **Configuration Loading:** Reads the `export.json` file to get the export configuration. It also allows for interactive overriding of these settings.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file export project, `promptFilesExportConfiguration` for customizing export options, and prompts for resume/restart choice when existing files are found.\n- **Error Handling:** Includes mechanisms to handle potential errors during the export process, such as network issues, API limits, and file validation failures. Each file is assigned a specific status (`success`, `failed`, `skipped`, `invalid`) for comprehensive tracking and troubleshooting.\n</details>\n",
|
|
6911
6944
|
"examples": [
|
|
6912
|
-
"$ sf hardis:org:
|
|
6945
|
+
"$ sf hardis:org:files:export"
|
|
6913
6946
|
],
|
|
6914
6947
|
"flags": {
|
|
6915
6948
|
"json": {
|
|
@@ -6927,14 +6960,48 @@
|
|
|
6927
6960
|
"multiple": false,
|
|
6928
6961
|
"type": "option"
|
|
6929
6962
|
},
|
|
6930
|
-
"
|
|
6931
|
-
"char": "
|
|
6932
|
-
"description": "
|
|
6933
|
-
"name": "
|
|
6963
|
+
"path": {
|
|
6964
|
+
"char": "p",
|
|
6965
|
+
"description": "Path to the file export project",
|
|
6966
|
+
"name": "path",
|
|
6967
|
+
"hasDynamicHelp": false,
|
|
6968
|
+
"multiple": false,
|
|
6969
|
+
"type": "option"
|
|
6970
|
+
},
|
|
6971
|
+
"chunksize": {
|
|
6972
|
+
"char": "c",
|
|
6973
|
+
"description": "Number of records to add in a chunk before it is processed",
|
|
6974
|
+
"name": "chunksize",
|
|
6975
|
+
"default": 1000,
|
|
6976
|
+
"hasDynamicHelp": false,
|
|
6977
|
+
"multiple": false,
|
|
6978
|
+
"type": "option"
|
|
6979
|
+
},
|
|
6980
|
+
"polltimeout": {
|
|
6981
|
+
"char": "t",
|
|
6982
|
+
"description": "Timeout in MS for Bulk API calls",
|
|
6983
|
+
"name": "polltimeout",
|
|
6984
|
+
"default": 300000,
|
|
6985
|
+
"hasDynamicHelp": false,
|
|
6986
|
+
"multiple": false,
|
|
6987
|
+
"type": "option"
|
|
6988
|
+
},
|
|
6989
|
+
"startchunknumber": {
|
|
6990
|
+
"char": "s",
|
|
6991
|
+
"description": "Chunk number to start from",
|
|
6992
|
+
"name": "startchunknumber",
|
|
6993
|
+
"default": 0,
|
|
6934
6994
|
"hasDynamicHelp": false,
|
|
6935
6995
|
"multiple": false,
|
|
6936
6996
|
"type": "option"
|
|
6937
6997
|
},
|
|
6998
|
+
"resume": {
|
|
6999
|
+
"char": "r",
|
|
7000
|
+
"description": "Resume previous export by checking existing files (default in CI)",
|
|
7001
|
+
"name": "resume",
|
|
7002
|
+
"allowNo": false,
|
|
7003
|
+
"type": "boolean"
|
|
7004
|
+
},
|
|
6938
7005
|
"debug": {
|
|
6939
7006
|
"char": "d",
|
|
6940
7007
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6973,30 +7040,13 @@
|
|
|
6973
7040
|
},
|
|
6974
7041
|
"hasDynamicHelp": true,
|
|
6975
7042
|
"hiddenAliases": [],
|
|
6976
|
-
"id": "hardis:org:
|
|
7043
|
+
"id": "hardis:org:files:export",
|
|
6977
7044
|
"pluginAlias": "sfdx-hardis",
|
|
6978
7045
|
"pluginName": "sfdx-hardis",
|
|
6979
7046
|
"pluginType": "core",
|
|
6980
7047
|
"strict": true,
|
|
6981
7048
|
"enableJsonFlag": true,
|
|
6982
|
-
"title": "
|
|
6983
|
-
"allowedInactiveConnectedApps": [
|
|
6984
|
-
"Ant Migration Tool",
|
|
6985
|
-
"Chatter Desktop",
|
|
6986
|
-
"Chatter Mobile for BlackBerry",
|
|
6987
|
-
"Force.com IDE",
|
|
6988
|
-
"OIQ_Integration",
|
|
6989
|
-
"Salesforce CLI",
|
|
6990
|
-
"Salesforce Files",
|
|
6991
|
-
"Salesforce Mobile Dashboards",
|
|
6992
|
-
"Salesforce Touch",
|
|
6993
|
-
"Salesforce for Outlook",
|
|
6994
|
-
"SalesforceA",
|
|
6995
|
-
"SalesforceA for Android",
|
|
6996
|
-
"SalesforceA for iOS",
|
|
6997
|
-
"SalesforceDX Namespace Registry",
|
|
6998
|
-
"SalesforceIQ"
|
|
6999
|
-
],
|
|
7049
|
+
"title": "Export files",
|
|
7000
7050
|
"requiresProject": false,
|
|
7001
7051
|
"isESM": true,
|
|
7002
7052
|
"relativePath": [
|
|
@@ -7004,44 +7054,43 @@
|
|
|
7004
7054
|
"commands",
|
|
7005
7055
|
"hardis",
|
|
7006
7056
|
"org",
|
|
7007
|
-
"
|
|
7008
|
-
"
|
|
7057
|
+
"files",
|
|
7058
|
+
"export.js"
|
|
7009
7059
|
],
|
|
7010
7060
|
"aliasPermutations": [],
|
|
7011
7061
|
"permutations": [
|
|
7012
|
-
"hardis:org:
|
|
7013
|
-
"org:hardis:
|
|
7014
|
-
"org:
|
|
7015
|
-
"org:
|
|
7016
|
-
"hardis:
|
|
7017
|
-
"
|
|
7018
|
-
"
|
|
7019
|
-
"
|
|
7020
|
-
"hardis:
|
|
7021
|
-
"
|
|
7022
|
-
"
|
|
7023
|
-
"
|
|
7024
|
-
"hardis:org:
|
|
7025
|
-
"org:hardis:
|
|
7026
|
-
"org:
|
|
7027
|
-
"org:
|
|
7028
|
-
"hardis:
|
|
7029
|
-
"
|
|
7030
|
-
"
|
|
7031
|
-
"
|
|
7032
|
-
"hardis:
|
|
7033
|
-
"
|
|
7034
|
-
"
|
|
7035
|
-
"
|
|
7062
|
+
"hardis:org:files:export",
|
|
7063
|
+
"org:hardis:files:export",
|
|
7064
|
+
"org:files:hardis:export",
|
|
7065
|
+
"org:files:export:hardis",
|
|
7066
|
+
"hardis:files:org:export",
|
|
7067
|
+
"files:hardis:org:export",
|
|
7068
|
+
"files:org:hardis:export",
|
|
7069
|
+
"files:org:export:hardis",
|
|
7070
|
+
"hardis:files:export:org",
|
|
7071
|
+
"files:hardis:export:org",
|
|
7072
|
+
"files:export:hardis:org",
|
|
7073
|
+
"files:export:org:hardis",
|
|
7074
|
+
"hardis:org:export:files",
|
|
7075
|
+
"org:hardis:export:files",
|
|
7076
|
+
"org:export:hardis:files",
|
|
7077
|
+
"org:export:files:hardis",
|
|
7078
|
+
"hardis:export:org:files",
|
|
7079
|
+
"export:hardis:org:files",
|
|
7080
|
+
"export:org:hardis:files",
|
|
7081
|
+
"export:org:files:hardis",
|
|
7082
|
+
"hardis:export:files:org",
|
|
7083
|
+
"export:hardis:files:org",
|
|
7084
|
+
"export:files:hardis:org",
|
|
7085
|
+
"export:files:org:hardis"
|
|
7036
7086
|
]
|
|
7037
7087
|
},
|
|
7038
|
-
"hardis:org:
|
|
7088
|
+
"hardis:org:files:import": {
|
|
7039
7089
|
"aliases": [],
|
|
7040
7090
|
"args": {},
|
|
7041
|
-
"description": "\
|
|
7091
|
+
"description": "\nThis command facilitates the mass upload of files into Salesforce, allowing you to populate records with associated documents, images, or other file types. It's a crucial tool for data migration, content seeding, or synchronizing external file repositories with Salesforce.\n\nKey functionalities:\n\n- **Configuration-Driven Import:** Relies on an `export.json` file within a designated file export project (created using `sf hardis:org:configure:files`) to determine which files to import and how they should be associated with Salesforce records.\n- **Interactive Project Selection:** If the file import project path is not provided via the `--path` flag, it interactively prompts the user to select one.\n- **Overwrite Option:** The `--overwrite` flag allows you to replace existing files in Salesforce with local versions that have the same name. Be aware that this option doubles the number of API calls used.\n- **Support for ContentVersion and Attachment:** Handles both modern Salesforce Files (ContentVersion) and older Attachments.\n\nSee this article for how to export files, which is often a prerequisite for importing:\n\n[](https://nicolas.vuillamy.fr/how-to-mass-download-notes-and-attachments-files-from-a-salesforce-org-83a028824afd)\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **FilesImporter Class:** The core logic is encapsulated within the `FilesImporter` class, which orchestrates the entire import process.\n- **File System Scan:** Scans the local file system within the configured project directory to identify files for import.\n- **Salesforce API Interaction:** Uses Salesforce APIs (e.g., ContentVersion, Attachment) to upload files and associate them with records.\n- **Configuration Loading:** Reads the `export.json` file to get the import configuration, including SOQL queries to identify parent records for file association.\n- **Interactive Prompts:** Uses `selectFilesWorkspace` to allow the user to choose a file import project and `prompts` for confirming the overwrite behavior.\n- **Error Handling:** Includes mechanisms to handle potential errors during the import process, such as API limits or file upload failures.\n</details>\n",
|
|
7042
7092
|
"examples": [
|
|
7043
|
-
"$ sf hardis:org:
|
|
7044
|
-
"$ sf hardis:org:diagnose:unusedlicenses --fix"
|
|
7093
|
+
"$ sf hardis:org:files:import"
|
|
7045
7094
|
],
|
|
7046
7095
|
"flags": {
|
|
7047
7096
|
"json": {
|
|
@@ -7059,14 +7108,21 @@
|
|
|
7059
7108
|
"multiple": false,
|
|
7060
7109
|
"type": "option"
|
|
7061
7110
|
},
|
|
7062
|
-
"
|
|
7063
|
-
"char": "
|
|
7064
|
-
"description": "
|
|
7065
|
-
"name": "
|
|
7111
|
+
"path": {
|
|
7112
|
+
"char": "p",
|
|
7113
|
+
"description": "Path to the file export project",
|
|
7114
|
+
"name": "path",
|
|
7066
7115
|
"hasDynamicHelp": false,
|
|
7067
7116
|
"multiple": false,
|
|
7068
7117
|
"type": "option"
|
|
7069
7118
|
},
|
|
7119
|
+
"overwrite": {
|
|
7120
|
+
"char": "f",
|
|
7121
|
+
"description": "Override existing files (doubles the number of API calls)",
|
|
7122
|
+
"name": "overwrite",
|
|
7123
|
+
"allowNo": false,
|
|
7124
|
+
"type": "boolean"
|
|
7125
|
+
},
|
|
7070
7126
|
"debug": {
|
|
7071
7127
|
"char": "d",
|
|
7072
7128
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7105,79 +7161,58 @@
|
|
|
7105
7161
|
},
|
|
7106
7162
|
"hasDynamicHelp": true,
|
|
7107
7163
|
"hiddenAliases": [],
|
|
7108
|
-
"id": "hardis:org:
|
|
7164
|
+
"id": "hardis:org:files:import",
|
|
7109
7165
|
"pluginAlias": "sfdx-hardis",
|
|
7110
7166
|
"pluginName": "sfdx-hardis",
|
|
7111
7167
|
"pluginType": "core",
|
|
7112
7168
|
"strict": true,
|
|
7113
7169
|
"enableJsonFlag": true,
|
|
7114
|
-
"title": "
|
|
7170
|
+
"title": "Import files",
|
|
7115
7171
|
"requiresProject": false,
|
|
7116
|
-
"additionalPermissionSetsToAlwaysGet": [
|
|
7117
|
-
"Sales_User"
|
|
7118
|
-
],
|
|
7119
|
-
"permSetsPermSetLicenses": [
|
|
7120
|
-
{
|
|
7121
|
-
"permSet": "Sales_User",
|
|
7122
|
-
"permSetLicense": "SalesUserPsl"
|
|
7123
|
-
}
|
|
7124
|
-
],
|
|
7125
|
-
"profilesPermissionSetLicenses": [
|
|
7126
|
-
{
|
|
7127
|
-
"profile": "Salesforce API Only",
|
|
7128
|
-
"permSetLicense": "SalesforceAPIIntegrationPsl"
|
|
7129
|
-
}
|
|
7130
|
-
],
|
|
7131
|
-
"alwaysExcludeForActiveUsersPermissionSetLicenses": [
|
|
7132
|
-
"IdentityConnect"
|
|
7133
|
-
],
|
|
7134
7172
|
"isESM": true,
|
|
7135
7173
|
"relativePath": [
|
|
7136
7174
|
"lib",
|
|
7137
7175
|
"commands",
|
|
7138
7176
|
"hardis",
|
|
7139
7177
|
"org",
|
|
7140
|
-
"
|
|
7141
|
-
"
|
|
7178
|
+
"files",
|
|
7179
|
+
"import.js"
|
|
7142
7180
|
],
|
|
7143
7181
|
"aliasPermutations": [],
|
|
7144
7182
|
"permutations": [
|
|
7145
|
-
"hardis:org:
|
|
7146
|
-
"org:hardis:
|
|
7147
|
-
"org:
|
|
7148
|
-
"org:
|
|
7149
|
-
"hardis:
|
|
7150
|
-
"
|
|
7151
|
-
"
|
|
7152
|
-
"
|
|
7153
|
-
"hardis:
|
|
7154
|
-
"
|
|
7155
|
-
"
|
|
7156
|
-
"
|
|
7157
|
-
"hardis:org:
|
|
7158
|
-
"org:hardis:
|
|
7159
|
-
"org:
|
|
7160
|
-
"org:
|
|
7161
|
-
"hardis:
|
|
7162
|
-
"
|
|
7163
|
-
"
|
|
7164
|
-
"
|
|
7165
|
-
"hardis:
|
|
7166
|
-
"
|
|
7167
|
-
"
|
|
7168
|
-
"
|
|
7183
|
+
"hardis:org:files:import",
|
|
7184
|
+
"org:hardis:files:import",
|
|
7185
|
+
"org:files:hardis:import",
|
|
7186
|
+
"org:files:import:hardis",
|
|
7187
|
+
"hardis:files:org:import",
|
|
7188
|
+
"files:hardis:org:import",
|
|
7189
|
+
"files:org:hardis:import",
|
|
7190
|
+
"files:org:import:hardis",
|
|
7191
|
+
"hardis:files:import:org",
|
|
7192
|
+
"files:hardis:import:org",
|
|
7193
|
+
"files:import:hardis:org",
|
|
7194
|
+
"files:import:org:hardis",
|
|
7195
|
+
"hardis:org:import:files",
|
|
7196
|
+
"org:hardis:import:files",
|
|
7197
|
+
"org:import:hardis:files",
|
|
7198
|
+
"org:import:files:hardis",
|
|
7199
|
+
"hardis:import:org:files",
|
|
7200
|
+
"import:hardis:org:files",
|
|
7201
|
+
"import:org:hardis:files",
|
|
7202
|
+
"import:org:files:hardis",
|
|
7203
|
+
"hardis:import:files:org",
|
|
7204
|
+
"import:hardis:files:org",
|
|
7205
|
+
"import:files:hardis:org",
|
|
7206
|
+
"import:files:org:hardis"
|
|
7169
7207
|
]
|
|
7170
7208
|
},
|
|
7171
|
-
"hardis:org:
|
|
7209
|
+
"hardis:org:fix:listviewmine": {
|
|
7172
7210
|
"aliases": [],
|
|
7173
7211
|
"args": {},
|
|
7174
|
-
"description": "
|
|
7212
|
+
"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",
|
|
7175
7213
|
"examples": [
|
|
7176
|
-
"$ sf hardis:org:
|
|
7177
|
-
"$ sf hardis:org:
|
|
7178
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm",
|
|
7179
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licenseidentifiers SFDC,AUL,AUL1",
|
|
7180
|
-
"$ sf hardis:org:diagnose:unusedusers --days 60 --licensetypes all-crm --returnactiveusers"
|
|
7214
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
7215
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
7181
7216
|
],
|
|
7182
7217
|
"flags": {
|
|
7183
7218
|
"json": {
|
|
@@ -7195,49 +7230,14 @@
|
|
|
7195
7230
|
"multiple": false,
|
|
7196
7231
|
"type": "option"
|
|
7197
7232
|
},
|
|
7198
|
-
"
|
|
7199
|
-
"char": "f",
|
|
7200
|
-
"description": "Force the path and name of output report file. Must end with .csv",
|
|
7201
|
-
"name": "outputfile",
|
|
7202
|
-
"hasDynamicHelp": false,
|
|
7203
|
-
"multiple": false,
|
|
7204
|
-
"type": "option"
|
|
7205
|
-
},
|
|
7206
|
-
"days": {
|
|
7207
|
-
"char": "t",
|
|
7208
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
7209
|
-
"name": "days",
|
|
7210
|
-
"hasDynamicHelp": false,
|
|
7211
|
-
"multiple": false,
|
|
7212
|
-
"type": "option"
|
|
7213
|
-
},
|
|
7214
|
-
"licensetypes": {
|
|
7233
|
+
"listviews": {
|
|
7215
7234
|
"char": "l",
|
|
7216
|
-
"description": "
|
|
7217
|
-
"name": "
|
|
7218
|
-
"hasDynamicHelp": false,
|
|
7219
|
-
"multiple": false,
|
|
7220
|
-
"options": [
|
|
7221
|
-
"all",
|
|
7222
|
-
"all-crm",
|
|
7223
|
-
"all-paying"
|
|
7224
|
-
],
|
|
7225
|
-
"type": "option"
|
|
7226
|
-
},
|
|
7227
|
-
"licenseidentifiers": {
|
|
7228
|
-
"char": "i",
|
|
7229
|
-
"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",
|
|
7230
|
-
"name": "licenseidentifiers",
|
|
7235
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
7236
|
+
"name": "listviews",
|
|
7231
7237
|
"hasDynamicHelp": false,
|
|
7232
7238
|
"multiple": false,
|
|
7233
7239
|
"type": "option"
|
|
7234
7240
|
},
|
|
7235
|
-
"returnactiveusers": {
|
|
7236
|
-
"description": "Inverts the command by returning the active users",
|
|
7237
|
-
"name": "returnactiveusers",
|
|
7238
|
-
"allowNo": false,
|
|
7239
|
-
"type": "boolean"
|
|
7240
|
-
},
|
|
7241
7241
|
"debug": {
|
|
7242
7242
|
"char": "d",
|
|
7243
7243
|
"description": "Activate debug mode (more logs)",
|
|
@@ -7276,49 +7276,49 @@
|
|
|
7276
7276
|
},
|
|
7277
7277
|
"hasDynamicHelp": true,
|
|
7278
7278
|
"hiddenAliases": [],
|
|
7279
|
-
"id": "hardis:org:
|
|
7279
|
+
"id": "hardis:org:fix:listviewmine",
|
|
7280
7280
|
"pluginAlias": "sfdx-hardis",
|
|
7281
7281
|
"pluginName": "sfdx-hardis",
|
|
7282
7282
|
"pluginType": "core",
|
|
7283
7283
|
"strict": true,
|
|
7284
7284
|
"enableJsonFlag": true,
|
|
7285
|
-
"title": "
|
|
7286
|
-
"requiresProject":
|
|
7285
|
+
"title": "Fix listviews with ",
|
|
7286
|
+
"requiresProject": true,
|
|
7287
7287
|
"isESM": true,
|
|
7288
7288
|
"relativePath": [
|
|
7289
7289
|
"lib",
|
|
7290
7290
|
"commands",
|
|
7291
7291
|
"hardis",
|
|
7292
7292
|
"org",
|
|
7293
|
-
"
|
|
7294
|
-
"
|
|
7293
|
+
"fix",
|
|
7294
|
+
"listviewmine.js"
|
|
7295
7295
|
],
|
|
7296
7296
|
"aliasPermutations": [],
|
|
7297
7297
|
"permutations": [
|
|
7298
|
-
"hardis:org:
|
|
7299
|
-
"org:hardis:
|
|
7300
|
-
"org:
|
|
7301
|
-
"org:
|
|
7302
|
-
"hardis:
|
|
7303
|
-
"
|
|
7304
|
-
"
|
|
7305
|
-
"
|
|
7306
|
-
"hardis:
|
|
7307
|
-
"
|
|
7308
|
-
"
|
|
7309
|
-
"
|
|
7310
|
-
"hardis:org:
|
|
7311
|
-
"org:hardis:
|
|
7312
|
-
"org:
|
|
7313
|
-
"org:
|
|
7314
|
-
"hardis:
|
|
7315
|
-
"
|
|
7316
|
-
"
|
|
7317
|
-
"
|
|
7318
|
-
"hardis:
|
|
7319
|
-
"
|
|
7320
|
-
"
|
|
7321
|
-
"
|
|
7298
|
+
"hardis:org:fix:listviewmine",
|
|
7299
|
+
"org:hardis:fix:listviewmine",
|
|
7300
|
+
"org:fix:hardis:listviewmine",
|
|
7301
|
+
"org:fix:listviewmine:hardis",
|
|
7302
|
+
"hardis:fix:org:listviewmine",
|
|
7303
|
+
"fix:hardis:org:listviewmine",
|
|
7304
|
+
"fix:org:hardis:listviewmine",
|
|
7305
|
+
"fix:org:listviewmine:hardis",
|
|
7306
|
+
"hardis:fix:listviewmine:org",
|
|
7307
|
+
"fix:hardis:listviewmine:org",
|
|
7308
|
+
"fix:listviewmine:hardis:org",
|
|
7309
|
+
"fix:listviewmine:org:hardis",
|
|
7310
|
+
"hardis:org:listviewmine:fix",
|
|
7311
|
+
"org:hardis:listviewmine:fix",
|
|
7312
|
+
"org:listviewmine:hardis:fix",
|
|
7313
|
+
"org:listviewmine:fix:hardis",
|
|
7314
|
+
"hardis:listviewmine:org:fix",
|
|
7315
|
+
"listviewmine:hardis:org:fix",
|
|
7316
|
+
"listviewmine:org:hardis:fix",
|
|
7317
|
+
"listviewmine:org:fix:hardis",
|
|
7318
|
+
"hardis:listviewmine:fix:org",
|
|
7319
|
+
"listviewmine:hardis:fix:org",
|
|
7320
|
+
"listviewmine:fix:hardis:org",
|
|
7321
|
+
"listviewmine:fix:org:hardis"
|
|
7322
7322
|
]
|
|
7323
7323
|
},
|
|
7324
7324
|
"hardis:org:generate:packagexmlfull": {
|
|
@@ -9913,262 +9913,30 @@
|
|
|
9913
9913
|
],
|
|
9914
9914
|
"aliasPermutations": [],
|
|
9915
9915
|
"permutations": [
|
|
9916
|
-
"hardis:project:audit:remotesites",
|
|
9917
|
-
"project:hardis:audit:remotesites",
|
|
9918
|
-
"project:audit:hardis:remotesites",
|
|
9919
|
-
"project:audit:remotesites:hardis",
|
|
9920
|
-
"hardis:audit:project:remotesites",
|
|
9921
|
-
"audit:hardis:project:remotesites",
|
|
9922
|
-
"audit:project:hardis:remotesites",
|
|
9923
|
-
"audit:project:remotesites:hardis",
|
|
9924
|
-
"hardis:audit:remotesites:project",
|
|
9925
|
-
"audit:hardis:remotesites:project",
|
|
9926
|
-
"audit:remotesites:hardis:project",
|
|
9927
|
-
"audit:remotesites:project:hardis",
|
|
9928
|
-
"hardis:project:remotesites:audit",
|
|
9929
|
-
"project:hardis:remotesites:audit",
|
|
9930
|
-
"project:remotesites:hardis:audit",
|
|
9931
|
-
"project:remotesites:audit:hardis",
|
|
9932
|
-
"hardis:remotesites:project:audit",
|
|
9933
|
-
"remotesites:hardis:project:audit",
|
|
9934
|
-
"remotesites:project:hardis:audit",
|
|
9935
|
-
"remotesites:project:audit:hardis",
|
|
9936
|
-
"hardis:remotesites:audit:project",
|
|
9937
|
-
"remotesites:hardis:audit:project",
|
|
9938
|
-
"remotesites:audit:hardis:project",
|
|
9939
|
-
"remotesites:audit:project:hardis"
|
|
9940
|
-
]
|
|
9941
|
-
},
|
|
9942
|
-
"hardis:project:configure:auth": {
|
|
9943
|
-
"aliases": [],
|
|
9944
|
-
"args": {},
|
|
9945
|
-
"description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
|
|
9946
|
-
"examples": [
|
|
9947
|
-
"$ sf hardis:project:configure:auth"
|
|
9948
|
-
],
|
|
9949
|
-
"flags": {
|
|
9950
|
-
"json": {
|
|
9951
|
-
"description": "Format output as json.",
|
|
9952
|
-
"helpGroup": "GLOBAL",
|
|
9953
|
-
"name": "json",
|
|
9954
|
-
"allowNo": false,
|
|
9955
|
-
"type": "boolean"
|
|
9956
|
-
},
|
|
9957
|
-
"flags-dir": {
|
|
9958
|
-
"helpGroup": "GLOBAL",
|
|
9959
|
-
"name": "flags-dir",
|
|
9960
|
-
"summary": "Import flag values from a directory.",
|
|
9961
|
-
"hasDynamicHelp": false,
|
|
9962
|
-
"multiple": false,
|
|
9963
|
-
"type": "option"
|
|
9964
|
-
},
|
|
9965
|
-
"devhub": {
|
|
9966
|
-
"char": "b",
|
|
9967
|
-
"description": "Configure project DevHub",
|
|
9968
|
-
"name": "devhub",
|
|
9969
|
-
"allowNo": false,
|
|
9970
|
-
"type": "boolean"
|
|
9971
|
-
},
|
|
9972
|
-
"debug": {
|
|
9973
|
-
"char": "d",
|
|
9974
|
-
"description": "Activate debug mode (more logs)",
|
|
9975
|
-
"name": "debug",
|
|
9976
|
-
"allowNo": false,
|
|
9977
|
-
"type": "boolean"
|
|
9978
|
-
},
|
|
9979
|
-
"websocket": {
|
|
9980
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9981
|
-
"name": "websocket",
|
|
9982
|
-
"hasDynamicHelp": false,
|
|
9983
|
-
"multiple": false,
|
|
9984
|
-
"type": "option"
|
|
9985
|
-
},
|
|
9986
|
-
"skipauth": {
|
|
9987
|
-
"description": "Skip authentication check when a default username is required",
|
|
9988
|
-
"name": "skipauth",
|
|
9989
|
-
"allowNo": false,
|
|
9990
|
-
"type": "boolean"
|
|
9991
|
-
},
|
|
9992
|
-
"target-org": {
|
|
9993
|
-
"aliases": [
|
|
9994
|
-
"targetusername",
|
|
9995
|
-
"u"
|
|
9996
|
-
],
|
|
9997
|
-
"char": "o",
|
|
9998
|
-
"deprecateAliases": true,
|
|
9999
|
-
"name": "target-org",
|
|
10000
|
-
"noCacheDefault": true,
|
|
10001
|
-
"summary": "Username or alias of the target org.",
|
|
10002
|
-
"hasDynamicHelp": true,
|
|
10003
|
-
"multiple": false,
|
|
10004
|
-
"type": "option"
|
|
10005
|
-
},
|
|
10006
|
-
"target-dev-hub": {
|
|
10007
|
-
"aliases": [
|
|
10008
|
-
"targetdevhubusername"
|
|
10009
|
-
],
|
|
10010
|
-
"char": "v",
|
|
10011
|
-
"deprecateAliases": true,
|
|
10012
|
-
"name": "target-dev-hub",
|
|
10013
|
-
"noCacheDefault": true,
|
|
10014
|
-
"required": false,
|
|
10015
|
-
"summary": "Username or alias of the Dev Hub org.",
|
|
10016
|
-
"hasDynamicHelp": true,
|
|
10017
|
-
"multiple": false,
|
|
10018
|
-
"type": "option"
|
|
10019
|
-
}
|
|
10020
|
-
},
|
|
10021
|
-
"hasDynamicHelp": true,
|
|
10022
|
-
"hiddenAliases": [],
|
|
10023
|
-
"id": "hardis:project:configure:auth",
|
|
10024
|
-
"pluginAlias": "sfdx-hardis",
|
|
10025
|
-
"pluginName": "sfdx-hardis",
|
|
10026
|
-
"pluginType": "core",
|
|
10027
|
-
"strict": true,
|
|
10028
|
-
"enableJsonFlag": true,
|
|
10029
|
-
"title": "Configure authentication",
|
|
10030
|
-
"requiresProject": false,
|
|
10031
|
-
"requiresDependencies": [
|
|
10032
|
-
"openssl"
|
|
10033
|
-
],
|
|
10034
|
-
"isESM": true,
|
|
10035
|
-
"relativePath": [
|
|
10036
|
-
"lib",
|
|
10037
|
-
"commands",
|
|
10038
|
-
"hardis",
|
|
10039
|
-
"project",
|
|
10040
|
-
"configure",
|
|
10041
|
-
"auth.js"
|
|
10042
|
-
],
|
|
10043
|
-
"aliasPermutations": [],
|
|
10044
|
-
"permutations": [
|
|
10045
|
-
"hardis:project:configure:auth",
|
|
10046
|
-
"project:hardis:configure:auth",
|
|
10047
|
-
"project:configure:hardis:auth",
|
|
10048
|
-
"project:configure:auth:hardis",
|
|
10049
|
-
"hardis:configure:project:auth",
|
|
10050
|
-
"configure:hardis:project:auth",
|
|
10051
|
-
"configure:project:hardis:auth",
|
|
10052
|
-
"configure:project:auth:hardis",
|
|
10053
|
-
"hardis:configure:auth:project",
|
|
10054
|
-
"configure:hardis:auth:project",
|
|
10055
|
-
"configure:auth:hardis:project",
|
|
10056
|
-
"configure:auth:project:hardis",
|
|
10057
|
-
"hardis:project:auth:configure",
|
|
10058
|
-
"project:hardis:auth:configure",
|
|
10059
|
-
"project:auth:hardis:configure",
|
|
10060
|
-
"project:auth:configure:hardis",
|
|
10061
|
-
"hardis:auth:project:configure",
|
|
10062
|
-
"auth:hardis:project:configure",
|
|
10063
|
-
"auth:project:hardis:configure",
|
|
10064
|
-
"auth:project:configure:hardis",
|
|
10065
|
-
"hardis:auth:configure:project",
|
|
10066
|
-
"auth:hardis:configure:project",
|
|
10067
|
-
"auth:configure:hardis:project",
|
|
10068
|
-
"auth:configure:project:hardis"
|
|
10069
|
-
]
|
|
10070
|
-
},
|
|
10071
|
-
"hardis:project:convert:profilestopermsets": {
|
|
10072
|
-
"aliases": [],
|
|
10073
|
-
"args": {},
|
|
10074
|
-
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
10075
|
-
"examples": [
|
|
10076
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
10077
|
-
],
|
|
10078
|
-
"flags": {
|
|
10079
|
-
"json": {
|
|
10080
|
-
"description": "Format output as json.",
|
|
10081
|
-
"helpGroup": "GLOBAL",
|
|
10082
|
-
"name": "json",
|
|
10083
|
-
"allowNo": false,
|
|
10084
|
-
"type": "boolean"
|
|
10085
|
-
},
|
|
10086
|
-
"flags-dir": {
|
|
10087
|
-
"helpGroup": "GLOBAL",
|
|
10088
|
-
"name": "flags-dir",
|
|
10089
|
-
"summary": "Import flag values from a directory.",
|
|
10090
|
-
"hasDynamicHelp": false,
|
|
10091
|
-
"multiple": false,
|
|
10092
|
-
"type": "option"
|
|
10093
|
-
},
|
|
10094
|
-
"except": {
|
|
10095
|
-
"char": "e",
|
|
10096
|
-
"description": "List of filters",
|
|
10097
|
-
"name": "except",
|
|
10098
|
-
"default": [],
|
|
10099
|
-
"hasDynamicHelp": false,
|
|
10100
|
-
"multiple": true,
|
|
10101
|
-
"type": "option"
|
|
10102
|
-
},
|
|
10103
|
-
"debug": {
|
|
10104
|
-
"char": "d",
|
|
10105
|
-
"description": "Activate debug mode (more logs)",
|
|
10106
|
-
"name": "debug",
|
|
10107
|
-
"allowNo": false,
|
|
10108
|
-
"type": "boolean"
|
|
10109
|
-
},
|
|
10110
|
-
"websocket": {
|
|
10111
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
10112
|
-
"name": "websocket",
|
|
10113
|
-
"hasDynamicHelp": false,
|
|
10114
|
-
"multiple": false,
|
|
10115
|
-
"type": "option"
|
|
10116
|
-
},
|
|
10117
|
-
"skipauth": {
|
|
10118
|
-
"description": "Skip authentication check when a default username is required",
|
|
10119
|
-
"name": "skipauth",
|
|
10120
|
-
"allowNo": false,
|
|
10121
|
-
"type": "boolean"
|
|
10122
|
-
}
|
|
10123
|
-
},
|
|
10124
|
-
"hasDynamicHelp": false,
|
|
10125
|
-
"hiddenAliases": [],
|
|
10126
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
10127
|
-
"pluginAlias": "sfdx-hardis",
|
|
10128
|
-
"pluginName": "sfdx-hardis",
|
|
10129
|
-
"pluginType": "core",
|
|
10130
|
-
"strict": true,
|
|
10131
|
-
"enableJsonFlag": true,
|
|
10132
|
-
"title": "Convert Profiles into Permission Sets",
|
|
10133
|
-
"requiresProject": true,
|
|
10134
|
-
"requiresSfdxPlugins": [
|
|
10135
|
-
"shane-sfdx-plugins"
|
|
10136
|
-
],
|
|
10137
|
-
"isESM": true,
|
|
10138
|
-
"relativePath": [
|
|
10139
|
-
"lib",
|
|
10140
|
-
"commands",
|
|
10141
|
-
"hardis",
|
|
10142
|
-
"project",
|
|
10143
|
-
"convert",
|
|
10144
|
-
"profilestopermsets.js"
|
|
10145
|
-
],
|
|
10146
|
-
"aliasPermutations": [],
|
|
10147
|
-
"permutations": [
|
|
10148
|
-
"hardis:project:convert:profilestopermsets",
|
|
10149
|
-
"project:hardis:convert:profilestopermsets",
|
|
10150
|
-
"project:convert:hardis:profilestopermsets",
|
|
10151
|
-
"project:convert:profilestopermsets:hardis",
|
|
10152
|
-
"hardis:convert:project:profilestopermsets",
|
|
10153
|
-
"convert:hardis:project:profilestopermsets",
|
|
10154
|
-
"convert:project:hardis:profilestopermsets",
|
|
10155
|
-
"convert:project:profilestopermsets:hardis",
|
|
10156
|
-
"hardis:convert:profilestopermsets:project",
|
|
10157
|
-
"convert:hardis:profilestopermsets:project",
|
|
10158
|
-
"convert:profilestopermsets:hardis:project",
|
|
10159
|
-
"convert:profilestopermsets:project:hardis",
|
|
10160
|
-
"hardis:project:profilestopermsets:convert",
|
|
10161
|
-
"project:hardis:profilestopermsets:convert",
|
|
10162
|
-
"project:profilestopermsets:hardis:convert",
|
|
10163
|
-
"project:profilestopermsets:convert:hardis",
|
|
10164
|
-
"hardis:profilestopermsets:project:convert",
|
|
10165
|
-
"profilestopermsets:hardis:project:convert",
|
|
10166
|
-
"profilestopermsets:project:hardis:convert",
|
|
10167
|
-
"profilestopermsets:project:convert:hardis",
|
|
10168
|
-
"hardis:profilestopermsets:convert:project",
|
|
10169
|
-
"profilestopermsets:hardis:convert:project",
|
|
10170
|
-
"profilestopermsets:convert:hardis:project",
|
|
10171
|
-
"profilestopermsets:convert:project:hardis"
|
|
9916
|
+
"hardis:project:audit:remotesites",
|
|
9917
|
+
"project:hardis:audit:remotesites",
|
|
9918
|
+
"project:audit:hardis:remotesites",
|
|
9919
|
+
"project:audit:remotesites:hardis",
|
|
9920
|
+
"hardis:audit:project:remotesites",
|
|
9921
|
+
"audit:hardis:project:remotesites",
|
|
9922
|
+
"audit:project:hardis:remotesites",
|
|
9923
|
+
"audit:project:remotesites:hardis",
|
|
9924
|
+
"hardis:audit:remotesites:project",
|
|
9925
|
+
"audit:hardis:remotesites:project",
|
|
9926
|
+
"audit:remotesites:hardis:project",
|
|
9927
|
+
"audit:remotesites:project:hardis",
|
|
9928
|
+
"hardis:project:remotesites:audit",
|
|
9929
|
+
"project:hardis:remotesites:audit",
|
|
9930
|
+
"project:remotesites:hardis:audit",
|
|
9931
|
+
"project:remotesites:audit:hardis",
|
|
9932
|
+
"hardis:remotesites:project:audit",
|
|
9933
|
+
"remotesites:hardis:project:audit",
|
|
9934
|
+
"remotesites:project:hardis:audit",
|
|
9935
|
+
"remotesites:project:audit:hardis",
|
|
9936
|
+
"hardis:remotesites:audit:project",
|
|
9937
|
+
"remotesites:hardis:audit:project",
|
|
9938
|
+
"remotesites:audit:hardis:project",
|
|
9939
|
+
"remotesites:audit:project:hardis"
|
|
10172
9940
|
]
|
|
10173
9941
|
},
|
|
10174
9942
|
"hardis:project:clean:emptyitems": {
|
|
@@ -11757,6 +11525,238 @@
|
|
|
11757
11525
|
"xml:clean:project:hardis"
|
|
11758
11526
|
]
|
|
11759
11527
|
},
|
|
11528
|
+
"hardis:project:configure:auth": {
|
|
11529
|
+
"aliases": [],
|
|
11530
|
+
"args": {},
|
|
11531
|
+
"description": "\n## Command Behavior\n\n**Configures authentication between a Git branch and a target Salesforce org for CI/CD deployments.**\n\nThis command facilitates the setup of automated CI/CD pipelines, enabling seamless deployments from specific Git branches to designated Salesforce orgs. It supports both standard Salesforce orgs and Dev Hub configurations, catering to various enterprise deployment workflows.\n\nKey functionalities include:\n\n- **Org Selection/Login:** Guides the user to select an existing Salesforce org or log in to a new one.\n- **Git Branch Association:** Allows associating a specific Git branch with the chosen Salesforce org.\n- **Merge Target Definition:** Enables defining target Git branches into which the configured branch can merge, ensuring controlled deployment flows.\n- **Salesforce Username Configuration:** Prompts for the Salesforce username to be used by the CI server for deployments.\n- **SSL Certificate Generation:** Automatically generates an SSL certificate for secure authentication.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's implementation involves several key technical aspects:\n\n- **SF CLI Integration:** Utilizes \n@salesforce/sf-plugins-core\n for command structure and flag parsing.\n- **Interactive Prompts:** Employs the \nprompts\n library for interactive user input, guiding the configuration process.\n- **Git Integration:** Interacts with Git to retrieve branch information using \n`git().branch([\"--list\", \"-r\"])`\n.\n- **Configuration Management:** Leverages internal utilities (`checkConfig`, `getConfig`, `setConfig`, `setInConfigFile`) to read from and write to project-specific configuration files (e.g., `.sfdx-hardis.<branchName>.yml`).\n- **Salesforce CLI Execution:** Executes Salesforce CLI commands programmatically via `execSfdxJson` for org interactions.\n- **SSL Certificate Generation:** Calls `generateSSLCertificate` to create necessary SSL certificates for JWT-based authentication.\n- **WebSocket Communication:** Uses `WebSocketClient` for potential communication with external tools or processes, such as restarting the command in VS Code.\n- **Dependency Check:** Ensures the presence of `openssl` on the system, which is required for SSL certificate generation.\n",
|
|
11532
|
+
"examples": [
|
|
11533
|
+
"$ sf hardis:project:configure:auth"
|
|
11534
|
+
],
|
|
11535
|
+
"flags": {
|
|
11536
|
+
"json": {
|
|
11537
|
+
"description": "Format output as json.",
|
|
11538
|
+
"helpGroup": "GLOBAL",
|
|
11539
|
+
"name": "json",
|
|
11540
|
+
"allowNo": false,
|
|
11541
|
+
"type": "boolean"
|
|
11542
|
+
},
|
|
11543
|
+
"flags-dir": {
|
|
11544
|
+
"helpGroup": "GLOBAL",
|
|
11545
|
+
"name": "flags-dir",
|
|
11546
|
+
"summary": "Import flag values from a directory.",
|
|
11547
|
+
"hasDynamicHelp": false,
|
|
11548
|
+
"multiple": false,
|
|
11549
|
+
"type": "option"
|
|
11550
|
+
},
|
|
11551
|
+
"devhub": {
|
|
11552
|
+
"char": "b",
|
|
11553
|
+
"description": "Configure project DevHub",
|
|
11554
|
+
"name": "devhub",
|
|
11555
|
+
"allowNo": false,
|
|
11556
|
+
"type": "boolean"
|
|
11557
|
+
},
|
|
11558
|
+
"debug": {
|
|
11559
|
+
"char": "d",
|
|
11560
|
+
"description": "Activate debug mode (more logs)",
|
|
11561
|
+
"name": "debug",
|
|
11562
|
+
"allowNo": false,
|
|
11563
|
+
"type": "boolean"
|
|
11564
|
+
},
|
|
11565
|
+
"websocket": {
|
|
11566
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11567
|
+
"name": "websocket",
|
|
11568
|
+
"hasDynamicHelp": false,
|
|
11569
|
+
"multiple": false,
|
|
11570
|
+
"type": "option"
|
|
11571
|
+
},
|
|
11572
|
+
"skipauth": {
|
|
11573
|
+
"description": "Skip authentication check when a default username is required",
|
|
11574
|
+
"name": "skipauth",
|
|
11575
|
+
"allowNo": false,
|
|
11576
|
+
"type": "boolean"
|
|
11577
|
+
},
|
|
11578
|
+
"target-org": {
|
|
11579
|
+
"aliases": [
|
|
11580
|
+
"targetusername",
|
|
11581
|
+
"u"
|
|
11582
|
+
],
|
|
11583
|
+
"char": "o",
|
|
11584
|
+
"deprecateAliases": true,
|
|
11585
|
+
"name": "target-org",
|
|
11586
|
+
"noCacheDefault": true,
|
|
11587
|
+
"summary": "Username or alias of the target org.",
|
|
11588
|
+
"hasDynamicHelp": true,
|
|
11589
|
+
"multiple": false,
|
|
11590
|
+
"type": "option"
|
|
11591
|
+
},
|
|
11592
|
+
"target-dev-hub": {
|
|
11593
|
+
"aliases": [
|
|
11594
|
+
"targetdevhubusername"
|
|
11595
|
+
],
|
|
11596
|
+
"char": "v",
|
|
11597
|
+
"deprecateAliases": true,
|
|
11598
|
+
"name": "target-dev-hub",
|
|
11599
|
+
"noCacheDefault": true,
|
|
11600
|
+
"required": false,
|
|
11601
|
+
"summary": "Username or alias of the Dev Hub org.",
|
|
11602
|
+
"hasDynamicHelp": true,
|
|
11603
|
+
"multiple": false,
|
|
11604
|
+
"type": "option"
|
|
11605
|
+
}
|
|
11606
|
+
},
|
|
11607
|
+
"hasDynamicHelp": true,
|
|
11608
|
+
"hiddenAliases": [],
|
|
11609
|
+
"id": "hardis:project:configure:auth",
|
|
11610
|
+
"pluginAlias": "sfdx-hardis",
|
|
11611
|
+
"pluginName": "sfdx-hardis",
|
|
11612
|
+
"pluginType": "core",
|
|
11613
|
+
"strict": true,
|
|
11614
|
+
"enableJsonFlag": true,
|
|
11615
|
+
"title": "Configure authentication",
|
|
11616
|
+
"requiresProject": false,
|
|
11617
|
+
"requiresDependencies": [
|
|
11618
|
+
"openssl"
|
|
11619
|
+
],
|
|
11620
|
+
"isESM": true,
|
|
11621
|
+
"relativePath": [
|
|
11622
|
+
"lib",
|
|
11623
|
+
"commands",
|
|
11624
|
+
"hardis",
|
|
11625
|
+
"project",
|
|
11626
|
+
"configure",
|
|
11627
|
+
"auth.js"
|
|
11628
|
+
],
|
|
11629
|
+
"aliasPermutations": [],
|
|
11630
|
+
"permutations": [
|
|
11631
|
+
"hardis:project:configure:auth",
|
|
11632
|
+
"project:hardis:configure:auth",
|
|
11633
|
+
"project:configure:hardis:auth",
|
|
11634
|
+
"project:configure:auth:hardis",
|
|
11635
|
+
"hardis:configure:project:auth",
|
|
11636
|
+
"configure:hardis:project:auth",
|
|
11637
|
+
"configure:project:hardis:auth",
|
|
11638
|
+
"configure:project:auth:hardis",
|
|
11639
|
+
"hardis:configure:auth:project",
|
|
11640
|
+
"configure:hardis:auth:project",
|
|
11641
|
+
"configure:auth:hardis:project",
|
|
11642
|
+
"configure:auth:project:hardis",
|
|
11643
|
+
"hardis:project:auth:configure",
|
|
11644
|
+
"project:hardis:auth:configure",
|
|
11645
|
+
"project:auth:hardis:configure",
|
|
11646
|
+
"project:auth:configure:hardis",
|
|
11647
|
+
"hardis:auth:project:configure",
|
|
11648
|
+
"auth:hardis:project:configure",
|
|
11649
|
+
"auth:project:hardis:configure",
|
|
11650
|
+
"auth:project:configure:hardis",
|
|
11651
|
+
"hardis:auth:configure:project",
|
|
11652
|
+
"auth:hardis:configure:project",
|
|
11653
|
+
"auth:configure:hardis:project",
|
|
11654
|
+
"auth:configure:project:hardis"
|
|
11655
|
+
]
|
|
11656
|
+
},
|
|
11657
|
+
"hardis:project:convert:profilestopermsets": {
|
|
11658
|
+
"aliases": [],
|
|
11659
|
+
"args": {},
|
|
11660
|
+
"description": "\n## Command Behavior\n\n**Converts existing Salesforce Profiles into Permission Sets, facilitating a more granular and recommended security model.**\n\nThis command helps in migrating permissions from Profiles to Permission Sets, which is a best practice for managing user access in Salesforce. It creates a new Permission Set for each specified Profile, adopting a naming convention of `PS_PROFILENAME`.\n\nKey functionalities:\n\n- **Profile to Permission Set Conversion:** Automatically extracts permissions from a Profile and creates a corresponding Permission Set.\n- **Naming Convention:** New Permission Sets are named with a `PS_` prefix followed by the Profile name (e.g., `PS_Standard_User`).\n- **Exclusion Filter:** Allows you to exclude specific Profiles from the conversion process using the `--except` flag.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **External Plugin Integration:** It relies on the `shane-sfdx-plugins` (specifically the `sf shane:profile:convert` command) to perform the actual conversion.\n- **File System Scan:** It reads the contents of the `force-app/main/default/profiles` directory to identify all available Profile metadata files.\n- **Command Execution:** For each identified Profile (that is not excluded), it constructs and executes the `sf shane:profile:convert` command with the appropriate Profile name and desired Permission Set name.\n- **Error Handling:** Includes basic error handling for the external command execution.\n</details>\n",
|
|
11661
|
+
"examples": [
|
|
11662
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
11663
|
+
],
|
|
11664
|
+
"flags": {
|
|
11665
|
+
"json": {
|
|
11666
|
+
"description": "Format output as json.",
|
|
11667
|
+
"helpGroup": "GLOBAL",
|
|
11668
|
+
"name": "json",
|
|
11669
|
+
"allowNo": false,
|
|
11670
|
+
"type": "boolean"
|
|
11671
|
+
},
|
|
11672
|
+
"flags-dir": {
|
|
11673
|
+
"helpGroup": "GLOBAL",
|
|
11674
|
+
"name": "flags-dir",
|
|
11675
|
+
"summary": "Import flag values from a directory.",
|
|
11676
|
+
"hasDynamicHelp": false,
|
|
11677
|
+
"multiple": false,
|
|
11678
|
+
"type": "option"
|
|
11679
|
+
},
|
|
11680
|
+
"except": {
|
|
11681
|
+
"char": "e",
|
|
11682
|
+
"description": "List of filters",
|
|
11683
|
+
"name": "except",
|
|
11684
|
+
"default": [],
|
|
11685
|
+
"hasDynamicHelp": false,
|
|
11686
|
+
"multiple": true,
|
|
11687
|
+
"type": "option"
|
|
11688
|
+
},
|
|
11689
|
+
"debug": {
|
|
11690
|
+
"char": "d",
|
|
11691
|
+
"description": "Activate debug mode (more logs)",
|
|
11692
|
+
"name": "debug",
|
|
11693
|
+
"allowNo": false,
|
|
11694
|
+
"type": "boolean"
|
|
11695
|
+
},
|
|
11696
|
+
"websocket": {
|
|
11697
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11698
|
+
"name": "websocket",
|
|
11699
|
+
"hasDynamicHelp": false,
|
|
11700
|
+
"multiple": false,
|
|
11701
|
+
"type": "option"
|
|
11702
|
+
},
|
|
11703
|
+
"skipauth": {
|
|
11704
|
+
"description": "Skip authentication check when a default username is required",
|
|
11705
|
+
"name": "skipauth",
|
|
11706
|
+
"allowNo": false,
|
|
11707
|
+
"type": "boolean"
|
|
11708
|
+
}
|
|
11709
|
+
},
|
|
11710
|
+
"hasDynamicHelp": false,
|
|
11711
|
+
"hiddenAliases": [],
|
|
11712
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
11713
|
+
"pluginAlias": "sfdx-hardis",
|
|
11714
|
+
"pluginName": "sfdx-hardis",
|
|
11715
|
+
"pluginType": "core",
|
|
11716
|
+
"strict": true,
|
|
11717
|
+
"enableJsonFlag": true,
|
|
11718
|
+
"title": "Convert Profiles into Permission Sets",
|
|
11719
|
+
"requiresProject": true,
|
|
11720
|
+
"requiresSfdxPlugins": [
|
|
11721
|
+
"shane-sfdx-plugins"
|
|
11722
|
+
],
|
|
11723
|
+
"isESM": true,
|
|
11724
|
+
"relativePath": [
|
|
11725
|
+
"lib",
|
|
11726
|
+
"commands",
|
|
11727
|
+
"hardis",
|
|
11728
|
+
"project",
|
|
11729
|
+
"convert",
|
|
11730
|
+
"profilestopermsets.js"
|
|
11731
|
+
],
|
|
11732
|
+
"aliasPermutations": [],
|
|
11733
|
+
"permutations": [
|
|
11734
|
+
"hardis:project:convert:profilestopermsets",
|
|
11735
|
+
"project:hardis:convert:profilestopermsets",
|
|
11736
|
+
"project:convert:hardis:profilestopermsets",
|
|
11737
|
+
"project:convert:profilestopermsets:hardis",
|
|
11738
|
+
"hardis:convert:project:profilestopermsets",
|
|
11739
|
+
"convert:hardis:project:profilestopermsets",
|
|
11740
|
+
"convert:project:hardis:profilestopermsets",
|
|
11741
|
+
"convert:project:profilestopermsets:hardis",
|
|
11742
|
+
"hardis:convert:profilestopermsets:project",
|
|
11743
|
+
"convert:hardis:profilestopermsets:project",
|
|
11744
|
+
"convert:profilestopermsets:hardis:project",
|
|
11745
|
+
"convert:profilestopermsets:project:hardis",
|
|
11746
|
+
"hardis:project:profilestopermsets:convert",
|
|
11747
|
+
"project:hardis:profilestopermsets:convert",
|
|
11748
|
+
"project:profilestopermsets:hardis:convert",
|
|
11749
|
+
"project:profilestopermsets:convert:hardis",
|
|
11750
|
+
"hardis:profilestopermsets:project:convert",
|
|
11751
|
+
"profilestopermsets:hardis:project:convert",
|
|
11752
|
+
"profilestopermsets:project:hardis:convert",
|
|
11753
|
+
"profilestopermsets:project:convert:hardis",
|
|
11754
|
+
"hardis:profilestopermsets:convert:project",
|
|
11755
|
+
"profilestopermsets:hardis:convert:project",
|
|
11756
|
+
"profilestopermsets:convert:hardis:project",
|
|
11757
|
+
"profilestopermsets:convert:project:hardis"
|
|
11758
|
+
]
|
|
11759
|
+
},
|
|
11760
11760
|
"hardis:project:deploy:notify": {
|
|
11761
11761
|
"aliases": [],
|
|
11762
11762
|
"args": {},
|
|
@@ -15719,5 +15719,5 @@
|
|
|
15719
15719
|
]
|
|
15720
15720
|
}
|
|
15721
15721
|
},
|
|
15722
|
-
"version": "6.
|
|
15722
|
+
"version": "6.16.0"
|
|
15723
15723
|
}
|