sfdx-hardis 6.2.1 → 6.3.1
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 +13 -0
- package/lib/commands/hardis/org/diagnose/unsecure-connected-apps.d.ts +16 -0
- package/lib/commands/hardis/org/diagnose/unsecure-connected-apps.js +190 -0
- package/lib/commands/hardis/org/diagnose/unsecure-connected-apps.js.map +1 -0
- package/lib/commands/hardis/org/monitor/all.js +6 -0
- package/lib/commands/hardis/org/monitor/all.js.map +1 -1
- package/lib/commands/hardis/project/configure/auth.js +23 -8
- package/lib/commands/hardis/project/configure/auth.js.map +1 -1
- package/lib/commands/hardis/scratch/create.js +56 -11
- package/lib/commands/hardis/scratch/create.js.map +1 -1
- package/lib/common/notifProvider/index.d.ts +1 -1
- package/lib/common/notifProvider/index.js.map +1 -1
- package/lib/common/utils/index.js +3 -1
- package/lib/common/utils/index.js.map +1 -1
- package/oclif.lock +24 -24
- package/oclif.manifest.json +562 -442
- package/package.json +5 -5
package/oclif.manifest.json
CHANGED
|
@@ -57,13 +57,12 @@
|
|
|
57
57
|
"world:hello"
|
|
58
58
|
]
|
|
59
59
|
},
|
|
60
|
-
"hardis:
|
|
60
|
+
"hardis:cache:clear": {
|
|
61
61
|
"aliases": [],
|
|
62
62
|
"args": {},
|
|
63
|
-
"description": "\n## Command Behavior\n\n**
|
|
63
|
+
"description": "\n## Command Behavior\n\n**Clears the local cache generated by the sfdx-hardis plugin.**\n\nThis command is designed to remove temporary files, stored configurations, and other cached data that sfdx-hardis uses to optimize its operations. Clearing the cache can be beneficial for:\n\n- **Troubleshooting:** Resolving unexpected behavior or inconsistencies.\n- **Disk Space Management:** Freeing up storage on your local machine.\n- **Ensuring Fresh Data:** Guaranteeing that the plugin operates with the most current data and configurations.\n\n## Technical explanations\n\nThe command's technical implementation is straightforward:\n\n- **Direct Function Call:** It directly invokes the `clearCache()` function, which is imported from \buri../../../common/cache/index.js\buri.\n- **Cache Management Logic:** The \buriclearCache()` function encapsulates the logic for identifying and removing the specific files and directories that constitute the sfdx-hardis cache.\n",
|
|
64
64
|
"examples": [
|
|
65
|
-
"$ sf hardis:
|
|
66
|
-
"CI=true sf hardis:auth:login"
|
|
65
|
+
"$ sf hardis:cache:clear"
|
|
67
66
|
],
|
|
68
67
|
"flags": {
|
|
69
68
|
"json": {
|
|
@@ -81,28 +80,6 @@
|
|
|
81
80
|
"multiple": false,
|
|
82
81
|
"type": "option"
|
|
83
82
|
},
|
|
84
|
-
"instanceurl": {
|
|
85
|
-
"char": "r",
|
|
86
|
-
"description": "URL of org instance",
|
|
87
|
-
"name": "instanceurl",
|
|
88
|
-
"hasDynamicHelp": false,
|
|
89
|
-
"multiple": false,
|
|
90
|
-
"type": "option"
|
|
91
|
-
},
|
|
92
|
-
"devhub": {
|
|
93
|
-
"char": "h",
|
|
94
|
-
"description": "Also connect associated DevHub",
|
|
95
|
-
"name": "devhub",
|
|
96
|
-
"allowNo": false,
|
|
97
|
-
"type": "boolean"
|
|
98
|
-
},
|
|
99
|
-
"scratchorg": {
|
|
100
|
-
"char": "s",
|
|
101
|
-
"description": "Scratch org",
|
|
102
|
-
"name": "scratchorg",
|
|
103
|
-
"allowNo": false,
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
},
|
|
106
83
|
"debug": {
|
|
107
84
|
"char": "d",
|
|
108
85
|
"description": "Activate debug mode (more logs)",
|
|
@@ -126,38 +103,42 @@
|
|
|
126
103
|
},
|
|
127
104
|
"hasDynamicHelp": false,
|
|
128
105
|
"hiddenAliases": [],
|
|
129
|
-
"id": "hardis:
|
|
106
|
+
"id": "hardis:cache:clear",
|
|
130
107
|
"pluginAlias": "sfdx-hardis",
|
|
131
108
|
"pluginName": "sfdx-hardis",
|
|
132
109
|
"pluginType": "core",
|
|
133
110
|
"strict": true,
|
|
134
111
|
"enableJsonFlag": true,
|
|
135
|
-
"title": "
|
|
112
|
+
"title": "Clear sfdx-hardis cache",
|
|
113
|
+
"uiConfig": {
|
|
114
|
+
"hide": true
|
|
115
|
+
},
|
|
136
116
|
"requiresProject": false,
|
|
137
117
|
"isESM": true,
|
|
138
118
|
"relativePath": [
|
|
139
119
|
"lib",
|
|
140
120
|
"commands",
|
|
141
121
|
"hardis",
|
|
142
|
-
"
|
|
143
|
-
"
|
|
122
|
+
"cache",
|
|
123
|
+
"clear.js"
|
|
144
124
|
],
|
|
145
125
|
"aliasPermutations": [],
|
|
146
126
|
"permutations": [
|
|
147
|
-
"hardis:
|
|
148
|
-
"
|
|
149
|
-
"
|
|
150
|
-
"hardis:
|
|
151
|
-
"
|
|
152
|
-
"
|
|
127
|
+
"hardis:cache:clear",
|
|
128
|
+
"cache:hardis:clear",
|
|
129
|
+
"cache:clear:hardis",
|
|
130
|
+
"hardis:clear:cache",
|
|
131
|
+
"clear:hardis:cache",
|
|
132
|
+
"clear:cache:hardis"
|
|
153
133
|
]
|
|
154
134
|
},
|
|
155
|
-
"hardis:
|
|
135
|
+
"hardis:auth:login": {
|
|
156
136
|
"aliases": [],
|
|
157
137
|
"args": {},
|
|
158
|
-
"description": "\n## Command Behavior\n\n**
|
|
138
|
+
"description": "\n## Command Behavior\n\n**Authenticates to a Salesforce org, primarily designed for CI/CD workflows.**\n\nThis command facilitates secure and automated logins to Salesforce organizations within continuous integration and continuous delivery pipelines. It leverages pre-configured authentication details, ensuring that CI/CD processes can interact with Salesforce without manual intervention.\n\nKey aspects:\n\n- **Configuration-Driven:** It relies on authentication variables and files set up by dedicated configuration commands:\n - For CI/CD repositories: [Configure Org CI Authentication](https://sfdx-hardis.cloudity.com/hardis/project/configure/auth/)\n - For Monitoring repositories: [Configure Org Monitoring](https://sfdx-hardis.cloudity.com/hardis/org/configure/monitoring/)\n- **Technical Org Support:** Supports authentication to a 'technical org' (e.g., for calling Agentforce from another org) by utilizing the `SFDX_AUTH_URL_TECHNICAL_ORG` environment variable. If this variable is set, the command authenticates to this org with the alias `TECHNICAL_ORG`.\n\nTo obtain the `SFDX_AUTH_URL_TECHNICAL_ORG` value, you can run `sf org display --verbose --json` and copy the `sfdxAuthUrl` field from the output.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical flow involves:\n\n- **Flag Parsing:** It parses command-line flags such as `instanceurl`, `devhub`, `scratchorg`, and `debug` to determine the authentication context.\n- **Authentication Hook:** It triggers an internal authentication hook (`this.config.runHook('auth', ...`)) which is responsible for executing the actual authentication logic based on the provided flags (e.g., whether it's a Dev Hub or a scratch org).\n- **Environment Variable Check:** It checks for the presence of `SFDX_AUTH_URL_TECHNICAL_ORG` or `TECHNICAL_ORG_ALIAS` environment variables.\n- **`authOrg` Utility:** If a technical org is configured, it calls the `authOrg` utility function to perform the authentication for that specific org, ensuring it's connected and available for subsequent operations.\n- **Salesforce CLI Integration:** It integrates with the Salesforce CLI's authentication mechanisms to establish and manage org connections.\n</details>\n",
|
|
159
139
|
"examples": [
|
|
160
|
-
"$ sf hardis:
|
|
140
|
+
"$ sf hardis:auth:login",
|
|
141
|
+
"CI=true sf hardis:auth:login"
|
|
161
142
|
],
|
|
162
143
|
"flags": {
|
|
163
144
|
"json": {
|
|
@@ -175,6 +156,28 @@
|
|
|
175
156
|
"multiple": false,
|
|
176
157
|
"type": "option"
|
|
177
158
|
},
|
|
159
|
+
"instanceurl": {
|
|
160
|
+
"char": "r",
|
|
161
|
+
"description": "URL of org instance",
|
|
162
|
+
"name": "instanceurl",
|
|
163
|
+
"hasDynamicHelp": false,
|
|
164
|
+
"multiple": false,
|
|
165
|
+
"type": "option"
|
|
166
|
+
},
|
|
167
|
+
"devhub": {
|
|
168
|
+
"char": "h",
|
|
169
|
+
"description": "Also connect associated DevHub",
|
|
170
|
+
"name": "devhub",
|
|
171
|
+
"allowNo": false,
|
|
172
|
+
"type": "boolean"
|
|
173
|
+
},
|
|
174
|
+
"scratchorg": {
|
|
175
|
+
"char": "s",
|
|
176
|
+
"description": "Scratch org",
|
|
177
|
+
"name": "scratchorg",
|
|
178
|
+
"allowNo": false,
|
|
179
|
+
"type": "boolean"
|
|
180
|
+
},
|
|
178
181
|
"debug": {
|
|
179
182
|
"char": "d",
|
|
180
183
|
"description": "Activate debug mode (more logs)",
|
|
@@ -198,33 +201,30 @@
|
|
|
198
201
|
},
|
|
199
202
|
"hasDynamicHelp": false,
|
|
200
203
|
"hiddenAliases": [],
|
|
201
|
-
"id": "hardis:
|
|
204
|
+
"id": "hardis:auth:login",
|
|
202
205
|
"pluginAlias": "sfdx-hardis",
|
|
203
206
|
"pluginName": "sfdx-hardis",
|
|
204
207
|
"pluginType": "core",
|
|
205
208
|
"strict": true,
|
|
206
209
|
"enableJsonFlag": true,
|
|
207
|
-
"title": "
|
|
208
|
-
"uiConfig": {
|
|
209
|
-
"hide": true
|
|
210
|
-
},
|
|
210
|
+
"title": "Login",
|
|
211
211
|
"requiresProject": false,
|
|
212
212
|
"isESM": true,
|
|
213
213
|
"relativePath": [
|
|
214
214
|
"lib",
|
|
215
215
|
"commands",
|
|
216
216
|
"hardis",
|
|
217
|
-
"
|
|
218
|
-
"
|
|
217
|
+
"auth",
|
|
218
|
+
"login.js"
|
|
219
219
|
],
|
|
220
220
|
"aliasPermutations": [],
|
|
221
221
|
"permutations": [
|
|
222
|
-
"hardis:
|
|
223
|
-
"
|
|
224
|
-
"
|
|
225
|
-
"hardis:
|
|
226
|
-
"
|
|
227
|
-
"
|
|
222
|
+
"hardis:auth:login",
|
|
223
|
+
"auth:hardis:login",
|
|
224
|
+
"auth:login:hardis",
|
|
225
|
+
"hardis:login:auth",
|
|
226
|
+
"login:hardis:auth",
|
|
227
|
+
"login:auth:hardis"
|
|
228
228
|
]
|
|
229
229
|
},
|
|
230
230
|
"hardis:config:get": {
|
|
@@ -3037,7 +3037,7 @@
|
|
|
3037
3037
|
"hardis:scratch:create": {
|
|
3038
3038
|
"aliases": [],
|
|
3039
3039
|
"args": {},
|
|
3040
|
-
"description": "
|
|
3040
|
+
"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",
|
|
3041
3041
|
"examples": [
|
|
3042
3042
|
"$ sf hardis:scratch:create"
|
|
3043
3043
|
],
|
|
@@ -5800,6 +5800,121 @@
|
|
|
5800
5800
|
"import:files:org:hardis"
|
|
5801
5801
|
]
|
|
5802
5802
|
},
|
|
5803
|
+
"hardis:org:fix:listviewmine": {
|
|
5804
|
+
"aliases": [],
|
|
5805
|
+
"args": {},
|
|
5806
|
+
"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",
|
|
5807
|
+
"examples": [
|
|
5808
|
+
"$ sf hardis:org:fix:listviewmine",
|
|
5809
|
+
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
5810
|
+
],
|
|
5811
|
+
"flags": {
|
|
5812
|
+
"json": {
|
|
5813
|
+
"description": "Format output as json.",
|
|
5814
|
+
"helpGroup": "GLOBAL",
|
|
5815
|
+
"name": "json",
|
|
5816
|
+
"allowNo": false,
|
|
5817
|
+
"type": "boolean"
|
|
5818
|
+
},
|
|
5819
|
+
"flags-dir": {
|
|
5820
|
+
"helpGroup": "GLOBAL",
|
|
5821
|
+
"name": "flags-dir",
|
|
5822
|
+
"summary": "Import flag values from a directory.",
|
|
5823
|
+
"hasDynamicHelp": false,
|
|
5824
|
+
"multiple": false,
|
|
5825
|
+
"type": "option"
|
|
5826
|
+
},
|
|
5827
|
+
"listviews": {
|
|
5828
|
+
"char": "l",
|
|
5829
|
+
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
5830
|
+
"name": "listviews",
|
|
5831
|
+
"hasDynamicHelp": false,
|
|
5832
|
+
"multiple": false,
|
|
5833
|
+
"type": "option"
|
|
5834
|
+
},
|
|
5835
|
+
"debug": {
|
|
5836
|
+
"char": "d",
|
|
5837
|
+
"description": "Activate debug mode (more logs)",
|
|
5838
|
+
"name": "debug",
|
|
5839
|
+
"allowNo": false,
|
|
5840
|
+
"type": "boolean"
|
|
5841
|
+
},
|
|
5842
|
+
"websocket": {
|
|
5843
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
5844
|
+
"name": "websocket",
|
|
5845
|
+
"hasDynamicHelp": false,
|
|
5846
|
+
"multiple": false,
|
|
5847
|
+
"type": "option"
|
|
5848
|
+
},
|
|
5849
|
+
"skipauth": {
|
|
5850
|
+
"description": "Skip authentication check when a default username is required",
|
|
5851
|
+
"name": "skipauth",
|
|
5852
|
+
"allowNo": false,
|
|
5853
|
+
"type": "boolean"
|
|
5854
|
+
},
|
|
5855
|
+
"target-org": {
|
|
5856
|
+
"aliases": [
|
|
5857
|
+
"targetusername",
|
|
5858
|
+
"u"
|
|
5859
|
+
],
|
|
5860
|
+
"char": "o",
|
|
5861
|
+
"deprecateAliases": true,
|
|
5862
|
+
"name": "target-org",
|
|
5863
|
+
"noCacheDefault": true,
|
|
5864
|
+
"required": true,
|
|
5865
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
5866
|
+
"hasDynamicHelp": true,
|
|
5867
|
+
"multiple": false,
|
|
5868
|
+
"type": "option"
|
|
5869
|
+
}
|
|
5870
|
+
},
|
|
5871
|
+
"hasDynamicHelp": true,
|
|
5872
|
+
"hiddenAliases": [],
|
|
5873
|
+
"id": "hardis:org:fix:listviewmine",
|
|
5874
|
+
"pluginAlias": "sfdx-hardis",
|
|
5875
|
+
"pluginName": "sfdx-hardis",
|
|
5876
|
+
"pluginType": "core",
|
|
5877
|
+
"strict": true,
|
|
5878
|
+
"enableJsonFlag": true,
|
|
5879
|
+
"title": "Fix listviews with ",
|
|
5880
|
+
"requiresProject": true,
|
|
5881
|
+
"isESM": true,
|
|
5882
|
+
"relativePath": [
|
|
5883
|
+
"lib",
|
|
5884
|
+
"commands",
|
|
5885
|
+
"hardis",
|
|
5886
|
+
"org",
|
|
5887
|
+
"fix",
|
|
5888
|
+
"listviewmine.js"
|
|
5889
|
+
],
|
|
5890
|
+
"aliasPermutations": [],
|
|
5891
|
+
"permutations": [
|
|
5892
|
+
"hardis:org:fix:listviewmine",
|
|
5893
|
+
"org:hardis:fix:listviewmine",
|
|
5894
|
+
"org:fix:hardis:listviewmine",
|
|
5895
|
+
"org:fix:listviewmine:hardis",
|
|
5896
|
+
"hardis:fix:org:listviewmine",
|
|
5897
|
+
"fix:hardis:org:listviewmine",
|
|
5898
|
+
"fix:org:hardis:listviewmine",
|
|
5899
|
+
"fix:org:listviewmine:hardis",
|
|
5900
|
+
"hardis:fix:listviewmine:org",
|
|
5901
|
+
"fix:hardis:listviewmine:org",
|
|
5902
|
+
"fix:listviewmine:hardis:org",
|
|
5903
|
+
"fix:listviewmine:org:hardis",
|
|
5904
|
+
"hardis:org:listviewmine:fix",
|
|
5905
|
+
"org:hardis:listviewmine:fix",
|
|
5906
|
+
"org:listviewmine:hardis:fix",
|
|
5907
|
+
"org:listviewmine:fix:hardis",
|
|
5908
|
+
"hardis:listviewmine:org:fix",
|
|
5909
|
+
"listviewmine:hardis:org:fix",
|
|
5910
|
+
"listviewmine:org:hardis:fix",
|
|
5911
|
+
"listviewmine:org:fix:hardis",
|
|
5912
|
+
"hardis:listviewmine:fix:org",
|
|
5913
|
+
"listviewmine:hardis:fix:org",
|
|
5914
|
+
"listviewmine:fix:hardis:org",
|
|
5915
|
+
"listviewmine:fix:org:hardis"
|
|
5916
|
+
]
|
|
5917
|
+
},
|
|
5803
5918
|
"hardis:org:diagnose:audittrail": {
|
|
5804
5919
|
"aliases": [],
|
|
5805
5920
|
"args": {},
|
|
@@ -6409,13 +6524,12 @@
|
|
|
6409
6524
|
"releaseupdates:diagnose:org:hardis"
|
|
6410
6525
|
]
|
|
6411
6526
|
},
|
|
6412
|
-
"hardis:org:diagnose:
|
|
6527
|
+
"hardis:org:diagnose:unsecure-connected-apps": {
|
|
6413
6528
|
"aliases": [],
|
|
6414
6529
|
"args": {},
|
|
6415
|
-
"description": "
|
|
6530
|
+
"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<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",
|
|
6416
6531
|
"examples": [
|
|
6417
|
-
"$ sf hardis:org:diagnose:
|
|
6418
|
-
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6532
|
+
"$ sf hardis:org:diagnose:unsecure-connected-apps"
|
|
6419
6533
|
],
|
|
6420
6534
|
"flags": {
|
|
6421
6535
|
"json": {
|
|
@@ -6441,14 +6555,6 @@
|
|
|
6441
6555
|
"multiple": false,
|
|
6442
6556
|
"type": "option"
|
|
6443
6557
|
},
|
|
6444
|
-
"days": {
|
|
6445
|
-
"char": "t",
|
|
6446
|
-
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6447
|
-
"name": "days",
|
|
6448
|
-
"hasDynamicHelp": false,
|
|
6449
|
-
"multiple": false,
|
|
6450
|
-
"type": "option"
|
|
6451
|
-
},
|
|
6452
6558
|
"debug": {
|
|
6453
6559
|
"char": "d",
|
|
6454
6560
|
"description": "Activate debug mode (more logs)",
|
|
@@ -6487,13 +6593,13 @@
|
|
|
6487
6593
|
},
|
|
6488
6594
|
"hasDynamicHelp": true,
|
|
6489
6595
|
"hiddenAliases": [],
|
|
6490
|
-
"id": "hardis:org:diagnose:
|
|
6596
|
+
"id": "hardis:org:diagnose:unsecure-connected-apps",
|
|
6491
6597
|
"pluginAlias": "sfdx-hardis",
|
|
6492
6598
|
"pluginName": "sfdx-hardis",
|
|
6493
6599
|
"pluginType": "core",
|
|
6494
6600
|
"strict": true,
|
|
6495
6601
|
"enableJsonFlag": true,
|
|
6496
|
-
"title": "Detect
|
|
6602
|
+
"title": "Detect Unsecured Connected Apps",
|
|
6497
6603
|
"requiresProject": false,
|
|
6498
6604
|
"isESM": true,
|
|
6499
6605
|
"relativePath": [
|
|
@@ -6502,32 +6608,155 @@
|
|
|
6502
6608
|
"hardis",
|
|
6503
6609
|
"org",
|
|
6504
6610
|
"diagnose",
|
|
6505
|
-
"
|
|
6611
|
+
"unsecure-connected-apps.js"
|
|
6506
6612
|
],
|
|
6507
6613
|
"aliasPermutations": [],
|
|
6508
6614
|
"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
|
-
"
|
|
6615
|
+
"hardis:org:diagnose:unsecure-connected-apps",
|
|
6616
|
+
"org:hardis:diagnose:unsecure-connected-apps",
|
|
6617
|
+
"org:diagnose:hardis:unsecure-connected-apps",
|
|
6618
|
+
"org:diagnose:unsecure-connected-apps:hardis",
|
|
6619
|
+
"hardis:diagnose:org:unsecure-connected-apps",
|
|
6620
|
+
"diagnose:hardis:org:unsecure-connected-apps",
|
|
6621
|
+
"diagnose:org:hardis:unsecure-connected-apps",
|
|
6622
|
+
"diagnose:org:unsecure-connected-apps:hardis",
|
|
6623
|
+
"hardis:diagnose:unsecure-connected-apps:org",
|
|
6624
|
+
"diagnose:hardis:unsecure-connected-apps:org",
|
|
6625
|
+
"diagnose:unsecure-connected-apps:hardis:org",
|
|
6626
|
+
"diagnose:unsecure-connected-apps:org:hardis",
|
|
6627
|
+
"hardis:org:unsecure-connected-apps:diagnose",
|
|
6628
|
+
"org:hardis:unsecure-connected-apps:diagnose",
|
|
6629
|
+
"org:unsecure-connected-apps:hardis:diagnose",
|
|
6630
|
+
"org:unsecure-connected-apps:diagnose:hardis",
|
|
6631
|
+
"hardis:unsecure-connected-apps:org:diagnose",
|
|
6632
|
+
"unsecure-connected-apps:hardis:org:diagnose",
|
|
6633
|
+
"unsecure-connected-apps:org:hardis:diagnose",
|
|
6634
|
+
"unsecure-connected-apps:org:diagnose:hardis",
|
|
6635
|
+
"hardis:unsecure-connected-apps:diagnose:org",
|
|
6636
|
+
"unsecure-connected-apps:hardis:diagnose:org",
|
|
6637
|
+
"unsecure-connected-apps:diagnose:hardis:org",
|
|
6638
|
+
"unsecure-connected-apps:diagnose:org:hardis"
|
|
6639
|
+
]
|
|
6640
|
+
},
|
|
6641
|
+
"hardis:org:diagnose:unused-apex-classes": {
|
|
6642
|
+
"aliases": [],
|
|
6643
|
+
"args": {},
|
|
6644
|
+
"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",
|
|
6645
|
+
"examples": [
|
|
6646
|
+
"$ sf hardis:org:diagnose:unused-apex-classes",
|
|
6647
|
+
"$ sf hardis:org:diagnose:unused-apex-classes --days 700"
|
|
6648
|
+
],
|
|
6649
|
+
"flags": {
|
|
6650
|
+
"json": {
|
|
6651
|
+
"description": "Format output as json.",
|
|
6652
|
+
"helpGroup": "GLOBAL",
|
|
6653
|
+
"name": "json",
|
|
6654
|
+
"allowNo": false,
|
|
6655
|
+
"type": "boolean"
|
|
6656
|
+
},
|
|
6657
|
+
"flags-dir": {
|
|
6658
|
+
"helpGroup": "GLOBAL",
|
|
6659
|
+
"name": "flags-dir",
|
|
6660
|
+
"summary": "Import flag values from a directory.",
|
|
6661
|
+
"hasDynamicHelp": false,
|
|
6662
|
+
"multiple": false,
|
|
6663
|
+
"type": "option"
|
|
6664
|
+
},
|
|
6665
|
+
"outputfile": {
|
|
6666
|
+
"char": "f",
|
|
6667
|
+
"description": "Force the path and name of output report file. Must end with .csv",
|
|
6668
|
+
"name": "outputfile",
|
|
6669
|
+
"hasDynamicHelp": false,
|
|
6670
|
+
"multiple": false,
|
|
6671
|
+
"type": "option"
|
|
6672
|
+
},
|
|
6673
|
+
"days": {
|
|
6674
|
+
"char": "t",
|
|
6675
|
+
"description": "Extracts the users that have been inactive for the amount of days specified. In CI, default is 180 days",
|
|
6676
|
+
"name": "days",
|
|
6677
|
+
"hasDynamicHelp": false,
|
|
6678
|
+
"multiple": false,
|
|
6679
|
+
"type": "option"
|
|
6680
|
+
},
|
|
6681
|
+
"debug": {
|
|
6682
|
+
"char": "d",
|
|
6683
|
+
"description": "Activate debug mode (more logs)",
|
|
6684
|
+
"name": "debug",
|
|
6685
|
+
"allowNo": false,
|
|
6686
|
+
"type": "boolean"
|
|
6687
|
+
},
|
|
6688
|
+
"websocket": {
|
|
6689
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
6690
|
+
"name": "websocket",
|
|
6691
|
+
"hasDynamicHelp": false,
|
|
6692
|
+
"multiple": false,
|
|
6693
|
+
"type": "option"
|
|
6694
|
+
},
|
|
6695
|
+
"skipauth": {
|
|
6696
|
+
"description": "Skip authentication check when a default username is required",
|
|
6697
|
+
"name": "skipauth",
|
|
6698
|
+
"allowNo": false,
|
|
6699
|
+
"type": "boolean"
|
|
6700
|
+
},
|
|
6701
|
+
"target-org": {
|
|
6702
|
+
"aliases": [
|
|
6703
|
+
"targetusername",
|
|
6704
|
+
"u"
|
|
6705
|
+
],
|
|
6706
|
+
"char": "o",
|
|
6707
|
+
"deprecateAliases": true,
|
|
6708
|
+
"name": "target-org",
|
|
6709
|
+
"noCacheDefault": true,
|
|
6710
|
+
"required": true,
|
|
6711
|
+
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
6712
|
+
"hasDynamicHelp": true,
|
|
6713
|
+
"multiple": false,
|
|
6714
|
+
"type": "option"
|
|
6715
|
+
}
|
|
6716
|
+
},
|
|
6717
|
+
"hasDynamicHelp": true,
|
|
6718
|
+
"hiddenAliases": [],
|
|
6719
|
+
"id": "hardis:org:diagnose:unused-apex-classes",
|
|
6720
|
+
"pluginAlias": "sfdx-hardis",
|
|
6721
|
+
"pluginName": "sfdx-hardis",
|
|
6722
|
+
"pluginType": "core",
|
|
6723
|
+
"strict": true,
|
|
6724
|
+
"enableJsonFlag": true,
|
|
6725
|
+
"title": "Detect unused Apex classes in an org",
|
|
6726
|
+
"requiresProject": false,
|
|
6727
|
+
"isESM": true,
|
|
6728
|
+
"relativePath": [
|
|
6729
|
+
"lib",
|
|
6730
|
+
"commands",
|
|
6731
|
+
"hardis",
|
|
6732
|
+
"org",
|
|
6733
|
+
"diagnose",
|
|
6734
|
+
"unused-apex-classes.js"
|
|
6735
|
+
],
|
|
6736
|
+
"aliasPermutations": [],
|
|
6737
|
+
"permutations": [
|
|
6738
|
+
"hardis:org:diagnose:unused-apex-classes",
|
|
6739
|
+
"org:hardis:diagnose:unused-apex-classes",
|
|
6740
|
+
"org:diagnose:hardis:unused-apex-classes",
|
|
6741
|
+
"org:diagnose:unused-apex-classes:hardis",
|
|
6742
|
+
"hardis:diagnose:org:unused-apex-classes",
|
|
6743
|
+
"diagnose:hardis:org:unused-apex-classes",
|
|
6744
|
+
"diagnose:org:hardis:unused-apex-classes",
|
|
6745
|
+
"diagnose:org:unused-apex-classes:hardis",
|
|
6746
|
+
"hardis:diagnose:unused-apex-classes:org",
|
|
6747
|
+
"diagnose:hardis:unused-apex-classes:org",
|
|
6748
|
+
"diagnose:unused-apex-classes:hardis:org",
|
|
6749
|
+
"diagnose:unused-apex-classes:org:hardis",
|
|
6750
|
+
"hardis:org:unused-apex-classes:diagnose",
|
|
6751
|
+
"org:hardis:unused-apex-classes:diagnose",
|
|
6752
|
+
"org:unused-apex-classes:hardis:diagnose",
|
|
6753
|
+
"org:unused-apex-classes:diagnose:hardis",
|
|
6754
|
+
"hardis:unused-apex-classes:org:diagnose",
|
|
6755
|
+
"unused-apex-classes:hardis:org:diagnose",
|
|
6756
|
+
"unused-apex-classes:org:hardis:diagnose",
|
|
6757
|
+
"unused-apex-classes:org:diagnose:hardis",
|
|
6758
|
+
"hardis:unused-apex-classes:diagnose:org",
|
|
6759
|
+
"unused-apex-classes:hardis:diagnose:org",
|
|
6531
6760
|
"unused-apex-classes:diagnose:hardis:org",
|
|
6532
6761
|
"unused-apex-classes:diagnose:org:hardis"
|
|
6533
6762
|
]
|
|
@@ -6949,121 +7178,6 @@
|
|
|
6949
7178
|
"unusedusers:diagnose:org:hardis"
|
|
6950
7179
|
]
|
|
6951
7180
|
},
|
|
6952
|
-
"hardis:org:fix:listviewmine": {
|
|
6953
|
-
"aliases": [],
|
|
6954
|
-
"args": {},
|
|
6955
|
-
"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",
|
|
6956
|
-
"examples": [
|
|
6957
|
-
"$ sf hardis:org:fix:listviewmine",
|
|
6958
|
-
"$ sf hardis:org:fix:listviewmine --listviews Opportunity:MySubscriptions,Account:MyActivePartners"
|
|
6959
|
-
],
|
|
6960
|
-
"flags": {
|
|
6961
|
-
"json": {
|
|
6962
|
-
"description": "Format output as json.",
|
|
6963
|
-
"helpGroup": "GLOBAL",
|
|
6964
|
-
"name": "json",
|
|
6965
|
-
"allowNo": false,
|
|
6966
|
-
"type": "boolean"
|
|
6967
|
-
},
|
|
6968
|
-
"flags-dir": {
|
|
6969
|
-
"helpGroup": "GLOBAL",
|
|
6970
|
-
"name": "flags-dir",
|
|
6971
|
-
"summary": "Import flag values from a directory.",
|
|
6972
|
-
"hasDynamicHelp": false,
|
|
6973
|
-
"multiple": false,
|
|
6974
|
-
"type": "option"
|
|
6975
|
-
},
|
|
6976
|
-
"listviews": {
|
|
6977
|
-
"char": "l",
|
|
6978
|
-
"description": "Comma-separated list of listviews following format Object:ListViewName\nExample: Contact:MyContacts,Contact:MyActiveContacts,Opportunity:MYClosedOpportunities",
|
|
6979
|
-
"name": "listviews",
|
|
6980
|
-
"hasDynamicHelp": false,
|
|
6981
|
-
"multiple": false,
|
|
6982
|
-
"type": "option"
|
|
6983
|
-
},
|
|
6984
|
-
"debug": {
|
|
6985
|
-
"char": "d",
|
|
6986
|
-
"description": "Activate debug mode (more logs)",
|
|
6987
|
-
"name": "debug",
|
|
6988
|
-
"allowNo": false,
|
|
6989
|
-
"type": "boolean"
|
|
6990
|
-
},
|
|
6991
|
-
"websocket": {
|
|
6992
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
6993
|
-
"name": "websocket",
|
|
6994
|
-
"hasDynamicHelp": false,
|
|
6995
|
-
"multiple": false,
|
|
6996
|
-
"type": "option"
|
|
6997
|
-
},
|
|
6998
|
-
"skipauth": {
|
|
6999
|
-
"description": "Skip authentication check when a default username is required",
|
|
7000
|
-
"name": "skipauth",
|
|
7001
|
-
"allowNo": false,
|
|
7002
|
-
"type": "boolean"
|
|
7003
|
-
},
|
|
7004
|
-
"target-org": {
|
|
7005
|
-
"aliases": [
|
|
7006
|
-
"targetusername",
|
|
7007
|
-
"u"
|
|
7008
|
-
],
|
|
7009
|
-
"char": "o",
|
|
7010
|
-
"deprecateAliases": true,
|
|
7011
|
-
"name": "target-org",
|
|
7012
|
-
"noCacheDefault": true,
|
|
7013
|
-
"required": true,
|
|
7014
|
-
"summary": "Username or alias of the target org. Not required if the `target-org` configuration variable is already set.",
|
|
7015
|
-
"hasDynamicHelp": true,
|
|
7016
|
-
"multiple": false,
|
|
7017
|
-
"type": "option"
|
|
7018
|
-
}
|
|
7019
|
-
},
|
|
7020
|
-
"hasDynamicHelp": true,
|
|
7021
|
-
"hiddenAliases": [],
|
|
7022
|
-
"id": "hardis:org:fix:listviewmine",
|
|
7023
|
-
"pluginAlias": "sfdx-hardis",
|
|
7024
|
-
"pluginName": "sfdx-hardis",
|
|
7025
|
-
"pluginType": "core",
|
|
7026
|
-
"strict": true,
|
|
7027
|
-
"enableJsonFlag": true,
|
|
7028
|
-
"title": "Fix listviews with ",
|
|
7029
|
-
"requiresProject": true,
|
|
7030
|
-
"isESM": true,
|
|
7031
|
-
"relativePath": [
|
|
7032
|
-
"lib",
|
|
7033
|
-
"commands",
|
|
7034
|
-
"hardis",
|
|
7035
|
-
"org",
|
|
7036
|
-
"fix",
|
|
7037
|
-
"listviewmine.js"
|
|
7038
|
-
],
|
|
7039
|
-
"aliasPermutations": [],
|
|
7040
|
-
"permutations": [
|
|
7041
|
-
"hardis:org:fix:listviewmine",
|
|
7042
|
-
"org:hardis:fix:listviewmine",
|
|
7043
|
-
"org:fix:hardis:listviewmine",
|
|
7044
|
-
"org:fix:listviewmine:hardis",
|
|
7045
|
-
"hardis:fix:org:listviewmine",
|
|
7046
|
-
"fix:hardis:org:listviewmine",
|
|
7047
|
-
"fix:org:hardis:listviewmine",
|
|
7048
|
-
"fix:org:listviewmine:hardis",
|
|
7049
|
-
"hardis:fix:listviewmine:org",
|
|
7050
|
-
"fix:hardis:listviewmine:org",
|
|
7051
|
-
"fix:listviewmine:hardis:org",
|
|
7052
|
-
"fix:listviewmine:org:hardis",
|
|
7053
|
-
"hardis:org:listviewmine:fix",
|
|
7054
|
-
"org:hardis:listviewmine:fix",
|
|
7055
|
-
"org:listviewmine:hardis:fix",
|
|
7056
|
-
"org:listviewmine:fix:hardis",
|
|
7057
|
-
"hardis:listviewmine:org:fix",
|
|
7058
|
-
"listviewmine:hardis:org:fix",
|
|
7059
|
-
"listviewmine:org:hardis:fix",
|
|
7060
|
-
"listviewmine:org:fix:hardis",
|
|
7061
|
-
"hardis:listviewmine:fix:org",
|
|
7062
|
-
"listviewmine:hardis:fix:org",
|
|
7063
|
-
"listviewmine:fix:hardis:org",
|
|
7064
|
-
"listviewmine:fix:org:hardis"
|
|
7065
|
-
]
|
|
7066
|
-
},
|
|
7067
7181
|
"hardis:org:generate:packagexmlfull": {
|
|
7068
7182
|
"aliases": [],
|
|
7069
7183
|
"args": {},
|
|
@@ -7189,7 +7303,7 @@
|
|
|
7189
7303
|
"hardis:org:monitor:all": {
|
|
7190
7304
|
"aliases": [],
|
|
7191
7305
|
"args": {},
|
|
7192
|
-
"description": "Monitor org, generate reports and sends notifications\n\nYou can disable some commands defining either a **monitoringDisable** property in `.sfdx-hardis.yml`, or a comma separated list in env variable **MONITORING_DISABLE**\n\nExample in .sfdx-hardis.yml:\n \n```yaml\nmonitoringDisable:\n - METADATA_STATUS\n - MISSING_ATTRIBUTES\n - UNUSED_METADATAS\n```\n \nExample in env var:\n\n```sh\nMONITORING_DISABLE=METADATA_STATUS,MISSING_ATTRIBUTES,UNUSED_METADATAS\n```\n\nA [default list of monitoring commands](https://sfdx-hardis.cloudity.com/salesforce-monitoring-home/#monitoring-commands) is used, if you want to override it you can define property **monitoringCommands** in your .sfdx-hardis.yml file\n\nExample:\n\n```yaml\nmonitoringCommands:\n - title: My Custom command\n command: sf my:custom:command\n - title: My Custom command 2\n command: sf my:other:custom:command\n```\n\nYou can force the daily run of all commands by defining env var `MONITORING_IGNORE_FREQUENCY=true`\n\nThe default list of commands is the following:\n\n| Key | Description | Command | Frequency |\n| :---: | :---- | :---- | :-----: |\n| [AUDIT_TRAIL](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | Detect suspect setup actions in major org | [sf hardis:org:diagnose:audittrail](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | daily |\n| [LEGACY_API](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | Detect calls to deprecated API versions | [sf hardis:org:diagnose:legacyapi](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | daily |\n| [ORG_LIMITS](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | Detect if org limits are close to be reached | [sf hardis:org:monitor:limits](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | daily |\n| [LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | Extract licenses information | [sf hardis:org:diagnose:licenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | weekly |\n| [LINT_ACCESS](https://sfdx-hardis.cloudity.com/hardis/lint/access) | Detect custom elements with no access rights defined in permission sets | [sf hardis:lint:access](https://sfdx-hardis.cloudity.com/hardis/lint/access) | weekly |\n| [UNUSED_LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | Detect permission set licenses that are assigned to users that do not need them | [sf hardis:org:diagnose:unusedlicenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | weekly |\n| [UNUSED_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users without recent logins | [sf hardis:org:diagnose:unusedusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ACTIVE_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users with recent logins | [sf hardis:org:diagnose:unusedusers --returnactiveusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ORG_INFO](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | Get org info + SF instance info + next major upgrade date | [sf hardis:org:diagnose:instanceupgrade](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | weekly |\n| [RELEASE_UPDATES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | Gather warnings about incoming and overdue Release Updates | [sf hardis:org:diagnose:releaseupdates](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | weekly |\n| [UNUSED_METADATAS](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | Detect custom labels and custom permissions that are not in use | [sf hardis:lint:unusedmetadatas](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | weekly |\n| [UNUSED_APEX_CLASSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | Detect unused Apex classes in an org | [sf hardis:org:diagnose:unused-apex-classes](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | weekly |\n| [CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | Detect unused Connected Apps in an org | [sf hardis:org:diagnose:unused-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | weekly |\n| [METADATA_STATUS](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | Detect inactive metadata | [sf hardis:lint:metadatastatus](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | weekly |\n| [MISSING_ATTRIBUTES](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | Detect missing description on custom field | [sf hardis:lint:missingattributes](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | weekly |\n\n",
|
|
7306
|
+
"description": "Monitor org, generate reports and sends notifications\n\nYou can disable some commands defining either a **monitoringDisable** property in `.sfdx-hardis.yml`, or a comma separated list in env variable **MONITORING_DISABLE**\n\nExample in .sfdx-hardis.yml:\n \n```yaml\nmonitoringDisable:\n - METADATA_STATUS\n - MISSING_ATTRIBUTES\n - UNUSED_METADATAS\n```\n \nExample in env var:\n\n```sh\nMONITORING_DISABLE=METADATA_STATUS,MISSING_ATTRIBUTES,UNUSED_METADATAS\n```\n\nA [default list of monitoring commands](https://sfdx-hardis.cloudity.com/salesforce-monitoring-home/#monitoring-commands) is used, if you want to override it you can define property **monitoringCommands** in your .sfdx-hardis.yml file\n\nExample:\n\n```yaml\nmonitoringCommands:\n - title: My Custom command\n command: sf my:custom:command\n - title: My Custom command 2\n command: sf my:other:custom:command\n```\n\nYou can force the daily run of all commands by defining env var `MONITORING_IGNORE_FREQUENCY=true`\n\nThe default list of commands is the following:\n\n| Key | Description | Command | Frequency |\n| :---: | :---- | :---- | :-----: |\n| [AUDIT_TRAIL](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | Detect suspect setup actions in major org | [sf hardis:org:diagnose:audittrail](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/audittrail) | daily |\n| [LEGACY_API](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | Detect calls to deprecated API versions | [sf hardis:org:diagnose:legacyapi](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/legacyapi) | daily |\n| [ORG_LIMITS](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | Detect if org limits are close to be reached | [sf hardis:org:monitor:limits](https://sfdx-hardis.cloudity.com/hardis/org/monitor/limits) | daily |\n| [LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | Extract licenses information | [sf hardis:org:diagnose:licenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/licenses) | weekly |\n| [LINT_ACCESS](https://sfdx-hardis.cloudity.com/hardis/lint/access) | Detect custom elements with no access rights defined in permission sets | [sf hardis:lint:access](https://sfdx-hardis.cloudity.com/hardis/lint/access) | weekly |\n| [UNUSED_LICENSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | Detect permission set licenses that are assigned to users that do not need them | [sf hardis:org:diagnose:unusedlicenses](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedlicenses) | weekly |\n| [UNUSED_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users without recent logins | [sf hardis:org:diagnose:unusedusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ACTIVE_USERS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | Detect active users with recent logins | [sf hardis:org:diagnose:unusedusers --returnactiveusers](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unusedusers) | weekly |\n| [ORG_INFO](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | Get org info + SF instance info + next major upgrade date | [sf hardis:org:diagnose:instanceupgrade](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/instanceupgrade) | weekly |\n| [RELEASE_UPDATES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | Gather warnings about incoming and overdue Release Updates | [sf hardis:org:diagnose:releaseupdates](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/releaseupdates) | weekly |\n| [UNUSED_METADATAS](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | Detect custom labels and custom permissions that are not in use | [sf hardis:lint:unusedmetadatas](https://sfdx-hardis.cloudity.com/hardis/lint/unusedmetadatas) | weekly |\n| [UNUSED_APEX_CLASSES](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | Detect unused Apex classes in an org | [sf hardis:org:diagnose:unused-apex-classes](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-apex-classes) | weekly |\n| [CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | Detect unused Connected Apps in an org | [sf hardis:org:diagnose:unused-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unused-connected-apps) | weekly |\n| [UNSECURED_CONNECTED_APPS](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | Detect unsecured Connected Apps in an org | [sf hardis:org:diagnose:unsecure-connected-apps](https://sfdx-hardis.cloudity.com/hardis/org/diagnose/unsecure-connected-apps) | weekly |\n| [METADATA_STATUS](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | Detect inactive metadata | [sf hardis:lint:metadatastatus](https://sfdx-hardis.cloudity.com/hardis/lint/metadatastatus) | weekly |\n| [MISSING_ATTRIBUTES](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | Detect missing description on custom field | [sf hardis:lint:missingattributes](https://sfdx-hardis.cloudity.com/hardis/lint/missingattributes) | weekly |\n\n",
|
|
7193
7307
|
"examples": [
|
|
7194
7308
|
"$ sf hardis:org:monitor:all"
|
|
7195
7309
|
],
|
|
@@ -7333,6 +7447,12 @@
|
|
|
7333
7447
|
"command": "sf hardis:org:diagnose:unused-connected-apps",
|
|
7334
7448
|
"frequency": "weekly"
|
|
7335
7449
|
},
|
|
7450
|
+
{
|
|
7451
|
+
"key": "UNSECURED_CONNECTED_APPS",
|
|
7452
|
+
"title": "Detect unsecured Connected Apps in an org",
|
|
7453
|
+
"command": "sf hardis:org:diagnose:unsecure-connected-apps",
|
|
7454
|
+
"frequency": "weekly"
|
|
7455
|
+
},
|
|
7336
7456
|
{
|
|
7337
7457
|
"key": "METADATA_STATUS",
|
|
7338
7458
|
"title": "Detect inactive metadata",
|
|
@@ -9562,244 +9682,12 @@
|
|
|
9562
9682
|
"remotesites:audit:project:hardis"
|
|
9563
9683
|
]
|
|
9564
9684
|
},
|
|
9565
|
-
"hardis:project:
|
|
9685
|
+
"hardis:project:clean:emptyitems": {
|
|
9566
9686
|
"aliases": [],
|
|
9567
9687
|
"args": {},
|
|
9568
|
-
"description": "\n## Command Behavior\n\n**
|
|
9688
|
+
"description": "\n## Command Behavior\n\n**Removes empty or irrelevant metadata items from your Salesforce DX project sources.**\n\nThis command helps maintain a clean and efficient Salesforce codebase by deleting metadata files that are essentially empty or contain no meaningful configuration. These files can sometimes be generated during retrieval processes or remain after refactoring, contributing to unnecessary clutter in your project.\n\nKey functionalities:\n\n- **Targeted Cleaning:** Specifically targets and removes empty instances of:\n - Global Value Set Translations (`.globalValueSetTranslation-meta.xml`)\n - Standard Value Sets (`.standardValueSet-meta.xml`)\n - Sharing Rules (`.sharingRules-meta.xml`)\n- **Content-Based Deletion:** It checks the XML content of these files for the presence of specific tags (e.g., `valueTranslation` for Global Value Set Translations) to determine if they are truly empty or lack relevant data.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find files matching predefined patterns for Global Value Set Translations, Standard Value Sets, and Sharing Rules within the specified root folder (defaults to `force-app`).\n- **XML Parsing:** For each matching file, it reads and parses the XML content using `parseXmlFile`.\n- **Content Validation:** It then checks the parsed XML object for the existence of specific nested properties (e.g., `xmlContent.GlobalValueSetTranslation.valueTranslation`). If these properties are missing or empty, the file is considered empty.\n- **File Deletion:** If a file is determined to be empty, it is removed from the file system using `fs.remove`.\n- **Logging:** Provides clear messages about which files are being removed and a summary of the total number of items cleaned.\n</details>\n",
|
|
9569
9689
|
"examples": [
|
|
9570
|
-
"$ sf hardis:project:
|
|
9571
|
-
],
|
|
9572
|
-
"flags": {
|
|
9573
|
-
"json": {
|
|
9574
|
-
"description": "Format output as json.",
|
|
9575
|
-
"helpGroup": "GLOBAL",
|
|
9576
|
-
"name": "json",
|
|
9577
|
-
"allowNo": false,
|
|
9578
|
-
"type": "boolean"
|
|
9579
|
-
},
|
|
9580
|
-
"flags-dir": {
|
|
9581
|
-
"helpGroup": "GLOBAL",
|
|
9582
|
-
"name": "flags-dir",
|
|
9583
|
-
"summary": "Import flag values from a directory.",
|
|
9584
|
-
"hasDynamicHelp": false,
|
|
9585
|
-
"multiple": false,
|
|
9586
|
-
"type": "option"
|
|
9587
|
-
},
|
|
9588
|
-
"devhub": {
|
|
9589
|
-
"char": "b",
|
|
9590
|
-
"description": "Configure project DevHub",
|
|
9591
|
-
"name": "devhub",
|
|
9592
|
-
"allowNo": false,
|
|
9593
|
-
"type": "boolean"
|
|
9594
|
-
},
|
|
9595
|
-
"debug": {
|
|
9596
|
-
"char": "d",
|
|
9597
|
-
"description": "Activate debug mode (more logs)",
|
|
9598
|
-
"name": "debug",
|
|
9599
|
-
"allowNo": false,
|
|
9600
|
-
"type": "boolean"
|
|
9601
|
-
},
|
|
9602
|
-
"websocket": {
|
|
9603
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9604
|
-
"name": "websocket",
|
|
9605
|
-
"hasDynamicHelp": false,
|
|
9606
|
-
"multiple": false,
|
|
9607
|
-
"type": "option"
|
|
9608
|
-
},
|
|
9609
|
-
"skipauth": {
|
|
9610
|
-
"description": "Skip authentication check when a default username is required",
|
|
9611
|
-
"name": "skipauth",
|
|
9612
|
-
"allowNo": false,
|
|
9613
|
-
"type": "boolean"
|
|
9614
|
-
},
|
|
9615
|
-
"target-org": {
|
|
9616
|
-
"aliases": [
|
|
9617
|
-
"targetusername",
|
|
9618
|
-
"u"
|
|
9619
|
-
],
|
|
9620
|
-
"char": "o",
|
|
9621
|
-
"deprecateAliases": true,
|
|
9622
|
-
"name": "target-org",
|
|
9623
|
-
"noCacheDefault": true,
|
|
9624
|
-
"summary": "Username or alias of the target org.",
|
|
9625
|
-
"hasDynamicHelp": true,
|
|
9626
|
-
"multiple": false,
|
|
9627
|
-
"type": "option"
|
|
9628
|
-
},
|
|
9629
|
-
"target-dev-hub": {
|
|
9630
|
-
"aliases": [
|
|
9631
|
-
"targetdevhubusername"
|
|
9632
|
-
],
|
|
9633
|
-
"char": "v",
|
|
9634
|
-
"deprecateAliases": true,
|
|
9635
|
-
"name": "target-dev-hub",
|
|
9636
|
-
"noCacheDefault": true,
|
|
9637
|
-
"required": false,
|
|
9638
|
-
"summary": "Username or alias of the Dev Hub org.",
|
|
9639
|
-
"hasDynamicHelp": true,
|
|
9640
|
-
"multiple": false,
|
|
9641
|
-
"type": "option"
|
|
9642
|
-
}
|
|
9643
|
-
},
|
|
9644
|
-
"hasDynamicHelp": true,
|
|
9645
|
-
"hiddenAliases": [],
|
|
9646
|
-
"id": "hardis:project:configure:auth",
|
|
9647
|
-
"pluginAlias": "sfdx-hardis",
|
|
9648
|
-
"pluginName": "sfdx-hardis",
|
|
9649
|
-
"pluginType": "core",
|
|
9650
|
-
"strict": true,
|
|
9651
|
-
"enableJsonFlag": true,
|
|
9652
|
-
"title": "Configure authentication",
|
|
9653
|
-
"requiresProject": false,
|
|
9654
|
-
"requiresDependencies": [
|
|
9655
|
-
"openssl"
|
|
9656
|
-
],
|
|
9657
|
-
"isESM": true,
|
|
9658
|
-
"relativePath": [
|
|
9659
|
-
"lib",
|
|
9660
|
-
"commands",
|
|
9661
|
-
"hardis",
|
|
9662
|
-
"project",
|
|
9663
|
-
"configure",
|
|
9664
|
-
"auth.js"
|
|
9665
|
-
],
|
|
9666
|
-
"aliasPermutations": [],
|
|
9667
|
-
"permutations": [
|
|
9668
|
-
"hardis:project:configure:auth",
|
|
9669
|
-
"project:hardis:configure:auth",
|
|
9670
|
-
"project:configure:hardis:auth",
|
|
9671
|
-
"project:configure:auth:hardis",
|
|
9672
|
-
"hardis:configure:project:auth",
|
|
9673
|
-
"configure:hardis:project:auth",
|
|
9674
|
-
"configure:project:hardis:auth",
|
|
9675
|
-
"configure:project:auth:hardis",
|
|
9676
|
-
"hardis:configure:auth:project",
|
|
9677
|
-
"configure:hardis:auth:project",
|
|
9678
|
-
"configure:auth:hardis:project",
|
|
9679
|
-
"configure:auth:project:hardis",
|
|
9680
|
-
"hardis:project:auth:configure",
|
|
9681
|
-
"project:hardis:auth:configure",
|
|
9682
|
-
"project:auth:hardis:configure",
|
|
9683
|
-
"project:auth:configure:hardis",
|
|
9684
|
-
"hardis:auth:project:configure",
|
|
9685
|
-
"auth:hardis:project:configure",
|
|
9686
|
-
"auth:project:hardis:configure",
|
|
9687
|
-
"auth:project:configure:hardis",
|
|
9688
|
-
"hardis:auth:configure:project",
|
|
9689
|
-
"auth:hardis:configure:project",
|
|
9690
|
-
"auth:configure:hardis:project",
|
|
9691
|
-
"auth:configure:project:hardis"
|
|
9692
|
-
]
|
|
9693
|
-
},
|
|
9694
|
-
"hardis:project:convert:profilestopermsets": {
|
|
9695
|
-
"aliases": [],
|
|
9696
|
-
"args": {},
|
|
9697
|
-
"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",
|
|
9698
|
-
"examples": [
|
|
9699
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
9700
|
-
],
|
|
9701
|
-
"flags": {
|
|
9702
|
-
"json": {
|
|
9703
|
-
"description": "Format output as json.",
|
|
9704
|
-
"helpGroup": "GLOBAL",
|
|
9705
|
-
"name": "json",
|
|
9706
|
-
"allowNo": false,
|
|
9707
|
-
"type": "boolean"
|
|
9708
|
-
},
|
|
9709
|
-
"flags-dir": {
|
|
9710
|
-
"helpGroup": "GLOBAL",
|
|
9711
|
-
"name": "flags-dir",
|
|
9712
|
-
"summary": "Import flag values from a directory.",
|
|
9713
|
-
"hasDynamicHelp": false,
|
|
9714
|
-
"multiple": false,
|
|
9715
|
-
"type": "option"
|
|
9716
|
-
},
|
|
9717
|
-
"except": {
|
|
9718
|
-
"char": "e",
|
|
9719
|
-
"description": "List of filters",
|
|
9720
|
-
"name": "except",
|
|
9721
|
-
"default": [],
|
|
9722
|
-
"hasDynamicHelp": false,
|
|
9723
|
-
"multiple": true,
|
|
9724
|
-
"type": "option"
|
|
9725
|
-
},
|
|
9726
|
-
"debug": {
|
|
9727
|
-
"char": "d",
|
|
9728
|
-
"description": "Activate debug mode (more logs)",
|
|
9729
|
-
"name": "debug",
|
|
9730
|
-
"allowNo": false,
|
|
9731
|
-
"type": "boolean"
|
|
9732
|
-
},
|
|
9733
|
-
"websocket": {
|
|
9734
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9735
|
-
"name": "websocket",
|
|
9736
|
-
"hasDynamicHelp": false,
|
|
9737
|
-
"multiple": false,
|
|
9738
|
-
"type": "option"
|
|
9739
|
-
},
|
|
9740
|
-
"skipauth": {
|
|
9741
|
-
"description": "Skip authentication check when a default username is required",
|
|
9742
|
-
"name": "skipauth",
|
|
9743
|
-
"allowNo": false,
|
|
9744
|
-
"type": "boolean"
|
|
9745
|
-
}
|
|
9746
|
-
},
|
|
9747
|
-
"hasDynamicHelp": false,
|
|
9748
|
-
"hiddenAliases": [],
|
|
9749
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
9750
|
-
"pluginAlias": "sfdx-hardis",
|
|
9751
|
-
"pluginName": "sfdx-hardis",
|
|
9752
|
-
"pluginType": "core",
|
|
9753
|
-
"strict": true,
|
|
9754
|
-
"enableJsonFlag": true,
|
|
9755
|
-
"title": "Convert Profiles into Permission Sets",
|
|
9756
|
-
"requiresProject": true,
|
|
9757
|
-
"requiresSfdxPlugins": [
|
|
9758
|
-
"shane-sfdx-plugins"
|
|
9759
|
-
],
|
|
9760
|
-
"isESM": true,
|
|
9761
|
-
"relativePath": [
|
|
9762
|
-
"lib",
|
|
9763
|
-
"commands",
|
|
9764
|
-
"hardis",
|
|
9765
|
-
"project",
|
|
9766
|
-
"convert",
|
|
9767
|
-
"profilestopermsets.js"
|
|
9768
|
-
],
|
|
9769
|
-
"aliasPermutations": [],
|
|
9770
|
-
"permutations": [
|
|
9771
|
-
"hardis:project:convert:profilestopermsets",
|
|
9772
|
-
"project:hardis:convert:profilestopermsets",
|
|
9773
|
-
"project:convert:hardis:profilestopermsets",
|
|
9774
|
-
"project:convert:profilestopermsets:hardis",
|
|
9775
|
-
"hardis:convert:project:profilestopermsets",
|
|
9776
|
-
"convert:hardis:project:profilestopermsets",
|
|
9777
|
-
"convert:project:hardis:profilestopermsets",
|
|
9778
|
-
"convert:project:profilestopermsets:hardis",
|
|
9779
|
-
"hardis:convert:profilestopermsets:project",
|
|
9780
|
-
"convert:hardis:profilestopermsets:project",
|
|
9781
|
-
"convert:profilestopermsets:hardis:project",
|
|
9782
|
-
"convert:profilestopermsets:project:hardis",
|
|
9783
|
-
"hardis:project:profilestopermsets:convert",
|
|
9784
|
-
"project:hardis:profilestopermsets:convert",
|
|
9785
|
-
"project:profilestopermsets:hardis:convert",
|
|
9786
|
-
"project:profilestopermsets:convert:hardis",
|
|
9787
|
-
"hardis:profilestopermsets:project:convert",
|
|
9788
|
-
"profilestopermsets:hardis:project:convert",
|
|
9789
|
-
"profilestopermsets:project:hardis:convert",
|
|
9790
|
-
"profilestopermsets:project:convert:hardis",
|
|
9791
|
-
"hardis:profilestopermsets:convert:project",
|
|
9792
|
-
"profilestopermsets:hardis:convert:project",
|
|
9793
|
-
"profilestopermsets:convert:hardis:project",
|
|
9794
|
-
"profilestopermsets:convert:project:hardis"
|
|
9795
|
-
]
|
|
9796
|
-
},
|
|
9797
|
-
"hardis:project:clean:emptyitems": {
|
|
9798
|
-
"aliases": [],
|
|
9799
|
-
"args": {},
|
|
9800
|
-
"description": "\n## Command Behavior\n\n**Removes empty or irrelevant metadata items from your Salesforce DX project sources.**\n\nThis command helps maintain a clean and efficient Salesforce codebase by deleting metadata files that are essentially empty or contain no meaningful configuration. These files can sometimes be generated during retrieval processes or remain after refactoring, contributing to unnecessary clutter in your project.\n\nKey functionalities:\n\n- **Targeted Cleaning:** Specifically targets and removes empty instances of:\n - Global Value Set Translations (`.globalValueSetTranslation-meta.xml`)\n - Standard Value Sets (`.standardValueSet-meta.xml`)\n - Sharing Rules (`.sharingRules-meta.xml`)\n- **Content-Based Deletion:** It checks the XML content of these files for the presence of specific tags (e.g., `valueTranslation` for Global Value Set Translations) to determine if they are truly empty or lack relevant data.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **File Discovery:** Uses `glob` to find files matching predefined patterns for Global Value Set Translations, Standard Value Sets, and Sharing Rules within the specified root folder (defaults to `force-app`).\n- **XML Parsing:** For each matching file, it reads and parses the XML content using `parseXmlFile`.\n- **Content Validation:** It then checks the parsed XML object for the existence of specific nested properties (e.g., `xmlContent.GlobalValueSetTranslation.valueTranslation`). If these properties are missing or empty, the file is considered empty.\n- **File Deletion:** If a file is determined to be empty, it is removed from the file system using `fs.remove`.\n- **Logging:** Provides clear messages about which files are being removed and a summary of the total number of items cleaned.\n</details>\n",
|
|
9801
|
-
"examples": [
|
|
9802
|
-
"$ sf hardis:project:clean:emptyitems"
|
|
9690
|
+
"$ sf hardis:project:clean:emptyitems"
|
|
9803
9691
|
],
|
|
9804
9692
|
"flags": {
|
|
9805
9693
|
"json": {
|
|
@@ -11279,6 +11167,238 @@
|
|
|
11279
11167
|
"xml:clean:project:hardis"
|
|
11280
11168
|
]
|
|
11281
11169
|
},
|
|
11170
|
+
"hardis:project:configure:auth": {
|
|
11171
|
+
"aliases": [],
|
|
11172
|
+
"args": {},
|
|
11173
|
+
"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",
|
|
11174
|
+
"examples": [
|
|
11175
|
+
"$ sf hardis:project:configure:auth"
|
|
11176
|
+
],
|
|
11177
|
+
"flags": {
|
|
11178
|
+
"json": {
|
|
11179
|
+
"description": "Format output as json.",
|
|
11180
|
+
"helpGroup": "GLOBAL",
|
|
11181
|
+
"name": "json",
|
|
11182
|
+
"allowNo": false,
|
|
11183
|
+
"type": "boolean"
|
|
11184
|
+
},
|
|
11185
|
+
"flags-dir": {
|
|
11186
|
+
"helpGroup": "GLOBAL",
|
|
11187
|
+
"name": "flags-dir",
|
|
11188
|
+
"summary": "Import flag values from a directory.",
|
|
11189
|
+
"hasDynamicHelp": false,
|
|
11190
|
+
"multiple": false,
|
|
11191
|
+
"type": "option"
|
|
11192
|
+
},
|
|
11193
|
+
"devhub": {
|
|
11194
|
+
"char": "b",
|
|
11195
|
+
"description": "Configure project DevHub",
|
|
11196
|
+
"name": "devhub",
|
|
11197
|
+
"allowNo": false,
|
|
11198
|
+
"type": "boolean"
|
|
11199
|
+
},
|
|
11200
|
+
"debug": {
|
|
11201
|
+
"char": "d",
|
|
11202
|
+
"description": "Activate debug mode (more logs)",
|
|
11203
|
+
"name": "debug",
|
|
11204
|
+
"allowNo": false,
|
|
11205
|
+
"type": "boolean"
|
|
11206
|
+
},
|
|
11207
|
+
"websocket": {
|
|
11208
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11209
|
+
"name": "websocket",
|
|
11210
|
+
"hasDynamicHelp": false,
|
|
11211
|
+
"multiple": false,
|
|
11212
|
+
"type": "option"
|
|
11213
|
+
},
|
|
11214
|
+
"skipauth": {
|
|
11215
|
+
"description": "Skip authentication check when a default username is required",
|
|
11216
|
+
"name": "skipauth",
|
|
11217
|
+
"allowNo": false,
|
|
11218
|
+
"type": "boolean"
|
|
11219
|
+
},
|
|
11220
|
+
"target-org": {
|
|
11221
|
+
"aliases": [
|
|
11222
|
+
"targetusername",
|
|
11223
|
+
"u"
|
|
11224
|
+
],
|
|
11225
|
+
"char": "o",
|
|
11226
|
+
"deprecateAliases": true,
|
|
11227
|
+
"name": "target-org",
|
|
11228
|
+
"noCacheDefault": true,
|
|
11229
|
+
"summary": "Username or alias of the target org.",
|
|
11230
|
+
"hasDynamicHelp": true,
|
|
11231
|
+
"multiple": false,
|
|
11232
|
+
"type": "option"
|
|
11233
|
+
},
|
|
11234
|
+
"target-dev-hub": {
|
|
11235
|
+
"aliases": [
|
|
11236
|
+
"targetdevhubusername"
|
|
11237
|
+
],
|
|
11238
|
+
"char": "v",
|
|
11239
|
+
"deprecateAliases": true,
|
|
11240
|
+
"name": "target-dev-hub",
|
|
11241
|
+
"noCacheDefault": true,
|
|
11242
|
+
"required": false,
|
|
11243
|
+
"summary": "Username or alias of the Dev Hub org.",
|
|
11244
|
+
"hasDynamicHelp": true,
|
|
11245
|
+
"multiple": false,
|
|
11246
|
+
"type": "option"
|
|
11247
|
+
}
|
|
11248
|
+
},
|
|
11249
|
+
"hasDynamicHelp": true,
|
|
11250
|
+
"hiddenAliases": [],
|
|
11251
|
+
"id": "hardis:project:configure:auth",
|
|
11252
|
+
"pluginAlias": "sfdx-hardis",
|
|
11253
|
+
"pluginName": "sfdx-hardis",
|
|
11254
|
+
"pluginType": "core",
|
|
11255
|
+
"strict": true,
|
|
11256
|
+
"enableJsonFlag": true,
|
|
11257
|
+
"title": "Configure authentication",
|
|
11258
|
+
"requiresProject": false,
|
|
11259
|
+
"requiresDependencies": [
|
|
11260
|
+
"openssl"
|
|
11261
|
+
],
|
|
11262
|
+
"isESM": true,
|
|
11263
|
+
"relativePath": [
|
|
11264
|
+
"lib",
|
|
11265
|
+
"commands",
|
|
11266
|
+
"hardis",
|
|
11267
|
+
"project",
|
|
11268
|
+
"configure",
|
|
11269
|
+
"auth.js"
|
|
11270
|
+
],
|
|
11271
|
+
"aliasPermutations": [],
|
|
11272
|
+
"permutations": [
|
|
11273
|
+
"hardis:project:configure:auth",
|
|
11274
|
+
"project:hardis:configure:auth",
|
|
11275
|
+
"project:configure:hardis:auth",
|
|
11276
|
+
"project:configure:auth:hardis",
|
|
11277
|
+
"hardis:configure:project:auth",
|
|
11278
|
+
"configure:hardis:project:auth",
|
|
11279
|
+
"configure:project:hardis:auth",
|
|
11280
|
+
"configure:project:auth:hardis",
|
|
11281
|
+
"hardis:configure:auth:project",
|
|
11282
|
+
"configure:hardis:auth:project",
|
|
11283
|
+
"configure:auth:hardis:project",
|
|
11284
|
+
"configure:auth:project:hardis",
|
|
11285
|
+
"hardis:project:auth:configure",
|
|
11286
|
+
"project:hardis:auth:configure",
|
|
11287
|
+
"project:auth:hardis:configure",
|
|
11288
|
+
"project:auth:configure:hardis",
|
|
11289
|
+
"hardis:auth:project:configure",
|
|
11290
|
+
"auth:hardis:project:configure",
|
|
11291
|
+
"auth:project:hardis:configure",
|
|
11292
|
+
"auth:project:configure:hardis",
|
|
11293
|
+
"hardis:auth:configure:project",
|
|
11294
|
+
"auth:hardis:configure:project",
|
|
11295
|
+
"auth:configure:hardis:project",
|
|
11296
|
+
"auth:configure:project:hardis"
|
|
11297
|
+
]
|
|
11298
|
+
},
|
|
11299
|
+
"hardis:project:convert:profilestopermsets": {
|
|
11300
|
+
"aliases": [],
|
|
11301
|
+
"args": {},
|
|
11302
|
+
"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",
|
|
11303
|
+
"examples": [
|
|
11304
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
11305
|
+
],
|
|
11306
|
+
"flags": {
|
|
11307
|
+
"json": {
|
|
11308
|
+
"description": "Format output as json.",
|
|
11309
|
+
"helpGroup": "GLOBAL",
|
|
11310
|
+
"name": "json",
|
|
11311
|
+
"allowNo": false,
|
|
11312
|
+
"type": "boolean"
|
|
11313
|
+
},
|
|
11314
|
+
"flags-dir": {
|
|
11315
|
+
"helpGroup": "GLOBAL",
|
|
11316
|
+
"name": "flags-dir",
|
|
11317
|
+
"summary": "Import flag values from a directory.",
|
|
11318
|
+
"hasDynamicHelp": false,
|
|
11319
|
+
"multiple": false,
|
|
11320
|
+
"type": "option"
|
|
11321
|
+
},
|
|
11322
|
+
"except": {
|
|
11323
|
+
"char": "e",
|
|
11324
|
+
"description": "List of filters",
|
|
11325
|
+
"name": "except",
|
|
11326
|
+
"default": [],
|
|
11327
|
+
"hasDynamicHelp": false,
|
|
11328
|
+
"multiple": true,
|
|
11329
|
+
"type": "option"
|
|
11330
|
+
},
|
|
11331
|
+
"debug": {
|
|
11332
|
+
"char": "d",
|
|
11333
|
+
"description": "Activate debug mode (more logs)",
|
|
11334
|
+
"name": "debug",
|
|
11335
|
+
"allowNo": false,
|
|
11336
|
+
"type": "boolean"
|
|
11337
|
+
},
|
|
11338
|
+
"websocket": {
|
|
11339
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11340
|
+
"name": "websocket",
|
|
11341
|
+
"hasDynamicHelp": false,
|
|
11342
|
+
"multiple": false,
|
|
11343
|
+
"type": "option"
|
|
11344
|
+
},
|
|
11345
|
+
"skipauth": {
|
|
11346
|
+
"description": "Skip authentication check when a default username is required",
|
|
11347
|
+
"name": "skipauth",
|
|
11348
|
+
"allowNo": false,
|
|
11349
|
+
"type": "boolean"
|
|
11350
|
+
}
|
|
11351
|
+
},
|
|
11352
|
+
"hasDynamicHelp": false,
|
|
11353
|
+
"hiddenAliases": [],
|
|
11354
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
11355
|
+
"pluginAlias": "sfdx-hardis",
|
|
11356
|
+
"pluginName": "sfdx-hardis",
|
|
11357
|
+
"pluginType": "core",
|
|
11358
|
+
"strict": true,
|
|
11359
|
+
"enableJsonFlag": true,
|
|
11360
|
+
"title": "Convert Profiles into Permission Sets",
|
|
11361
|
+
"requiresProject": true,
|
|
11362
|
+
"requiresSfdxPlugins": [
|
|
11363
|
+
"shane-sfdx-plugins"
|
|
11364
|
+
],
|
|
11365
|
+
"isESM": true,
|
|
11366
|
+
"relativePath": [
|
|
11367
|
+
"lib",
|
|
11368
|
+
"commands",
|
|
11369
|
+
"hardis",
|
|
11370
|
+
"project",
|
|
11371
|
+
"convert",
|
|
11372
|
+
"profilestopermsets.js"
|
|
11373
|
+
],
|
|
11374
|
+
"aliasPermutations": [],
|
|
11375
|
+
"permutations": [
|
|
11376
|
+
"hardis:project:convert:profilestopermsets",
|
|
11377
|
+
"project:hardis:convert:profilestopermsets",
|
|
11378
|
+
"project:convert:hardis:profilestopermsets",
|
|
11379
|
+
"project:convert:profilestopermsets:hardis",
|
|
11380
|
+
"hardis:convert:project:profilestopermsets",
|
|
11381
|
+
"convert:hardis:project:profilestopermsets",
|
|
11382
|
+
"convert:project:hardis:profilestopermsets",
|
|
11383
|
+
"convert:project:profilestopermsets:hardis",
|
|
11384
|
+
"hardis:convert:profilestopermsets:project",
|
|
11385
|
+
"convert:hardis:profilestopermsets:project",
|
|
11386
|
+
"convert:profilestopermsets:hardis:project",
|
|
11387
|
+
"convert:profilestopermsets:project:hardis",
|
|
11388
|
+
"hardis:project:profilestopermsets:convert",
|
|
11389
|
+
"project:hardis:profilestopermsets:convert",
|
|
11390
|
+
"project:profilestopermsets:hardis:convert",
|
|
11391
|
+
"project:profilestopermsets:convert:hardis",
|
|
11392
|
+
"hardis:profilestopermsets:project:convert",
|
|
11393
|
+
"profilestopermsets:hardis:project:convert",
|
|
11394
|
+
"profilestopermsets:project:hardis:convert",
|
|
11395
|
+
"profilestopermsets:project:convert:hardis",
|
|
11396
|
+
"hardis:profilestopermsets:convert:project",
|
|
11397
|
+
"profilestopermsets:hardis:convert:project",
|
|
11398
|
+
"profilestopermsets:convert:hardis:project",
|
|
11399
|
+
"profilestopermsets:convert:project:hardis"
|
|
11400
|
+
]
|
|
11401
|
+
},
|
|
11282
11402
|
"hardis:project:deploy:notify": {
|
|
11283
11403
|
"aliases": [],
|
|
11284
11404
|
"args": {},
|
|
@@ -15151,5 +15271,5 @@
|
|
|
15151
15271
|
]
|
|
15152
15272
|
}
|
|
15153
15273
|
},
|
|
15154
|
-
"version": "6.
|
|
15274
|
+
"version": "6.3.1"
|
|
15155
15275
|
}
|