1 | sfpowerkit
|
2 | ==========
|
3 |
|
4 | [![Build status](https://dev.azure.com/azlamsalam/sfpowerkit/_apis/build/status/sfpowerkit-CI)](https://dev.azure.com/azlamsalam/sfpowerkit/_build/latest?definitionId=1)
|
5 |
|
6 |
|
7 | Salesforce DevOps Helper Extensions
|
8 |
|
9 |
|
10 | ## `sfpowerkit org:connectedapp:create`
|
11 |
|
12 | Creates a connected app in the target org for JWT based authentication, Please note it only creates Connected App with All users may self authorize option, You would need to manually edit the policies to enable admin users are pre-approved and add your profile to this connected app
|
13 |
|
14 | ```
|
15 | USAGE
|
16 | $ sfdx sfpowerkit:org:connectedapp:create -n <string> -c <filepath> -e <email> [-u <string>] [--apiversion
|
17 | <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal]
|
18 |
|
19 | OPTIONS
|
20 | -c, --pathtocertificate=pathtocertificate (required) Filepath to the private certificate for the connected app
|
21 | to be created
|
22 |
|
23 | -e, --email=email (required) Email of the connected app to be created
|
24 |
|
25 | -n, --name=name (required) Name of the connected app to be created
|
26 |
|
27 | -u, --targetusername=targetusername username or alias for the target org; overrides default target org
|
28 |
|
29 | --apiversion=apiversion override the api version used for api requests made by this command
|
30 |
|
31 | --json format output as json
|
32 |
|
33 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this command invocation
|
34 |
|
35 | EXAMPLE
|
36 | $ sfdx sfpowerkit:org:connectedapp:create -u myOrg@example.com -n AzurePipelines -c id_rsa -e
|
37 | azlam.salamm@invalid.com
|
38 | Created Connected App AzurePipelines in Target Org
|
39 | ```
|
40 |
|
41 | _See code: [src\commands\sfpowerkit\org\connectedapp\create.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.5.0/src\commands\sfpowerkit\org\connectedapp\create.ts)_
|
42 |
|
43 |
|
44 |
|
45 | ## `sfpowerkit org:connectedapp:retrieve`
|
46 |
|
47 | Useful if you want to retreive a connected app key especially for the CI/CD system after a sandbox refresh. Pass the username and password of the target environment from which the sandbox was cloned.
|
48 |
|
49 | ```
|
50 | USAGE
|
51 | $ sfdx sfpowerkit:org:connectedapp:retrieve -n <string> -u <string> -p <string> [-s
|
52 | <string>] [-r <url>] [--json] [--loglevel trace|debug|info|warn|error|fatal]
|
53 |
|
54 | OPTIONS
|
55 | -n, --name=name (required) Name of the connected app to be
|
56 | retreived
|
57 |
|
58 | -p, --password=password (required) Password for the org
|
59 |
|
60 | -r, --url=url Security Token for the org
|
61 |
|
62 | -s, --securitytoken=securitytoken Security Token for the org
|
63 |
|
64 | -u, --username=username (required) Username for the org
|
65 |
|
66 | --json format output as json
|
67 |
|
68 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this
|
69 | command invocation
|
70 |
|
71 | EXAMPLE
|
72 | $ sfdx sfpowerkit:org:connectedapp:retrieve -u azlam@sfdc.com -p Xasdax2w2 -n
|
73 | AzurePipelines
|
74 | Retrived AzurePipelines Consumer Key : XSD21Sd23123w21321
|
75 | ```
|
76 |
|
77 | _See code: [src\commands\sfpowerkit\org\connectedapp\retrieve.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.5.0/src\commands\sfpowerkit\org\connectedapp\retrieve.ts)_
|
78 |
|
79 |
|
80 | ## `sfpowerkit:org:duplicaterule:deactivate`
|
81 |
|
82 | Deactivates a duplicate rule in the target org
|
83 |
|
84 | ```
|
85 | USAGE
|
86 | $ sfdx sfpowerkit:org:duplicaterule:deactivate -n <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
87 | trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
88 |
|
89 | OPTIONS
|
90 | -n, --name=name (required) Name of the duplicate rule
|
91 |
|
92 | -u, --targetusername=targetusername username or alias for the target org; overrides default target org
|
93 |
|
94 | --json format output as json
|
95 |
|
96 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this
|
97 | command invocation
|
98 |
|
99 | EXAMPLE
|
100 | $ sfdx sfpowerkit:org:duplicaterule:deactivate -n Account.CRM_Account_Rule_1 -u sandbox
|
101 | Polling for Retrieval Status
|
102 | Retrieved Duplicate Rule with label : CRM Account Rule 2
|
103 | Preparing Deactivation
|
104 | Deploying Deactivated Rule with ID 0Af4Y000003OdTWSA0
|
105 | Polling for Deployment Status
|
106 | Polling for Deployment Status
|
107 | Duplicate Rule CRM Account Rule 2 deactivated
|
108 | ```
|
109 |
|
110 | _See code: [src\commands\sfpowerkit\org\duplicaterule\deactivate.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.9.9/src\commands\sfpowerkit\org\duplicaterule\deactivate.ts)_
|
111 |
|
112 | ## `sfpowerkit:org:matchingrule:deactivate`
|
113 |
|
114 | Deactivates a matching rule in the target org, Please ensure all duplicate rules are deactivated before using this
|
115 |
|
116 | ```
|
117 | USAGE
|
118 | $ sfdx sfpowerkit:org:matchingrule:deactivate -n <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
119 | trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
120 |
|
121 | OPTIONS
|
122 | -n, --name=name (required) Name of the object
|
123 | -u, --targetusername=targetusername username or alias for the target org; overrides default target org
|
124 |
|
125 | --json format output as json
|
126 |
|
127 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this
|
128 | command invocation
|
129 |
|
130 | EXAMPLE
|
131 | $ sfdx sfpowerkit:org:matchingrule:deactivate -n Account -u sandbox
|
132 | Polling for Retrieval Status
|
133 | Retrieved Matching Rule for Object : Account
|
134 | Preparing Deactivation
|
135 | Deploying Deactivated Matching Rule with ID 0Af4Y000003OePkSAK
|
136 | Polling for Deployment Status
|
137 | Polling for Deployment Status
|
138 | Matching Rule for Account deactivated
|
139 | ```
|
140 |
|
141 | _See code: [src\commands\sfpowerkit\org\matchingrule\deactivate.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.9.9/src\commands\sfpowerkit\org\matchingrule\deactivate.ts)_
|
142 |
|
143 |
|
144 | ## `sfpowerkit:org:trigger:deactivate`
|
145 |
|
146 | Deactivates a trigger in the target org
|
147 |
|
148 | ```
|
149 | USAGE
|
150 | $ sfdx sfpowerkit:org:trigger:deactivate -n <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
151 | trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
152 |
|
153 | OPTIONS
|
154 | -n, --name=name (required) Name of the ApexTrigger
|
155 | -u, --targetusername=targetusername username or alias for the target org; overrides default target org
|
156 |
|
157 | --json format output as json
|
158 |
|
159 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this
|
160 | command invocation
|
161 |
|
162 | EXAMPLE
|
163 | $ sfdx sfpowerkit:org:trigger:deactivate -n AccountTrigger -u sandbox
|
164 | Polling for Retrieval Status
|
165 | Preparing Deactivation
|
166 | Deploying Deactivated ApexTrigger with ID 0Af4Y000003Q7GySAK
|
167 | Polling for Deployment Status
|
168 | Polling for Deployment Status
|
169 | ApexTrigger AccountTrigger deactivated
|
170 | ```
|
171 |
|
172 | _See code: [src\commands\sfpowerkit\org\trigger\deactivate.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.9.11/src\commands\sfpowerkit\org\trigger\deactivate.ts)_
|
173 |
|
174 | ## `sfpowerkit:org:trigger:activate`
|
175 |
|
176 | Activates a trigger in the target org
|
177 |
|
178 | ```
|
179 | USAGE
|
180 | $ sfdx sfpowerkit:org:trigger:activate -n <string> [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
181 | trace|debug|info|warn|error|fatal|TRACE|DEBUG|INFO|WARN|ERROR|FATAL]
|
182 |
|
183 | OPTIONS
|
184 | -n, --name=name (required) Name of the ApexTrigger
|
185 | -u, --targetusername=targetusername username or alias for the target org; overrides default target org
|
186 |
|
187 | --json format output as json
|
188 |
|
189 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this
|
190 | command invocation
|
191 |
|
192 | EXAMPLE
|
193 | $ sfdx sfpowerkit:org:trigger:deactivate -n AccountTrigger -u sandbox
|
194 | Polling for Retrieval Status
|
195 | Preparing Activation
|
196 | Deploying Activated ApexTrigger with ID 0Af4Y000003Q7GySAK
|
197 | Polling for Deployment Status
|
198 | Polling for Deployment Status
|
199 | ApexTrigger AccountTrigger Ativated
|
200 | ```
|
201 |
|
202 | _See code: [src\commands\sfpowerkit\org\trigger\activate.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.9.11/src\commands\sfpowerkit\org\trigger\activate.ts)_
|
203 |
|
204 |
|
205 |
|
206 | ## `sfpowerkit:org:healthcheck`
|
207 |
|
208 | Gets the health details of an org against the Salesforce baseline
|
209 |
|
210 | ```
|
211 | USAGE
|
212 | $ sfdx sfpowerkit:org:healthcheck [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
213 | trace|debug|info|warn|error|fatal]
|
214 |
|
215 | OPTIONS
|
216 | -u, --targetusername=targetusername username or alias for the target org; overrides default target org
|
217 | --apiversion=apiversion override the api version used for api requests made by this command
|
218 | --json format output as json
|
219 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this command invocation
|
220 |
|
221 | EXAMPLE
|
222 | $ sfdx sfpowerkit:org:healthcheck -u myOrg@example.com
|
223 | Successfully Retrived the healthstatus of the org
|
224 | ```
|
225 |
|
226 | _See code: [src\commands\sfpowerkit\org\healthcheck.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.5.0/src\commands\sfpowerkit\org\healthcheck.ts)_
|
227 |
|
228 | # `sfpowerkit:org:orgcoverage`
|
229 |
|
230 | Gets the apex tests coverage of an org
|
231 |
|
232 | ```
|
233 | USAGE
|
234 | $ sfdx sfpowerkit:org:orgcoverage [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
235 | trace|debug|info|warn|error|fatal]
|
236 |
|
237 | OPTIONS
|
238 | -u, --targetusername=targetusername username or alias for the target org;
|
239 | --apiversion=apiversion override the api version used for api requests made by this command
|
240 | --json format output as json
|
241 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this command invocation
|
242 |
|
243 | EXAMPLE
|
244 | $ sfdx sfpowerkit:org:orgcoverage -u myOrg@example.com
|
245 | Successfully Retrieved the Apex Test Coverage of the org 00D0k000000DmdpEAC
|
246 | coverage:85
|
247 | ```
|
248 |
|
249 | _See code: [src\commands\sfpowerkit\org\orgcoverage.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.5.0/src\commands\sfpowerkit\org\orgcoverage.ts)_
|
250 |
|
251 |
|
252 | ## `sfpowerkit:org:sandbox:create`
|
253 |
|
254 | Creates a sandbox using the tooling api, ensure the user has the required permissions before using this command
|
255 |
|
256 | ```
|
257 | USAGE
|
258 | $ sfdx sfpowerkit:org:sandbox:create -n <string> -d <string> -l <string> [-a <string>] [-f <string>] [-u
|
259 | <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal]
|
260 |
|
261 | OPTIONS
|
262 | -a, --apexclass=apexclass A reference to the ID of an Apex class that runs after each
|
263 | copy of the sandbox
|
264 |
|
265 | -d, --description=description (required) Description of the sandbox
|
266 |
|
267 | -f, --clonefrom=clonefrom A reference to the ID of a SandboxInfo that serves as the
|
268 | source org for a cloned sandbox.
|
269 |
|
270 | -l, --licensetype=DEVELOPER|DEVELOPER_PRO|PARTIAL|FULL (required) Type of the sandbox. Valid values are
|
271 | DEVELOPER,DEVELOPER_PRO,PARTIAL,FULL
|
272 |
|
273 | -n, --name=name (required) Name of the sandbox
|
274 |
|
275 | -u, --targetusername=targetusername Username for the Production Environment
|
276 |
|
277 | --apiversion=apiversion override the api version used for api requests made by this
|
278 | command
|
279 |
|
280 | --json format output as json
|
281 |
|
282 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this command invocation
|
283 |
|
284 | EXAMPLE
|
285 | $ sfdx sfpowerkit:org:sandbox:create -d Testsandbox -l DEVELOPER -n test2 -u myOrg@example.com
|
286 | Successfully Enqueued Creation of Sandbox
|
287 | ```
|
288 |
|
289 | _See code: [src\commands\sfpowerkit\org\sandbox\create.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.5.0/src\commands\sfpowerkit\org\sandbox\create.ts)_
|
290 |
|
291 | ## ` sfpowerkit:org:sandbox:info`
|
292 |
|
293 | Gets the status of a sandbox
|
294 |
|
295 | ```
|
296 | USAGE
|
297 | $ sfdx sfpowerkit:org:sandbox:info -n <string> [-s] [-u <string>] [--apiversion <string>] [--json] [--loglevel
|
298 | trace|debug|info|warn|error|fatal]
|
299 |
|
300 | OPTIONS
|
301 | -n, --name=name (required) Name of the sandbox
|
302 | -s, --showonlylatest Shows only the latest info of the sandbox record
|
303 | -u, --targetusername=targetusername Username for the Production Environment
|
304 | --apiversion=apiversion override the api version used for api requests made by this command
|
305 | --json format output as json
|
306 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this command invocation
|
307 |
|
308 | EXAMPLE
|
309 | $ sfdx sfpowerkit:org:sandbox:info -n test2 -u myOrg@example.com
|
310 | Successfully Enqueued Refresh of Sandbox
|
311 | ```
|
312 |
|
313 | _See code: [src\commands\sfpowerkit\org\sandbox\info.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.5.0/src\commands\sfpowerkit\org\sandbox\info.ts)_
|
314 |
|
315 | ## `sfpowerkit:org:sandbox:refresh`
|
316 |
|
317 | Refresh a sandbox using the tooling api, ensure the user has the required permissions before using this command
|
318 |
|
319 | ```
|
320 | USAGE
|
321 | $ sfdx sfpowerkit:org:sandbox:refresh -n <string> [-f <string>] [-u <string>] [--apiversion <string>] [--json]
|
322 | [--loglevel trace|debug|info|warn|error|fatal]
|
323 |
|
324 | OPTIONS
|
325 | -f, --clonefrom=clonefrom A reference to the ID of a SandboxInfo that serves as the source org
|
326 | for a cloned sandbox.
|
327 |
|
328 | -n, --name=name (required) Name of the sandbox
|
329 |
|
330 | -u, --targetusername=targetusername Username for the Production Environment
|
331 |
|
332 | --apiversion=apiversion override the api version used for api requests made by this command
|
333 |
|
334 | --json format output as json
|
335 |
|
336 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this command invocation
|
337 |
|
338 | EXAMPLE
|
339 | $ sfdx sfpowerkit:org:sandbox:refresh -n test2 -f sitSandbox -u myOrg@example.com
|
340 | Successfully Enqueued Refresh of Sandbox
|
341 | ```
|
342 |
|
343 | _See code: [src\commands\sfpowerkit\org\sandbox\refresh.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.5.0/src\commands\sfpowerkit\org\sandbox\refresh.ts)_
|
344 |
|
345 | ## `sfpowerkit:package:dependencies:install`
|
346 |
|
347 | Install dependencies of a package
|
348 |
|
349 | ```
|
350 | USAGE
|
351 | $ sfdx sfpowerkit:package:dependencies:install [-p <string>] [-k <string>] [-b <string>] [-w <string>] [-r] [-v
|
352 | <string>] [-u <string>] [--apiversion <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal]
|
353 |
|
354 | OPTIONS
|
355 | -b, --branch=branch the package version’s branch
|
356 |
|
357 | -k, --installationkeys=installationkeys installation key for key-protected packages (format is
|
358 | 1:MyPackage1Key 2: 3:MyPackage3Key... to allow some packages without
|
359 | installation key)
|
360 |
|
361 | -p, --individualpackage=individualpackage Installs a specific package especially for upgrade scenario
|
362 |
|
363 | -r, --noprompt allow Remote Site Settings and Content Security Policy websites to
|
364 | send or receive data without confirmation
|
365 |
|
366 | -u, --targetusername=targetusername username or alias for the target org; overrides default target org
|
367 |
|
368 | -v, --targetdevhubusername=targetdevhubusername username or alias for the dev hub org; overrides default dev hub org
|
369 |
|
370 | -w, --wait=wait number of minutes to wait for installation status (also used for
|
371 | publishwait). Default is 10
|
372 |
|
373 | --apiversion=apiversion override the api version used for api requests made by this command
|
374 |
|
375 | --json format output as json
|
376 |
|
377 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this command invocation
|
378 |
|
379 | EXAMPLE
|
380 | $ sfpowerkit package:dependencies:install -u MyScratchOrg -v MyDevHub -k "1:MyPackage1Key 2: 3:MyPackage3Key" -b "DEV"
|
381 | ```
|
382 |
|
383 | _See code: [src\commands\sfpowerkit\package\dependencies\install.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.5.0/src\commands\sfpowerkit\package\dependencies\install.ts)_
|
384 |
|
385 | ## `sfpowerkit:package:valid`
|
386 |
|
387 | Validates a package to check whether it only contains valid metadata as per metadata coverage
|
388 |
|
389 | ```
|
390 | USAGE
|
391 | $ sfdx sfpowerkit:package:valid [-n <string>] [--json] [--loglevel trace|debug|info|warn|error|fatal]
|
392 |
|
393 | OPTIONS
|
394 | -n, --package=package the package to analyze
|
395 | --json format output as json
|
396 | --loglevel=(trace|debug|info|warn|error|fatal) [default: warn] logging level for this command invocation
|
397 |
|
398 | EXAMPLE
|
399 | $ sfdx sfpowerkit:package:valid -n testPackage
|
400 | Now analyzing inspections
|
401 | Converting package testPackage
|
402 | Source was successfully converted to Metadata API format and written to the location:
|
403 | D:projects estPackage emp_sfpowerkitmdapi
|
404 | Elements supported included in your package testPackage are
|
405 | [
|
406 | "AuraDefinitionBundle",
|
407 | "CustomApplication",
|
408 | "ApexClass",
|
409 | "ContentAsset",
|
410 | "WorkflowRule"
|
411 | ]
|
412 | ```
|
413 |
|
414 | _See code: [src\commands\sfpowerkit\package\valid.ts](https://github.com/azlamsalam/sfpowerkit/blob/v1.5.0/src\commands\sfpowerkit\package\valid.ts)_
|