sfdx-hardis 6.1.0 → 6.1.1-beta202508232242.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 +2 -0
- package/lib/common/utils/authUtils.d.ts +1 -0
- package/lib/common/utils/authUtils.js +78 -39
- package/lib/common/utils/authUtils.js.map +1 -1
- package/lib/common/utils/index.d.ts +1 -0
- package/lib/common/utils/index.js +17 -0
- package/lib/common/utils/index.js.map +1 -1
- package/lib/common/utils/orgUtils.js +6 -1
- package/lib/common/utils/orgUtils.js.map +1 -1
- package/oclif.manifest.json +355 -355
- package/package.json +1 -1
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": {
|
|
@@ -9513,12 +9513,12 @@
|
|
|
9513
9513
|
"remotesites:audit:project:hardis"
|
|
9514
9514
|
]
|
|
9515
9515
|
},
|
|
9516
|
-
"hardis:project:
|
|
9516
|
+
"hardis:project:configure:auth": {
|
|
9517
9517
|
"aliases": [],
|
|
9518
9518
|
"args": {},
|
|
9519
|
-
"description": "\n## Command Behavior\n\n**
|
|
9519
|
+
"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",
|
|
9520
9520
|
"examples": [
|
|
9521
|
-
"$ sf hardis:project:
|
|
9521
|
+
"$ sf hardis:project:configure:auth"
|
|
9522
9522
|
],
|
|
9523
9523
|
"flags": {
|
|
9524
9524
|
"json": {
|
|
@@ -9536,14 +9536,12 @@
|
|
|
9536
9536
|
"multiple": false,
|
|
9537
9537
|
"type": "option"
|
|
9538
9538
|
},
|
|
9539
|
-
"
|
|
9540
|
-
"char": "
|
|
9541
|
-
"description": "
|
|
9542
|
-
"name": "
|
|
9543
|
-
"
|
|
9544
|
-
"
|
|
9545
|
-
"multiple": false,
|
|
9546
|
-
"type": "option"
|
|
9539
|
+
"devhub": {
|
|
9540
|
+
"char": "b",
|
|
9541
|
+
"description": "Configure project DevHub",
|
|
9542
|
+
"name": "devhub",
|
|
9543
|
+
"allowNo": false,
|
|
9544
|
+
"type": "boolean"
|
|
9547
9545
|
},
|
|
9548
9546
|
"debug": {
|
|
9549
9547
|
"char": "d",
|
|
@@ -9564,62 +9562,92 @@
|
|
|
9564
9562
|
"name": "skipauth",
|
|
9565
9563
|
"allowNo": false,
|
|
9566
9564
|
"type": "boolean"
|
|
9565
|
+
},
|
|
9566
|
+
"target-org": {
|
|
9567
|
+
"aliases": [
|
|
9568
|
+
"targetusername",
|
|
9569
|
+
"u"
|
|
9570
|
+
],
|
|
9571
|
+
"char": "o",
|
|
9572
|
+
"deprecateAliases": true,
|
|
9573
|
+
"name": "target-org",
|
|
9574
|
+
"noCacheDefault": true,
|
|
9575
|
+
"summary": "Username or alias of the target org.",
|
|
9576
|
+
"hasDynamicHelp": true,
|
|
9577
|
+
"multiple": false,
|
|
9578
|
+
"type": "option"
|
|
9579
|
+
},
|
|
9580
|
+
"target-dev-hub": {
|
|
9581
|
+
"aliases": [
|
|
9582
|
+
"targetdevhubusername"
|
|
9583
|
+
],
|
|
9584
|
+
"char": "v",
|
|
9585
|
+
"deprecateAliases": true,
|
|
9586
|
+
"name": "target-dev-hub",
|
|
9587
|
+
"noCacheDefault": true,
|
|
9588
|
+
"required": false,
|
|
9589
|
+
"summary": "Username or alias of the Dev Hub org.",
|
|
9590
|
+
"hasDynamicHelp": true,
|
|
9591
|
+
"multiple": false,
|
|
9592
|
+
"type": "option"
|
|
9567
9593
|
}
|
|
9568
9594
|
},
|
|
9569
|
-
"hasDynamicHelp":
|
|
9595
|
+
"hasDynamicHelp": true,
|
|
9570
9596
|
"hiddenAliases": [],
|
|
9571
|
-
"id": "hardis:project:
|
|
9597
|
+
"id": "hardis:project:configure:auth",
|
|
9572
9598
|
"pluginAlias": "sfdx-hardis",
|
|
9573
9599
|
"pluginName": "sfdx-hardis",
|
|
9574
9600
|
"pluginType": "core",
|
|
9575
9601
|
"strict": true,
|
|
9576
9602
|
"enableJsonFlag": true,
|
|
9577
|
-
"title": "
|
|
9578
|
-
"requiresProject":
|
|
9603
|
+
"title": "Configure authentication",
|
|
9604
|
+
"requiresProject": false,
|
|
9605
|
+
"requiresDependencies": [
|
|
9606
|
+
"openssl"
|
|
9607
|
+
],
|
|
9579
9608
|
"isESM": true,
|
|
9580
9609
|
"relativePath": [
|
|
9581
9610
|
"lib",
|
|
9582
9611
|
"commands",
|
|
9583
9612
|
"hardis",
|
|
9584
9613
|
"project",
|
|
9585
|
-
"
|
|
9586
|
-
"
|
|
9614
|
+
"configure",
|
|
9615
|
+
"auth.js"
|
|
9587
9616
|
],
|
|
9588
9617
|
"aliasPermutations": [],
|
|
9589
9618
|
"permutations": [
|
|
9590
|
-
"hardis:project:
|
|
9591
|
-
"project:hardis:
|
|
9592
|
-
"project:
|
|
9593
|
-
"project:
|
|
9594
|
-
"hardis:
|
|
9595
|
-
"
|
|
9596
|
-
"
|
|
9597
|
-
"
|
|
9598
|
-
"hardis:
|
|
9599
|
-
"
|
|
9600
|
-
"
|
|
9601
|
-
"
|
|
9602
|
-
"hardis:project:
|
|
9603
|
-
"project:hardis:
|
|
9604
|
-
"project:
|
|
9605
|
-
"project:
|
|
9606
|
-
"hardis:
|
|
9607
|
-
"
|
|
9608
|
-
"
|
|
9609
|
-
"
|
|
9610
|
-
"hardis:
|
|
9611
|
-
"
|
|
9612
|
-
"
|
|
9613
|
-
"
|
|
9619
|
+
"hardis:project:configure:auth",
|
|
9620
|
+
"project:hardis:configure:auth",
|
|
9621
|
+
"project:configure:hardis:auth",
|
|
9622
|
+
"project:configure:auth:hardis",
|
|
9623
|
+
"hardis:configure:project:auth",
|
|
9624
|
+
"configure:hardis:project:auth",
|
|
9625
|
+
"configure:project:hardis:auth",
|
|
9626
|
+
"configure:project:auth:hardis",
|
|
9627
|
+
"hardis:configure:auth:project",
|
|
9628
|
+
"configure:hardis:auth:project",
|
|
9629
|
+
"configure:auth:hardis:project",
|
|
9630
|
+
"configure:auth:project:hardis",
|
|
9631
|
+
"hardis:project:auth:configure",
|
|
9632
|
+
"project:hardis:auth:configure",
|
|
9633
|
+
"project:auth:hardis:configure",
|
|
9634
|
+
"project:auth:configure:hardis",
|
|
9635
|
+
"hardis:auth:project:configure",
|
|
9636
|
+
"auth:hardis:project:configure",
|
|
9637
|
+
"auth:project:hardis:configure",
|
|
9638
|
+
"auth:project:configure:hardis",
|
|
9639
|
+
"hardis:auth:configure:project",
|
|
9640
|
+
"auth:hardis:configure:project",
|
|
9641
|
+
"auth:configure:hardis:project",
|
|
9642
|
+
"auth:configure:project:hardis"
|
|
9614
9643
|
]
|
|
9615
9644
|
},
|
|
9616
|
-
"hardis:project:
|
|
9645
|
+
"hardis:project:convert:profilestopermsets": {
|
|
9617
9646
|
"aliases": [],
|
|
9618
9647
|
"args": {},
|
|
9619
|
-
"description": "\n## Command Behavior\n\n**
|
|
9648
|
+
"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",
|
|
9620
9649
|
"examples": [
|
|
9621
|
-
"sf hardis:project:
|
|
9622
|
-
"sf hardis:project:clean:filter-xml-content -i \"retrieveUnpackaged\""
|
|
9650
|
+
"$ sf hardis:project:convert:profilestopermsets"
|
|
9623
9651
|
],
|
|
9624
9652
|
"flags": {
|
|
9625
9653
|
"json": {
|
|
@@ -9637,44 +9665,248 @@
|
|
|
9637
9665
|
"multiple": false,
|
|
9638
9666
|
"type": "option"
|
|
9639
9667
|
},
|
|
9640
|
-
"
|
|
9641
|
-
"char": "
|
|
9642
|
-
"description": "
|
|
9643
|
-
"name": "
|
|
9644
|
-
"
|
|
9645
|
-
"multiple": false,
|
|
9646
|
-
"type": "option"
|
|
9647
|
-
},
|
|
9648
|
-
"inputfolder": {
|
|
9649
|
-
"char": "i",
|
|
9650
|
-
"description": "Input folder (default: \".\" )",
|
|
9651
|
-
"name": "inputfolder",
|
|
9652
|
-
"hasDynamicHelp": false,
|
|
9653
|
-
"multiple": false,
|
|
9654
|
-
"type": "option"
|
|
9655
|
-
},
|
|
9656
|
-
"outputfolder": {
|
|
9657
|
-
"char": "f",
|
|
9658
|
-
"description": "Output folder (default: parentFolder + _xml_content_filtered)",
|
|
9659
|
-
"name": "outputfolder",
|
|
9668
|
+
"except": {
|
|
9669
|
+
"char": "e",
|
|
9670
|
+
"description": "List of filters",
|
|
9671
|
+
"name": "except",
|
|
9672
|
+
"default": [],
|
|
9660
9673
|
"hasDynamicHelp": false,
|
|
9661
|
-
"multiple":
|
|
9674
|
+
"multiple": true,
|
|
9662
9675
|
"type": "option"
|
|
9663
9676
|
},
|
|
9664
9677
|
"debug": {
|
|
9665
|
-
"
|
|
9678
|
+
"char": "d",
|
|
9679
|
+
"description": "Activate debug mode (more logs)",
|
|
9666
9680
|
"name": "debug",
|
|
9667
9681
|
"allowNo": false,
|
|
9668
9682
|
"type": "boolean"
|
|
9669
9683
|
},
|
|
9670
9684
|
"websocket": {
|
|
9671
|
-
"description": "
|
|
9685
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9672
9686
|
"name": "websocket",
|
|
9673
9687
|
"hasDynamicHelp": false,
|
|
9674
9688
|
"multiple": false,
|
|
9675
9689
|
"type": "option"
|
|
9676
|
-
}
|
|
9677
|
-
|
|
9690
|
+
},
|
|
9691
|
+
"skipauth": {
|
|
9692
|
+
"description": "Skip authentication check when a default username is required",
|
|
9693
|
+
"name": "skipauth",
|
|
9694
|
+
"allowNo": false,
|
|
9695
|
+
"type": "boolean"
|
|
9696
|
+
}
|
|
9697
|
+
},
|
|
9698
|
+
"hasDynamicHelp": false,
|
|
9699
|
+
"hiddenAliases": [],
|
|
9700
|
+
"id": "hardis:project:convert:profilestopermsets",
|
|
9701
|
+
"pluginAlias": "sfdx-hardis",
|
|
9702
|
+
"pluginName": "sfdx-hardis",
|
|
9703
|
+
"pluginType": "core",
|
|
9704
|
+
"strict": true,
|
|
9705
|
+
"enableJsonFlag": true,
|
|
9706
|
+
"title": "Convert Profiles into Permission Sets",
|
|
9707
|
+
"requiresProject": true,
|
|
9708
|
+
"requiresSfdxPlugins": [
|
|
9709
|
+
"shane-sfdx-plugins"
|
|
9710
|
+
],
|
|
9711
|
+
"isESM": true,
|
|
9712
|
+
"relativePath": [
|
|
9713
|
+
"lib",
|
|
9714
|
+
"commands",
|
|
9715
|
+
"hardis",
|
|
9716
|
+
"project",
|
|
9717
|
+
"convert",
|
|
9718
|
+
"profilestopermsets.js"
|
|
9719
|
+
],
|
|
9720
|
+
"aliasPermutations": [],
|
|
9721
|
+
"permutations": [
|
|
9722
|
+
"hardis:project:convert:profilestopermsets",
|
|
9723
|
+
"project:hardis:convert:profilestopermsets",
|
|
9724
|
+
"project:convert:hardis:profilestopermsets",
|
|
9725
|
+
"project:convert:profilestopermsets:hardis",
|
|
9726
|
+
"hardis:convert:project:profilestopermsets",
|
|
9727
|
+
"convert:hardis:project:profilestopermsets",
|
|
9728
|
+
"convert:project:hardis:profilestopermsets",
|
|
9729
|
+
"convert:project:profilestopermsets:hardis",
|
|
9730
|
+
"hardis:convert:profilestopermsets:project",
|
|
9731
|
+
"convert:hardis:profilestopermsets:project",
|
|
9732
|
+
"convert:profilestopermsets:hardis:project",
|
|
9733
|
+
"convert:profilestopermsets:project:hardis",
|
|
9734
|
+
"hardis:project:profilestopermsets:convert",
|
|
9735
|
+
"project:hardis:profilestopermsets:convert",
|
|
9736
|
+
"project:profilestopermsets:hardis:convert",
|
|
9737
|
+
"project:profilestopermsets:convert:hardis",
|
|
9738
|
+
"hardis:profilestopermsets:project:convert",
|
|
9739
|
+
"profilestopermsets:hardis:project:convert",
|
|
9740
|
+
"profilestopermsets:project:hardis:convert",
|
|
9741
|
+
"profilestopermsets:project:convert:hardis",
|
|
9742
|
+
"hardis:profilestopermsets:convert:project",
|
|
9743
|
+
"profilestopermsets:hardis:convert:project",
|
|
9744
|
+
"profilestopermsets:convert:hardis:project",
|
|
9745
|
+
"profilestopermsets:convert:project:hardis"
|
|
9746
|
+
]
|
|
9747
|
+
},
|
|
9748
|
+
"hardis:project:clean:emptyitems": {
|
|
9749
|
+
"aliases": [],
|
|
9750
|
+
"args": {},
|
|
9751
|
+
"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",
|
|
9752
|
+
"examples": [
|
|
9753
|
+
"$ sf hardis:project:clean:emptyitems"
|
|
9754
|
+
],
|
|
9755
|
+
"flags": {
|
|
9756
|
+
"json": {
|
|
9757
|
+
"description": "Format output as json.",
|
|
9758
|
+
"helpGroup": "GLOBAL",
|
|
9759
|
+
"name": "json",
|
|
9760
|
+
"allowNo": false,
|
|
9761
|
+
"type": "boolean"
|
|
9762
|
+
},
|
|
9763
|
+
"flags-dir": {
|
|
9764
|
+
"helpGroup": "GLOBAL",
|
|
9765
|
+
"name": "flags-dir",
|
|
9766
|
+
"summary": "Import flag values from a directory.",
|
|
9767
|
+
"hasDynamicHelp": false,
|
|
9768
|
+
"multiple": false,
|
|
9769
|
+
"type": "option"
|
|
9770
|
+
},
|
|
9771
|
+
"folder": {
|
|
9772
|
+
"char": "f",
|
|
9773
|
+
"description": "Root folder",
|
|
9774
|
+
"name": "folder",
|
|
9775
|
+
"default": "force-app",
|
|
9776
|
+
"hasDynamicHelp": false,
|
|
9777
|
+
"multiple": false,
|
|
9778
|
+
"type": "option"
|
|
9779
|
+
},
|
|
9780
|
+
"debug": {
|
|
9781
|
+
"char": "d",
|
|
9782
|
+
"description": "Activate debug mode (more logs)",
|
|
9783
|
+
"name": "debug",
|
|
9784
|
+
"allowNo": false,
|
|
9785
|
+
"type": "boolean"
|
|
9786
|
+
},
|
|
9787
|
+
"websocket": {
|
|
9788
|
+
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
9789
|
+
"name": "websocket",
|
|
9790
|
+
"hasDynamicHelp": false,
|
|
9791
|
+
"multiple": false,
|
|
9792
|
+
"type": "option"
|
|
9793
|
+
},
|
|
9794
|
+
"skipauth": {
|
|
9795
|
+
"description": "Skip authentication check when a default username is required",
|
|
9796
|
+
"name": "skipauth",
|
|
9797
|
+
"allowNo": false,
|
|
9798
|
+
"type": "boolean"
|
|
9799
|
+
}
|
|
9800
|
+
},
|
|
9801
|
+
"hasDynamicHelp": false,
|
|
9802
|
+
"hiddenAliases": [],
|
|
9803
|
+
"id": "hardis:project:clean:emptyitems",
|
|
9804
|
+
"pluginAlias": "sfdx-hardis",
|
|
9805
|
+
"pluginName": "sfdx-hardis",
|
|
9806
|
+
"pluginType": "core",
|
|
9807
|
+
"strict": true,
|
|
9808
|
+
"enableJsonFlag": true,
|
|
9809
|
+
"title": "Clean retrieved empty items in dx sources",
|
|
9810
|
+
"requiresProject": true,
|
|
9811
|
+
"isESM": true,
|
|
9812
|
+
"relativePath": [
|
|
9813
|
+
"lib",
|
|
9814
|
+
"commands",
|
|
9815
|
+
"hardis",
|
|
9816
|
+
"project",
|
|
9817
|
+
"clean",
|
|
9818
|
+
"emptyitems.js"
|
|
9819
|
+
],
|
|
9820
|
+
"aliasPermutations": [],
|
|
9821
|
+
"permutations": [
|
|
9822
|
+
"hardis:project:clean:emptyitems",
|
|
9823
|
+
"project:hardis:clean:emptyitems",
|
|
9824
|
+
"project:clean:hardis:emptyitems",
|
|
9825
|
+
"project:clean:emptyitems:hardis",
|
|
9826
|
+
"hardis:clean:project:emptyitems",
|
|
9827
|
+
"clean:hardis:project:emptyitems",
|
|
9828
|
+
"clean:project:hardis:emptyitems",
|
|
9829
|
+
"clean:project:emptyitems:hardis",
|
|
9830
|
+
"hardis:clean:emptyitems:project",
|
|
9831
|
+
"clean:hardis:emptyitems:project",
|
|
9832
|
+
"clean:emptyitems:hardis:project",
|
|
9833
|
+
"clean:emptyitems:project:hardis",
|
|
9834
|
+
"hardis:project:emptyitems:clean",
|
|
9835
|
+
"project:hardis:emptyitems:clean",
|
|
9836
|
+
"project:emptyitems:hardis:clean",
|
|
9837
|
+
"project:emptyitems:clean:hardis",
|
|
9838
|
+
"hardis:emptyitems:project:clean",
|
|
9839
|
+
"emptyitems:hardis:project:clean",
|
|
9840
|
+
"emptyitems:project:hardis:clean",
|
|
9841
|
+
"emptyitems:project:clean:hardis",
|
|
9842
|
+
"hardis:emptyitems:clean:project",
|
|
9843
|
+
"emptyitems:hardis:clean:project",
|
|
9844
|
+
"emptyitems:clean:hardis:project",
|
|
9845
|
+
"emptyitems:clean:project:hardis"
|
|
9846
|
+
]
|
|
9847
|
+
},
|
|
9848
|
+
"hardis:project:clean:filter-xml-content": {
|
|
9849
|
+
"aliases": [],
|
|
9850
|
+
"args": {},
|
|
9851
|
+
"description": "\n## Command Behavior\n\n**Filters the content of Salesforce metadata XML files to remove specific elements, enabling more granular deployments.**\n\nThis command addresses a common challenge in Salesforce development: deploying only a subset of metadata from an XML file when the target org might not support all elements or when certain elements are not desired. It allows you to define rules in a JSON configuration file to remove unwanted XML nodes.\n\nKey functionalities:\n\n- **Configurable Filtering:** Uses a JSON configuration file (e.g., `filter-config.json`) to define which XML elements to remove. This configuration specifies the XML tags to target and the values within those tags that should trigger removal.\n- **Targeted File Processing:** Processes XML files within a specified input folder (defaults to current directory) and writes the filtered content to an output folder.\n- **Example Use Cases:** Useful for scenarios like:\n - Removing references to features not enabled in the target org.\n - Stripping out specific profile permissions or field-level security settings.\n - Cleaning up metadata that is not relevant to a particular deployment.\n\n<details markdown=\"1\">\n<summary>Technical explanations</summary>\n\nThe command's technical implementation involves:\n\n- **Configuration Loading:** Reads the `filter-config.json` file, which contains an array of `filters`. Each filter defines a `name`, `description`, `folders` (where to apply the filter), `file_extensions`, and an `exclude_list`.\n- **File System Operations:** Copies the input folder to an output folder (if different) to avoid modifying original files directly. It then iterates through the files in the output folder that match the specified file extensions.\n- **XML Parsing and Manipulation:** For each matching XML file:\n - It uses `xml2js.Parser` to parse the XML content into a JavaScript object.\n - It recursively traverses the JavaScript object, applying the `filterElement` function.\n - The `filterElement` function checks for `type_tag` and `identifier_tag` defined in the `exclude_list`. If a match is found and the value is in the `excludeDef.values`, the element is removed from the XML structure.\n - After filtering, it uses `writeXmlFile` to write the modified JavaScript object back to the XML file.\n- **Logging:** Provides detailed logs about the filtering process, including which files are being processed and which elements are being filtered.\n- **Summary Reporting:** Tracks and reports on the files that have been updated due to filtering.\n</details>\n",
|
|
9852
|
+
"examples": [
|
|
9853
|
+
"sf hardis:project:clean:filter-xml-content -i \"./mdapi_output\"",
|
|
9854
|
+
"sf hardis:project:clean:filter-xml-content -i \"retrieveUnpackaged\""
|
|
9855
|
+
],
|
|
9856
|
+
"flags": {
|
|
9857
|
+
"json": {
|
|
9858
|
+
"description": "Format output as json.",
|
|
9859
|
+
"helpGroup": "GLOBAL",
|
|
9860
|
+
"name": "json",
|
|
9861
|
+
"allowNo": false,
|
|
9862
|
+
"type": "boolean"
|
|
9863
|
+
},
|
|
9864
|
+
"flags-dir": {
|
|
9865
|
+
"helpGroup": "GLOBAL",
|
|
9866
|
+
"name": "flags-dir",
|
|
9867
|
+
"summary": "Import flag values from a directory.",
|
|
9868
|
+
"hasDynamicHelp": false,
|
|
9869
|
+
"multiple": false,
|
|
9870
|
+
"type": "option"
|
|
9871
|
+
},
|
|
9872
|
+
"configfile": {
|
|
9873
|
+
"char": "c",
|
|
9874
|
+
"description": "Config JSON file path",
|
|
9875
|
+
"name": "configfile",
|
|
9876
|
+
"hasDynamicHelp": false,
|
|
9877
|
+
"multiple": false,
|
|
9878
|
+
"type": "option"
|
|
9879
|
+
},
|
|
9880
|
+
"inputfolder": {
|
|
9881
|
+
"char": "i",
|
|
9882
|
+
"description": "Input folder (default: \".\" )",
|
|
9883
|
+
"name": "inputfolder",
|
|
9884
|
+
"hasDynamicHelp": false,
|
|
9885
|
+
"multiple": false,
|
|
9886
|
+
"type": "option"
|
|
9887
|
+
},
|
|
9888
|
+
"outputfolder": {
|
|
9889
|
+
"char": "f",
|
|
9890
|
+
"description": "Output folder (default: parentFolder + _xml_content_filtered)",
|
|
9891
|
+
"name": "outputfolder",
|
|
9892
|
+
"hasDynamicHelp": false,
|
|
9893
|
+
"multiple": false,
|
|
9894
|
+
"type": "option"
|
|
9895
|
+
},
|
|
9896
|
+
"debug": {
|
|
9897
|
+
"description": "debug",
|
|
9898
|
+
"name": "debug",
|
|
9899
|
+
"allowNo": false,
|
|
9900
|
+
"type": "boolean"
|
|
9901
|
+
},
|
|
9902
|
+
"websocket": {
|
|
9903
|
+
"description": "websocket",
|
|
9904
|
+
"name": "websocket",
|
|
9905
|
+
"hasDynamicHelp": false,
|
|
9906
|
+
"multiple": false,
|
|
9907
|
+
"type": "option"
|
|
9908
|
+
}
|
|
9909
|
+
},
|
|
9678
9910
|
"hasDynamicHelp": false,
|
|
9679
9911
|
"hiddenAliases": [],
|
|
9680
9912
|
"id": "hardis:project:clean:filter-xml-content",
|
|
@@ -10998,238 +11230,6 @@
|
|
|
10998
11230
|
"xml:clean:project:hardis"
|
|
10999
11231
|
]
|
|
11000
11232
|
},
|
|
11001
|
-
"hardis:project:configure:auth": {
|
|
11002
|
-
"aliases": [],
|
|
11003
|
-
"args": {},
|
|
11004
|
-
"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",
|
|
11005
|
-
"examples": [
|
|
11006
|
-
"$ sf hardis:project:configure:auth"
|
|
11007
|
-
],
|
|
11008
|
-
"flags": {
|
|
11009
|
-
"json": {
|
|
11010
|
-
"description": "Format output as json.",
|
|
11011
|
-
"helpGroup": "GLOBAL",
|
|
11012
|
-
"name": "json",
|
|
11013
|
-
"allowNo": false,
|
|
11014
|
-
"type": "boolean"
|
|
11015
|
-
},
|
|
11016
|
-
"flags-dir": {
|
|
11017
|
-
"helpGroup": "GLOBAL",
|
|
11018
|
-
"name": "flags-dir",
|
|
11019
|
-
"summary": "Import flag values from a directory.",
|
|
11020
|
-
"hasDynamicHelp": false,
|
|
11021
|
-
"multiple": false,
|
|
11022
|
-
"type": "option"
|
|
11023
|
-
},
|
|
11024
|
-
"devhub": {
|
|
11025
|
-
"char": "b",
|
|
11026
|
-
"description": "Configure project DevHub",
|
|
11027
|
-
"name": "devhub",
|
|
11028
|
-
"allowNo": false,
|
|
11029
|
-
"type": "boolean"
|
|
11030
|
-
},
|
|
11031
|
-
"debug": {
|
|
11032
|
-
"char": "d",
|
|
11033
|
-
"description": "Activate debug mode (more logs)",
|
|
11034
|
-
"name": "debug",
|
|
11035
|
-
"allowNo": false,
|
|
11036
|
-
"type": "boolean"
|
|
11037
|
-
},
|
|
11038
|
-
"websocket": {
|
|
11039
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11040
|
-
"name": "websocket",
|
|
11041
|
-
"hasDynamicHelp": false,
|
|
11042
|
-
"multiple": false,
|
|
11043
|
-
"type": "option"
|
|
11044
|
-
},
|
|
11045
|
-
"skipauth": {
|
|
11046
|
-
"description": "Skip authentication check when a default username is required",
|
|
11047
|
-
"name": "skipauth",
|
|
11048
|
-
"allowNo": false,
|
|
11049
|
-
"type": "boolean"
|
|
11050
|
-
},
|
|
11051
|
-
"target-org": {
|
|
11052
|
-
"aliases": [
|
|
11053
|
-
"targetusername",
|
|
11054
|
-
"u"
|
|
11055
|
-
],
|
|
11056
|
-
"char": "o",
|
|
11057
|
-
"deprecateAliases": true,
|
|
11058
|
-
"name": "target-org",
|
|
11059
|
-
"noCacheDefault": true,
|
|
11060
|
-
"summary": "Username or alias of the target org.",
|
|
11061
|
-
"hasDynamicHelp": true,
|
|
11062
|
-
"multiple": false,
|
|
11063
|
-
"type": "option"
|
|
11064
|
-
},
|
|
11065
|
-
"target-dev-hub": {
|
|
11066
|
-
"aliases": [
|
|
11067
|
-
"targetdevhubusername"
|
|
11068
|
-
],
|
|
11069
|
-
"char": "v",
|
|
11070
|
-
"deprecateAliases": true,
|
|
11071
|
-
"name": "target-dev-hub",
|
|
11072
|
-
"noCacheDefault": true,
|
|
11073
|
-
"required": false,
|
|
11074
|
-
"summary": "Username or alias of the Dev Hub org.",
|
|
11075
|
-
"hasDynamicHelp": true,
|
|
11076
|
-
"multiple": false,
|
|
11077
|
-
"type": "option"
|
|
11078
|
-
}
|
|
11079
|
-
},
|
|
11080
|
-
"hasDynamicHelp": true,
|
|
11081
|
-
"hiddenAliases": [],
|
|
11082
|
-
"id": "hardis:project:configure:auth",
|
|
11083
|
-
"pluginAlias": "sfdx-hardis",
|
|
11084
|
-
"pluginName": "sfdx-hardis",
|
|
11085
|
-
"pluginType": "core",
|
|
11086
|
-
"strict": true,
|
|
11087
|
-
"enableJsonFlag": true,
|
|
11088
|
-
"title": "Configure authentication",
|
|
11089
|
-
"requiresProject": false,
|
|
11090
|
-
"requiresDependencies": [
|
|
11091
|
-
"openssl"
|
|
11092
|
-
],
|
|
11093
|
-
"isESM": true,
|
|
11094
|
-
"relativePath": [
|
|
11095
|
-
"lib",
|
|
11096
|
-
"commands",
|
|
11097
|
-
"hardis",
|
|
11098
|
-
"project",
|
|
11099
|
-
"configure",
|
|
11100
|
-
"auth.js"
|
|
11101
|
-
],
|
|
11102
|
-
"aliasPermutations": [],
|
|
11103
|
-
"permutations": [
|
|
11104
|
-
"hardis:project:configure:auth",
|
|
11105
|
-
"project:hardis:configure:auth",
|
|
11106
|
-
"project:configure:hardis:auth",
|
|
11107
|
-
"project:configure:auth:hardis",
|
|
11108
|
-
"hardis:configure:project:auth",
|
|
11109
|
-
"configure:hardis:project:auth",
|
|
11110
|
-
"configure:project:hardis:auth",
|
|
11111
|
-
"configure:project:auth:hardis",
|
|
11112
|
-
"hardis:configure:auth:project",
|
|
11113
|
-
"configure:hardis:auth:project",
|
|
11114
|
-
"configure:auth:hardis:project",
|
|
11115
|
-
"configure:auth:project:hardis",
|
|
11116
|
-
"hardis:project:auth:configure",
|
|
11117
|
-
"project:hardis:auth:configure",
|
|
11118
|
-
"project:auth:hardis:configure",
|
|
11119
|
-
"project:auth:configure:hardis",
|
|
11120
|
-
"hardis:auth:project:configure",
|
|
11121
|
-
"auth:hardis:project:configure",
|
|
11122
|
-
"auth:project:hardis:configure",
|
|
11123
|
-
"auth:project:configure:hardis",
|
|
11124
|
-
"hardis:auth:configure:project",
|
|
11125
|
-
"auth:hardis:configure:project",
|
|
11126
|
-
"auth:configure:hardis:project",
|
|
11127
|
-
"auth:configure:project:hardis"
|
|
11128
|
-
]
|
|
11129
|
-
},
|
|
11130
|
-
"hardis:project:convert:profilestopermsets": {
|
|
11131
|
-
"aliases": [],
|
|
11132
|
-
"args": {},
|
|
11133
|
-
"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",
|
|
11134
|
-
"examples": [
|
|
11135
|
-
"$ sf hardis:project:convert:profilestopermsets"
|
|
11136
|
-
],
|
|
11137
|
-
"flags": {
|
|
11138
|
-
"json": {
|
|
11139
|
-
"description": "Format output as json.",
|
|
11140
|
-
"helpGroup": "GLOBAL",
|
|
11141
|
-
"name": "json",
|
|
11142
|
-
"allowNo": false,
|
|
11143
|
-
"type": "boolean"
|
|
11144
|
-
},
|
|
11145
|
-
"flags-dir": {
|
|
11146
|
-
"helpGroup": "GLOBAL",
|
|
11147
|
-
"name": "flags-dir",
|
|
11148
|
-
"summary": "Import flag values from a directory.",
|
|
11149
|
-
"hasDynamicHelp": false,
|
|
11150
|
-
"multiple": false,
|
|
11151
|
-
"type": "option"
|
|
11152
|
-
},
|
|
11153
|
-
"except": {
|
|
11154
|
-
"char": "e",
|
|
11155
|
-
"description": "List of filters",
|
|
11156
|
-
"name": "except",
|
|
11157
|
-
"default": [],
|
|
11158
|
-
"hasDynamicHelp": false,
|
|
11159
|
-
"multiple": true,
|
|
11160
|
-
"type": "option"
|
|
11161
|
-
},
|
|
11162
|
-
"debug": {
|
|
11163
|
-
"char": "d",
|
|
11164
|
-
"description": "Activate debug mode (more logs)",
|
|
11165
|
-
"name": "debug",
|
|
11166
|
-
"allowNo": false,
|
|
11167
|
-
"type": "boolean"
|
|
11168
|
-
},
|
|
11169
|
-
"websocket": {
|
|
11170
|
-
"description": "Websocket host:port for VsCode SFDX Hardis UI integration",
|
|
11171
|
-
"name": "websocket",
|
|
11172
|
-
"hasDynamicHelp": false,
|
|
11173
|
-
"multiple": false,
|
|
11174
|
-
"type": "option"
|
|
11175
|
-
},
|
|
11176
|
-
"skipauth": {
|
|
11177
|
-
"description": "Skip authentication check when a default username is required",
|
|
11178
|
-
"name": "skipauth",
|
|
11179
|
-
"allowNo": false,
|
|
11180
|
-
"type": "boolean"
|
|
11181
|
-
}
|
|
11182
|
-
},
|
|
11183
|
-
"hasDynamicHelp": false,
|
|
11184
|
-
"hiddenAliases": [],
|
|
11185
|
-
"id": "hardis:project:convert:profilestopermsets",
|
|
11186
|
-
"pluginAlias": "sfdx-hardis",
|
|
11187
|
-
"pluginName": "sfdx-hardis",
|
|
11188
|
-
"pluginType": "core",
|
|
11189
|
-
"strict": true,
|
|
11190
|
-
"enableJsonFlag": true,
|
|
11191
|
-
"title": "Convert Profiles into Permission Sets",
|
|
11192
|
-
"requiresProject": true,
|
|
11193
|
-
"requiresSfdxPlugins": [
|
|
11194
|
-
"shane-sfdx-plugins"
|
|
11195
|
-
],
|
|
11196
|
-
"isESM": true,
|
|
11197
|
-
"relativePath": [
|
|
11198
|
-
"lib",
|
|
11199
|
-
"commands",
|
|
11200
|
-
"hardis",
|
|
11201
|
-
"project",
|
|
11202
|
-
"convert",
|
|
11203
|
-
"profilestopermsets.js"
|
|
11204
|
-
],
|
|
11205
|
-
"aliasPermutations": [],
|
|
11206
|
-
"permutations": [
|
|
11207
|
-
"hardis:project:convert:profilestopermsets",
|
|
11208
|
-
"project:hardis:convert:profilestopermsets",
|
|
11209
|
-
"project:convert:hardis:profilestopermsets",
|
|
11210
|
-
"project:convert:profilestopermsets:hardis",
|
|
11211
|
-
"hardis:convert:project:profilestopermsets",
|
|
11212
|
-
"convert:hardis:project:profilestopermsets",
|
|
11213
|
-
"convert:project:hardis:profilestopermsets",
|
|
11214
|
-
"convert:project:profilestopermsets:hardis",
|
|
11215
|
-
"hardis:convert:profilestopermsets:project",
|
|
11216
|
-
"convert:hardis:profilestopermsets:project",
|
|
11217
|
-
"convert:profilestopermsets:hardis:project",
|
|
11218
|
-
"convert:profilestopermsets:project:hardis",
|
|
11219
|
-
"hardis:project:profilestopermsets:convert",
|
|
11220
|
-
"project:hardis:profilestopermsets:convert",
|
|
11221
|
-
"project:profilestopermsets:hardis:convert",
|
|
11222
|
-
"project:profilestopermsets:convert:hardis",
|
|
11223
|
-
"hardis:profilestopermsets:project:convert",
|
|
11224
|
-
"profilestopermsets:hardis:project:convert",
|
|
11225
|
-
"profilestopermsets:project:hardis:convert",
|
|
11226
|
-
"profilestopermsets:project:convert:hardis",
|
|
11227
|
-
"hardis:profilestopermsets:convert:project",
|
|
11228
|
-
"profilestopermsets:hardis:convert:project",
|
|
11229
|
-
"profilestopermsets:convert:hardis:project",
|
|
11230
|
-
"profilestopermsets:convert:project:hardis"
|
|
11231
|
-
]
|
|
11232
|
-
},
|
|
11233
11233
|
"hardis:project:deploy:notify": {
|
|
11234
11234
|
"aliases": [],
|
|
11235
11235
|
"args": {},
|
|
@@ -15102,5 +15102,5 @@
|
|
|
15102
15102
|
]
|
|
15103
15103
|
}
|
|
15104
15104
|
},
|
|
15105
|
-
"version": "6.1.0"
|
|
15105
|
+
"version": "6.1.1-beta202508232242.0"
|
|
15106
15106
|
}
|