@salesforce/plugin-templates 56.5.2 → 56.7.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.
Files changed (51) hide show
  1. package/README.md +259 -197
  2. package/lib/commands/{analytics/generate → template/generate/analytics}/template.js +3 -3
  3. package/lib/commands/template/generate/analytics/template.js.map +1 -0
  4. package/lib/commands/template/generate/digital-experience/site.d.ts +23 -0
  5. package/lib/commands/template/generate/digital-experience/site.js +89 -0
  6. package/lib/commands/template/generate/digital-experience/site.js.map +1 -0
  7. package/lib/commands/{lightning/generate → template/generate/lightning}/app.js +3 -3
  8. package/lib/commands/template/generate/lightning/app.js.map +1 -0
  9. package/lib/commands/{lightning/generate → template/generate/lightning}/component.js +3 -3
  10. package/lib/commands/template/generate/lightning/component.js.map +1 -0
  11. package/lib/commands/{lightning/generate → template/generate/lightning}/event.js +3 -3
  12. package/lib/commands/template/generate/lightning/event.js.map +1 -0
  13. package/lib/commands/{lightning/generate → template/generate/lightning}/interface.js +3 -3
  14. package/lib/commands/template/generate/lightning/interface.js.map +1 -0
  15. package/lib/commands/{lightning/generate → template/generate/lightning}/test.js +3 -3
  16. package/lib/commands/template/generate/lightning/test.js.map +1 -0
  17. package/lib/commands/{project/generate.js → template/generate/project/index.js} +4 -4
  18. package/lib/commands/template/generate/project/index.js.map +1 -0
  19. package/lib/commands/{static-resource/generate.js → template/generate/static-resource/index.js} +4 -4
  20. package/lib/commands/template/generate/static-resource/index.js.map +1 -0
  21. package/lib/commands/{visualforce/generate → template/generate/visualforce}/component.js +3 -3
  22. package/lib/commands/template/generate/visualforce/component.js.map +1 -0
  23. package/lib/commands/{visualforce/generate → template/generate/visualforce}/page.js +3 -3
  24. package/lib/commands/template/generate/visualforce/page.js.map +1 -0
  25. package/lib/commands/{webapp/generate.d.ts → template/generate/webapp/index.d.ts} +2 -0
  26. package/lib/commands/{webapp/generate.js → template/generate/webapp/index.js} +4 -2
  27. package/lib/commands/template/generate/webapp/index.js.map +1 -0
  28. package/messages/digitalExperienceSite.md +47 -0
  29. package/oclif.manifest.json +910 -544
  30. package/package.json +25 -36
  31. package/lib/commands/analytics/generate/template.js.map +0 -1
  32. package/lib/commands/lightning/generate/app.js.map +0 -1
  33. package/lib/commands/lightning/generate/component.js.map +0 -1
  34. package/lib/commands/lightning/generate/event.js.map +0 -1
  35. package/lib/commands/lightning/generate/interface.js.map +0 -1
  36. package/lib/commands/lightning/generate/test.js.map +0 -1
  37. package/lib/commands/project/generate.js.map +0 -1
  38. package/lib/commands/static-resource/generate.js.map +0 -1
  39. package/lib/commands/visualforce/generate/component.js.map +0 -1
  40. package/lib/commands/visualforce/generate/page.js.map +0 -1
  41. package/lib/commands/webapp/generate.js.map +0 -1
  42. /package/lib/commands/{analytics/generate → template/generate/analytics}/template.d.ts +0 -0
  43. /package/lib/commands/{lightning/generate → template/generate/lightning}/app.d.ts +0 -0
  44. /package/lib/commands/{lightning/generate → template/generate/lightning}/component.d.ts +0 -0
  45. /package/lib/commands/{lightning/generate → template/generate/lightning}/event.d.ts +0 -0
  46. /package/lib/commands/{lightning/generate → template/generate/lightning}/interface.d.ts +0 -0
  47. /package/lib/commands/{lightning/generate → template/generate/lightning}/test.d.ts +0 -0
  48. /package/lib/commands/{project/generate.d.ts → template/generate/project/index.d.ts} +0 -0
  49. /package/lib/commands/{static-resource/generate.d.ts → template/generate/static-resource/index.d.ts} +0 -0
  50. /package/lib/commands/{visualforce/generate → template/generate/visualforce}/component.d.ts +0 -0
  51. /package/lib/commands/{visualforce/generate → template/generate/visualforce}/page.d.ts +0 -0
package/README.md CHANGED
@@ -118,26 +118,28 @@ Congrats, you are debugging!
118
118
 
119
119
  <!-- commands -->
120
120
 
121
- - [`sf analytics generate template`](#sf-analytics-generate-template)
122
- - [`sf lightning generate app`](#sf-lightning-generate-app)
123
- - [`sf lightning generate component`](#sf-lightning-generate-component)
124
- - [`sf lightning generate event`](#sf-lightning-generate-event)
125
- - [`sf lightning generate interface`](#sf-lightning-generate-interface)
126
- - [`sf lightning generate test`](#sf-lightning-generate-test)
127
- - [`sf project generate`](#sf-project-generate)
128
- - [`sf static-resource generate`](#sf-static-resource-generate)
121
+ - [`sf template generate analytics template`](#sf-template-generate-analytics-template)
129
122
  - [`sf template generate apex class`](#sf-template-generate-apex-class)
130
123
  - [`sf template generate apex trigger`](#sf-template-generate-apex-trigger)
131
- - [`sf visualforce generate component`](#sf-visualforce-generate-component)
132
- - [`sf visualforce generate page`](#sf-visualforce-generate-page)
133
-
134
- ## `sf analytics generate template`
124
+ - [`sf template generate digital-experience site`](#sf-template-generate-digital-experience-site)
125
+ - [`sf template generate lightning app`](#sf-template-generate-lightning-app)
126
+ - [`sf template generate lightning component`](#sf-template-generate-lightning-component)
127
+ - [`sf template generate lightning event`](#sf-template-generate-lightning-event)
128
+ - [`sf template generate lightning interface`](#sf-template-generate-lightning-interface)
129
+ - [`sf template generate lightning test`](#sf-template-generate-lightning-test)
130
+ - [`sf template generate project`](#sf-template-generate-project)
131
+ - [`sf template generate static-resource`](#sf-template-generate-static-resource)
132
+ - [`sf template generate visualforce component`](#sf-template-generate-visualforce-component)
133
+ - [`sf template generate visualforce page`](#sf-template-generate-visualforce-page)
134
+
135
+ ## `sf template generate analytics template`
135
136
 
136
137
  Generate a simple Analytics template.
137
138
 
138
139
  ```
139
140
  USAGE
140
- $ sf analytics generate template -n <value> [--json] [--flags-dir <value>] [-d <value>] [--api-version <value>]
141
+ $ sf template generate analytics template -n <value> [--json] [--flags-dir <value>] [-d <value>] [--api-version
142
+ <value>]
141
143
 
142
144
  FLAGS
143
145
  -d, --output-dir=<value> [default: .] Directory for saving the created files.
@@ -157,29 +159,210 @@ DESCRIPTION
157
159
 
158
160
  ALIASES
159
161
  $ sf force analytics template create
162
+ $ sf analytics generate template
160
163
 
161
164
  EXAMPLES
162
165
  Generate the metadata files for a simple Analytics template file called myTemplate in the
163
166
  force-app/main/default/waveTemplates directory:
164
167
 
165
- $ sf analytics generate template --name myTemplate --output-dir force-app/main/default/waveTemplates
168
+ $ sf template generate analytics template --name myTemplate --output-dir force-app/main/default/waveTemplates
169
+
170
+ FLAG DESCRIPTIONS
171
+ -d, --output-dir=<value> Directory for saving the created files.
172
+
173
+ The location can be an absolute path or relative to the current working directory. The default is the current
174
+ directory.
175
+ ```
176
+
177
+ _See code: [src/commands/template/generate/analytics/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/analytics/template.ts)_
178
+
179
+ ## `sf template generate apex class`
180
+
181
+ Generate an Apex class.
182
+
183
+ ```
184
+ USAGE
185
+ $ sf template generate apex class -n <value> [--json] [--flags-dir <value>] [-t
186
+ ApexException|ApexUnitTest|BasicUnitTest|DefaultApexClass|InboundEmailService] [-d <value>] [--api-version <value>]
187
+
188
+ FLAGS
189
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
190
+ -n, --name=<value> (required) Name of the generated Apex class.
191
+ -t, --template=<option> [default: DefaultApexClass] Template to use for file creation.
192
+ <options: ApexException|ApexUnitTest|BasicUnitTest|DefaultApexClass|InboundEmailService>
193
+ --api-version=<value> Override the api version used for api requests made by this command
194
+
195
+ GLOBAL FLAGS
196
+ --flags-dir=<value> Import flag values from a directory.
197
+ --json Format output as json.
198
+
199
+ DESCRIPTION
200
+ Generate an Apex class.
201
+
202
+ Generates the Apex *.cls file and associated metadata file. These files must be contained in a parent directory called
203
+ "classes" in your package directory. Either run this command from an existing directory of this name, or use the
204
+ --output-dir flag to generate one or point to an existing one.
205
+
206
+ ALIASES
207
+ $ sf force apex class create
208
+ $ sf apex generate class
209
+
210
+ EXAMPLES
211
+ Generate two metadata files associated with the MyClass Apex class (MyClass.cls and MyClass.cls-meta.xml) in the
212
+ current directory:
213
+
214
+ $ sf template generate apex class --name MyClass
215
+
216
+ Similar to previous example, but generates the files in the "force-app/main/default/classes" directory:
217
+
218
+ $ sf template generate apex class --name MyClass --output-dir force-app/main/default/classes
219
+
220
+ FLAG DESCRIPTIONS
221
+ -d, --output-dir=<value> Directory for saving the created files.
222
+
223
+ The location can be an absolute path or relative to the current working directory. The default is the current
224
+ directory.
225
+
226
+ -n, --name=<value> Name of the generated Apex class.
227
+
228
+ The name can be up to 40 characters and must start with a letter.
229
+
230
+ -t, --template=ApexException|ApexUnitTest|BasicUnitTest|DefaultApexClass|InboundEmailService
231
+
232
+ Template to use for file creation.
233
+
234
+ Supplied parameter values or default values are filled into a copy of the template.
235
+ ```
236
+
237
+ _See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/apex/class.ts)_
238
+
239
+ ## `sf template generate apex trigger`
240
+
241
+ Generate an Apex trigger.
242
+
243
+ ```
244
+ USAGE
245
+ $ sf template generate apex trigger -n <value> [--json] [--flags-dir <value>] [-t ApexTrigger] [-d <value>] [--api-version
246
+ <value>] [-s <value>] [-e before insert|before update|before delete|after insert|after update|after delete|after
247
+ undelete...]
248
+
249
+ FLAGS
250
+ -d, --output-dir=<value> [default: .] Directory for saving the created files.
251
+ -e, --event=<option>... [default: before insert] Events that fire the trigger.
252
+ <options: before insert|before update|before delete|after insert|after update|after
253
+ delete|after undelete>
254
+ -n, --name=<value> (required) Name of the generated Apex trigger
255
+ -s, --sobject=<value> [default: SOBJECT] Salesforce object to generate a trigger on.
256
+ -t, --template=<option> [default: ApexTrigger] Template to use for file creation.
257
+ <options: ApexTrigger>
258
+ --api-version=<value> Override the api version used for api requests made by this command
259
+
260
+ GLOBAL FLAGS
261
+ --flags-dir=<value> Import flag values from a directory.
262
+ --json Format output as json.
263
+
264
+ DESCRIPTION
265
+ Generate an Apex trigger.
266
+
267
+ Generates the Apex trigger *.trigger file and associated metadata file. These files must be contained in a parent
268
+ directory called "triggers" in your package directory. Either run this command from an existing directory of this
269
+ name, or use the --output-dir flag to generate one or point to an existing one.
270
+
271
+ If you don't specify the --sobject flag, the .trigger file contains the generic placeholder SOBJECT; replace it with
272
+ the Salesforce object you want to generate a trigger for. If you don't specify --event, "before insert" is used.
273
+
274
+ ALIASES
275
+ $ sf force apex trigger create
276
+ $ sf apex generate trigger
277
+
278
+ EXAMPLES
279
+ Generate two files associated with the MyTrigger Apex trigger (MyTrigger.trigger and MyTrigger.trigger-meta.xml) in
280
+ the current directory:
281
+
282
+ $ sf template generate apex trigger --name MyTrigger
283
+
284
+ Similar to the previous example, but generate the files in the "force-app/main/default/triggers" directory:
285
+
286
+ $ sf template generate apex trigger --name MyTrigger --output-dir force-app/main/default/triggers
287
+
288
+ Generate files for a trigger that fires on the Account object before and after an insert:
289
+
290
+ $ sf template generate apex trigger --name MyTrigger --sobject Account --event "before insert,after insert"
166
291
 
167
292
  FLAG DESCRIPTIONS
168
293
  -d, --output-dir=<value> Directory for saving the created files.
169
294
 
170
295
  The location can be an absolute path or relative to the current working directory. The default is the current
171
296
  directory.
297
+
298
+ -n, --name=<value> Name of the generated Apex trigger
299
+
300
+ The name can be up to 40 characters and must start with a letter.
301
+
302
+ -t, --template=ApexTrigger Template to use for file creation.
303
+
304
+ Supplied parameter values or default values are filled into a copy of the template.
305
+ ```
306
+
307
+ _See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/apex/trigger.ts)_
308
+
309
+ ## `sf template generate digital-experience site`
310
+
311
+ Generate an Experience Cloud site.
312
+
313
+ ```
314
+ USAGE
315
+ $ sf template generate digital-experience site -n <value> -t BuildYourOwnLWR [--json] [--flags-dir <value>] [-o <value>] [-p <value>] [-e
316
+ <value>] [-d <value>]
317
+
318
+ FLAGS
319
+ -d, --output-dir=<value> Directory to generate the site files in.
320
+ -e, --admin-email=<value> Email address for the site administrator. Defaults to the username of the currently
321
+ authenticated user.
322
+ -n, --name=<value> (required) Name of the Experience Cloud site to generate.
323
+ -o, --target-org=<value> Username or alias of the target org.
324
+ -p, --url-path-prefix=<value> URL path prefix for the site; must contain only alphanumeric characters.
325
+ -t, --template=<option> (required) Template to use when generating the site.
326
+ <options: BuildYourOwnLWR>
327
+
328
+ GLOBAL FLAGS
329
+ --flags-dir=<value> Import flag values from a directory.
330
+ --json Format output as json.
331
+
332
+ DESCRIPTION
333
+ Generate an Experience Cloud site.
334
+
335
+ Creates an Experience Cloud site with the specified template, name, and URL path prefix. The site includes all
336
+ necessary metadata files, including DigitalExperienceConfig, DigitalExperienceBundle, Network, and CustomSite.
337
+
338
+ EXAMPLES
339
+ Generate an Experience Cloud site using the BuildYourOwnLWR template. The site is called "mysite" and has the URL
340
+ path prefix "mysite":
341
+
342
+ $ sf template generate digital-experience site --template BuildYourOwnLWR --name mysite --url-path-prefix mysite
343
+
344
+ Generate an Experience Cloud site like the last example, but generate the files into the specified output directory:
345
+
346
+ $ sf template generate digital-experience site --template BuildYourOwnLWR --name mysite --url-path-prefix mysite \
347
+ --output-dir force-app/main/default
348
+
349
+ FLAG DESCRIPTIONS
350
+ -d, --output-dir=<value> Directory to generate the site files in.
351
+
352
+ The location can be an absolute path or relative to the current working directory. If not specified, the command
353
+ reads your sfdx-project.json file and uses the default package directory. When running outside a Salesforce DX
354
+ project, defaults to the current directory.
172
355
  ```
173
356
 
174
- _See code: [src/commands/analytics/generate/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.5.2/src/commands/analytics/generate/template.ts)_
357
+ _See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/digital-experience/site.ts)_
175
358
 
176
- ## `sf lightning generate app`
359
+ ## `sf template generate lightning app`
177
360
 
178
361
  Generate a Lightning App.
179
362
 
180
363
  ```
181
364
  USAGE
182
- $ sf lightning generate app -n <value> [--json] [--flags-dir <value>] [-t DefaultLightningApp] [-d <value>] [--api-version
365
+ $ sf template generate lightning app -n <value> [--json] [--flags-dir <value>] [-t DefaultLightningApp] [-d <value>] [--api-version
183
366
  <value>]
184
367
 
185
368
  FLAGS
@@ -201,15 +384,16 @@ DESCRIPTION
201
384
 
202
385
  ALIASES
203
386
  $ sf force lightning app create
387
+ $ sf lightning generate app
204
388
 
205
389
  EXAMPLES
206
390
  Generate the metadata files for a Lightning app bundle called "myapp" in the current directory:
207
391
 
208
- $ sf lightning generate app --name myapp
392
+ $ sf template generate lightning app --name myapp
209
393
 
210
394
  Similar to the previous example, but generate the files in the "force-app/main/default/aura" directory:
211
395
 
212
- $ sf lightning generate app --name myapp --output-dir force-app/main/default/aura
396
+ $ sf template generate lightning app --name myapp --output-dir force-app/main/default/aura
213
397
 
214
398
  FLAG DESCRIPTIONS
215
399
  -d, --output-dir=<value> Directory for saving the created files.
@@ -226,15 +410,15 @@ FLAG DESCRIPTIONS
226
410
  Supplied parameter values or default values are filled into a copy of the template.
227
411
  ```
228
412
 
229
- _See code: [src/commands/lightning/generate/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.5.2/src/commands/lightning/generate/app.ts)_
413
+ _See code: [src/commands/template/generate/lightning/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/lightning/app.ts)_
230
414
 
231
- ## `sf lightning generate component`
415
+ ## `sf template generate lightning component`
232
416
 
233
417
  Generate a bundle for an Aura component or a Lightning web component.
234
418
 
235
419
  ```
236
420
  USAGE
237
- $ sf lightning generate component -n <value> [--json] [--flags-dir <value>] [-t
421
+ $ sf template generate lightning component -n <value> [--json] [--flags-dir <value>] [-t
238
422
  default|analyticsDashboard|analyticsDashboardWithStep] [-d <value>] [--api-version <value>] [--type aura|lwc]
239
423
 
240
424
  FLAGS
@@ -262,23 +446,24 @@ DESCRIPTION
262
446
 
263
447
  ALIASES
264
448
  $ sf force lightning component create
449
+ $ sf lightning generate component
265
450
 
266
451
  EXAMPLES
267
452
  Generate the metadata files for an Aura component bundle in the current directory:
268
453
 
269
- $ sf lightning generate component --name mycomponent
454
+ $ sf template generate lightning component --name mycomponent
270
455
 
271
456
  Generate a Lightning web component bundle in the current directory:
272
457
 
273
- $ sf lightning generate component --name mycomponent --type lwc
458
+ $ sf template generate lightning component --name mycomponent --type lwc
274
459
 
275
460
  Generate an Aura component bundle in the "force-app/main/default/aura" directory:
276
461
 
277
- $ sf lightning generate component --name mycomponent --output-dir force-app/main/default/aura
462
+ $ sf template generate lightning component --name mycomponent --output-dir force-app/main/default/aura
278
463
 
279
464
  Generate a Lightning web component bundle in the "force-app/main/default/lwc" directory:
280
465
 
281
- $ sf lightning generate component --name mycomponent --type lwc --output-dir force-app/main/default/lwc
466
+ $ sf template generate lightning component --name mycomponent --type lwc --output-dir force-app/main/default/lwc
282
467
 
283
468
  FLAG DESCRIPTIONS
284
469
  -d, --output-dir=<value> Directory for saving the created files.
@@ -295,15 +480,15 @@ FLAG DESCRIPTIONS
295
480
  Supplied parameter values or default values are filled into a copy of the template.
296
481
  ```
297
482
 
298
- _See code: [src/commands/lightning/generate/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.5.2/src/commands/lightning/generate/component.ts)_
483
+ _See code: [src/commands/template/generate/lightning/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/lightning/component.ts)_
299
484
 
300
- ## `sf lightning generate event`
485
+ ## `sf template generate lightning event`
301
486
 
302
487
  Generate a Lightning Event.
303
488
 
304
489
  ```
305
490
  USAGE
306
- $ sf lightning generate event -n <value> [--json] [--flags-dir <value>] [-t DefaultLightningEvt] [-d <value>] [--api-version
491
+ $ sf template generate lightning event -n <value> [--json] [--flags-dir <value>] [-t DefaultLightningEvt] [-d <value>] [--api-version
307
492
  <value>]
308
493
 
309
494
  FLAGS
@@ -325,15 +510,16 @@ DESCRIPTION
325
510
 
326
511
  ALIASES
327
512
  $ sf force lightning event create
513
+ $ sf lightning generate event
328
514
 
329
515
  EXAMPLES
330
516
  Generate the metadata files for a Lightning event bundle called "myevent" in the current directory:
331
517
 
332
- $ sf lightning generate event --name myevent
518
+ $ sf template generate lightning event --name myevent
333
519
 
334
520
  Similar to previous example, but generate the files in the "force-app/main/default/aura" directory:
335
521
 
336
- $ sf lightning generate event --name myevent --output-dir force-app/main/default/aura
522
+ $ sf template generate lightning event --name myevent --output-dir force-app/main/default/aura
337
523
 
338
524
  FLAG DESCRIPTIONS
339
525
  -d, --output-dir=<value> Directory for saving the created files.
@@ -350,15 +536,15 @@ FLAG DESCRIPTIONS
350
536
  Supplied parameter values or default values are filled into a copy of the template.
351
537
  ```
352
538
 
353
- _See code: [src/commands/lightning/generate/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.5.2/src/commands/lightning/generate/event.ts)_
539
+ _See code: [src/commands/template/generate/lightning/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/lightning/event.ts)_
354
540
 
355
- ## `sf lightning generate interface`
541
+ ## `sf template generate lightning interface`
356
542
 
357
543
  Generate a Lightning Interface.
358
544
 
359
545
  ```
360
546
  USAGE
361
- $ sf lightning generate interface -n <value> [--json] [--flags-dir <value>] [-t DefaultLightningIntf] [-d <value>]
547
+ $ sf template generate lightning interface -n <value> [--json] [--flags-dir <value>] [-t DefaultLightningIntf] [-d <value>]
362
548
  [--api-version <value>]
363
549
 
364
550
  FLAGS
@@ -380,15 +566,16 @@ DESCRIPTION
380
566
 
381
567
  ALIASES
382
568
  $ sf force lightning interface create
569
+ $ sf lightning generate interface
383
570
 
384
571
  EXAMPLES
385
572
  Generate the metadata files for a Lightning interface bundle called "myinterface" in the current directory:
386
573
 
387
- $ sf lightning generate interface --name myinterface
574
+ $ sf template generate lightning interface --name myinterface
388
575
 
389
576
  Similar to the previous example but generate the files in the "force-app/main/default/aura" directory:
390
577
 
391
- $ sf lightning generate interface --name myinterface --output-dir force-app/main/default/aura
578
+ $ sf template generate lightning interface --name myinterface --output-dir force-app/main/default/aura
392
579
 
393
580
  FLAG DESCRIPTIONS
394
581
  -d, --output-dir=<value> Directory for saving the created files.
@@ -405,15 +592,15 @@ FLAG DESCRIPTIONS
405
592
  Supplied parameter values or default values are filled into a copy of the template.
406
593
  ```
407
594
 
408
- _See code: [src/commands/lightning/generate/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.5.2/src/commands/lightning/generate/interface.ts)_
595
+ _See code: [src/commands/template/generate/lightning/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/lightning/interface.ts)_
409
596
 
410
- ## `sf lightning generate test`
597
+ ## `sf template generate lightning test`
411
598
 
412
599
  Generate a Lightning test.
413
600
 
414
601
  ```
415
602
  USAGE
416
- $ sf lightning generate test -n <value> [--json] [--flags-dir <value>] [-t DefaultLightningTest] [-d <value>]
603
+ $ sf template generate lightning test -n <value> [--json] [--flags-dir <value>] [-t DefaultLightningTest] [-d <value>]
417
604
  [--api-version <value>]
418
605
 
419
606
  FLAGS
@@ -435,15 +622,16 @@ DESCRIPTION
435
622
 
436
623
  ALIASES
437
624
  $ sf force lightning test create
625
+ $ sf lightning generate test
438
626
 
439
627
  EXAMPLES
440
628
  Generate the metadata files for the Lightning test called MyLightningTest in the current directory:
441
629
 
442
- $ sf lightning generate test --name MyLightningTest
630
+ $ sf template generate lightning test --name MyLightningTest
443
631
 
444
632
  Similar to the previous example but generate the files in the "force-app/main/default/lightningTests" directory:
445
633
 
446
- $ sf lightning generate test --name MyLightningTest --output-dir force-app/main/default/lightningTests
634
+ $ sf template generate lightning test --name MyLightningTest --output-dir force-app/main/default/lightningTests
447
635
 
448
636
  FLAG DESCRIPTIONS
449
637
  -d, --output-dir=<value> Directory for saving the created files.
@@ -460,15 +648,15 @@ FLAG DESCRIPTIONS
460
648
  Supplied parameter values or default values are filled into a copy of the template.
461
649
  ```
462
650
 
463
- _See code: [src/commands/lightning/generate/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.5.2/src/commands/lightning/generate/test.ts)_
651
+ _See code: [src/commands/template/generate/lightning/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/lightning/test.ts)_
464
652
 
465
- ## `sf project generate`
653
+ ## `sf template generate project`
466
654
 
467
655
  Generate a Salesforce DX project.
468
656
 
469
657
  ```
470
658
  USAGE
471
- $ sf project generate -n <value> [--json] [--flags-dir <value>] [-t standard|empty|analytics] [-d <value>] [-s
659
+ $ sf template generate project -n <value> [--json] [--flags-dir <value>] [-t standard|empty|analytics] [-d <value>] [-s
472
660
  <value>] [-p <value>] [-x] [--api-version <value>]
473
661
 
474
662
  FLAGS
@@ -498,23 +686,24 @@ DESCRIPTION
498
686
 
499
687
  ALIASES
500
688
  $ sf force project create
689
+ $ sf project generate
501
690
 
502
691
  EXAMPLES
503
692
  Generate a project called "mywork":
504
693
 
505
- $ sf project generate --name mywork
694
+ $ sf template generate project --name mywork
506
695
 
507
696
  Similar to previous example, but generate the files in a directory called "myapp":
508
697
 
509
- $ sf project generate --name mywork --default-package-dir myapp
698
+ $ sf template generate project --name mywork --default-package-dir myapp
510
699
 
511
700
  Similar to prevoius example, but also generate a default package.xml manifest file:
512
701
 
513
- $ sf project generate --name mywork --default-package-dir myapp --manifest
702
+ $ sf template generate project --name mywork --default-package-dir myapp --manifest
514
703
 
515
704
  Generate a project with the minimum files and directories:
516
705
 
517
- $ sf project generate --name mywork --template empty
706
+ $ sf template generate project --name mywork --template empty
518
707
 
519
708
  FLAG DESCRIPTIONS
520
709
  -d, --output-dir=<value> Directory for saving the created files.
@@ -565,16 +754,16 @@ FLAG DESCRIPTIONS
565
754
  Override the api version used for api requests made by this command
566
755
  ```
567
756
 
568
- _See code: [src/commands/project/generate.ts](https://github.com/salesforcecli/plugin-templates/blob/56.5.2/src/commands/project/generate.ts)_
757
+ _See code: [src/commands/template/generate/project/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/project/index.ts)_
569
758
 
570
- ## `sf static-resource generate`
759
+ ## `sf template generate static-resource`
571
760
 
572
761
  Generate a static resource.
573
762
 
574
763
  ```
575
764
  USAGE
576
- $ sf static-resource generate -n <value> [--json] [--flags-dir <value>] [--type <value>] [-d <value>] [--api-version
577
- <value>]
765
+ $ sf template generate static-resource -n <value> [--json] [--flags-dir <value>] [--type <value>] [-d <value>]
766
+ [--api-version <value>]
578
767
 
579
768
  FLAGS
580
769
  -d, --output-dir=<value> [default: .] Directory for saving the created files.
@@ -596,19 +785,20 @@ DESCRIPTION
596
785
 
597
786
  ALIASES
598
787
  $ sf force staticresource create
788
+ $ sf static-resource generate
599
789
 
600
790
  EXAMPLES
601
791
  Generate the metadata file for a static resource called MyResource in the current directory:
602
792
 
603
- $ sf static-resource generate --name MyResource
793
+ $ sf template generate static-resource --name MyResource
604
794
 
605
795
  Similar to previous example, but specifies a MIME type of application/json:
606
796
 
607
- $ sf static-resource generate --name MyResource --type application/json
797
+ $ sf template generate static-resource --name MyResource --type application/json
608
798
 
609
799
  Generate the resource file in the "force-app/main/default/staticresources" directory:
610
800
 
611
- $ sf static-resource generate --name MyResource --output-dir force-app/main/default/staticresources
801
+ $ sf template generate static-resource --name MyResource --output-dir force-app/main/default/staticresources
612
802
 
613
803
  FLAG DESCRIPTIONS
614
804
  -d, --output-dir=<value> Directory for saving the created files.
@@ -627,145 +817,15 @@ FLAG DESCRIPTIONS
627
817
  etc.
628
818
  ```
629
819
 
630
- _See code: [src/commands/static-resource/generate.ts](https://github.com/salesforcecli/plugin-templates/blob/56.5.2/src/commands/static-resource/generate.ts)_
631
-
632
- ## `sf template generate apex class`
633
-
634
- Generate an Apex class.
635
-
636
- ```
637
- USAGE
638
- $ sf template generate apex class -n <value> [--json] [--flags-dir <value>] [-t
639
- ApexException|ApexUnitTest|BasicUnitTest|DefaultApexClass|InboundEmailService] [-d <value>] [--api-version <value>]
640
-
641
- FLAGS
642
- -d, --output-dir=<value> [default: .] Directory for saving the created files.
643
- -n, --name=<value> (required) Name of the generated Apex class.
644
- -t, --template=<option> [default: DefaultApexClass] Template to use for file creation.
645
- <options: ApexException|ApexUnitTest|BasicUnitTest|DefaultApexClass|InboundEmailService>
646
- --api-version=<value> Override the api version used for api requests made by this command
647
-
648
- GLOBAL FLAGS
649
- --flags-dir=<value> Import flag values from a directory.
650
- --json Format output as json.
651
-
652
- DESCRIPTION
653
- Generate an Apex class.
654
-
655
- Generates the Apex *.cls file and associated metadata file. These files must be contained in a parent directory called
656
- "classes" in your package directory. Either run this command from an existing directory of this name, or use the
657
- --output-dir flag to generate one or point to an existing one.
658
-
659
- ALIASES
660
- $ sf force apex class create
661
- $ sf apex generate class
662
-
663
- EXAMPLES
664
- Generate two metadata files associated with the MyClass Apex class (MyClass.cls and MyClass.cls-meta.xml) in the
665
- current directory:
666
-
667
- $ sf template generate apex class --name MyClass
668
-
669
- Similar to previous example, but generates the files in the "force-app/main/default/classes" directory:
670
-
671
- $ sf template generate apex class --name MyClass --output-dir force-app/main/default/classes
672
-
673
- FLAG DESCRIPTIONS
674
- -d, --output-dir=<value> Directory for saving the created files.
675
-
676
- The location can be an absolute path or relative to the current working directory. The default is the current
677
- directory.
678
-
679
- -n, --name=<value> Name of the generated Apex class.
680
-
681
- The name can be up to 40 characters and must start with a letter.
682
-
683
- -t, --template=ApexException|ApexUnitTest|BasicUnitTest|DefaultApexClass|InboundEmailService
684
-
685
- Template to use for file creation.
686
-
687
- Supplied parameter values or default values are filled into a copy of the template.
688
- ```
689
-
690
- _See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.5.2/src/commands/template/generate/apex/class.ts)_
691
-
692
- ## `sf template generate apex trigger`
693
-
694
- Generate an Apex trigger.
695
-
696
- ```
697
- USAGE
698
- $ sf template generate apex trigger -n <value> [--json] [--flags-dir <value>] [-t ApexTrigger] [-d <value>] [--api-version
699
- <value>] [-s <value>] [-e before insert|before update|before delete|after insert|after update|after delete|after
700
- undelete...]
701
-
702
- FLAGS
703
- -d, --output-dir=<value> [default: .] Directory for saving the created files.
704
- -e, --event=<option>... [default: before insert] Events that fire the trigger.
705
- <options: before insert|before update|before delete|after insert|after update|after
706
- delete|after undelete>
707
- -n, --name=<value> (required) Name of the generated Apex trigger
708
- -s, --sobject=<value> [default: SOBJECT] Salesforce object to generate a trigger on.
709
- -t, --template=<option> [default: ApexTrigger] Template to use for file creation.
710
- <options: ApexTrigger>
711
- --api-version=<value> Override the api version used for api requests made by this command
712
-
713
- GLOBAL FLAGS
714
- --flags-dir=<value> Import flag values from a directory.
715
- --json Format output as json.
716
-
717
- DESCRIPTION
718
- Generate an Apex trigger.
820
+ _See code: [src/commands/template/generate/static-resource/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/static-resource/index.ts)_
719
821
 
720
- Generates the Apex trigger *.trigger file and associated metadata file. These files must be contained in a parent
721
- directory called "triggers" in your package directory. Either run this command from an existing directory of this
722
- name, or use the --output-dir flag to generate one or point to an existing one.
723
-
724
- If you don't specify the --sobject flag, the .trigger file contains the generic placeholder SOBJECT; replace it with
725
- the Salesforce object you want to generate a trigger for. If you don't specify --event, "before insert" is used.
726
-
727
- ALIASES
728
- $ sf force apex trigger create
729
- $ sf apex generate trigger
730
-
731
- EXAMPLES
732
- Generate two files associated with the MyTrigger Apex trigger (MyTrigger.trigger and MyTrigger.trigger-meta.xml) in
733
- the current directory:
734
-
735
- $ sf template generate apex trigger --name MyTrigger
736
-
737
- Similar to the previous example, but generate the files in the "force-app/main/default/triggers" directory:
738
-
739
- $ sf template generate apex trigger --name MyTrigger --output-dir force-app/main/default/triggers
740
-
741
- Generate files for a trigger that fires on the Account object before and after an insert:
742
-
743
- $ sf template generate apex trigger --name MyTrigger --sobject Account --event "before insert,after insert"
744
-
745
- FLAG DESCRIPTIONS
746
- -d, --output-dir=<value> Directory for saving the created files.
747
-
748
- The location can be an absolute path or relative to the current working directory. The default is the current
749
- directory.
750
-
751
- -n, --name=<value> Name of the generated Apex trigger
752
-
753
- The name can be up to 40 characters and must start with a letter.
754
-
755
- -t, --template=ApexTrigger Template to use for file creation.
756
-
757
- Supplied parameter values or default values are filled into a copy of the template.
758
- ```
759
-
760
- _See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.5.2/src/commands/template/generate/apex/trigger.ts)_
761
-
762
- ## `sf visualforce generate component`
822
+ ## `sf template generate visualforce component`
763
823
 
764
824
  Generate a Visualforce Component.
765
825
 
766
826
  ```
767
827
  USAGE
768
- $ sf visualforce generate component -n <value> -l <value> [--json] [--flags-dir <value>] [-t DefaultVFComponent] [-d <value>]
828
+ $ sf template generate visualforce component -n <value> -l <value> [--json] [--flags-dir <value>] [-t DefaultVFComponent] [-d <value>]
769
829
  [--api-version <value>]
770
830
 
771
831
  FLAGS
@@ -788,15 +848,16 @@ DESCRIPTION
788
848
 
789
849
  ALIASES
790
850
  $ sf force visualforce component create
851
+ $ sf visualforce generate component
791
852
 
792
853
  EXAMPLES
793
854
  Generate the metadata files for a Visualforce component in the current directory:
794
855
 
795
- $ sf visualforce generate component --name mycomponent --label mylabel
856
+ $ sf template generate visualforce component --name mycomponent --label mylabel
796
857
 
797
858
  Similar to previous example, but generate the files in the directory "force-app/main/default/components":
798
859
 
799
- $ sf visualforce generate component --name mycomponent --label mylabel --output-dir components
860
+ $ sf template generate visualforce component --name mycomponent --label mylabel --output-dir components
800
861
 
801
862
  FLAG DESCRIPTIONS
802
863
  -d, --output-dir=<value> Directory for saving the created files.
@@ -813,16 +874,16 @@ FLAG DESCRIPTIONS
813
874
  Supplied parameter values or default values are filled into a copy of the template.
814
875
  ```
815
876
 
816
- _See code: [src/commands/visualforce/generate/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.5.2/src/commands/visualforce/generate/component.ts)_
877
+ _See code: [src/commands/template/generate/visualforce/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/visualforce/component.ts)_
817
878
 
818
- ## `sf visualforce generate page`
879
+ ## `sf template generate visualforce page`
819
880
 
820
881
  Generate a Visualforce Page.
821
882
 
822
883
  ```
823
884
  USAGE
824
- $ sf visualforce generate page -n <value> -l <value> [--json] [--flags-dir <value>] [-d <value>] [--api-version
825
- <value>]
885
+ $ sf template generate visualforce page -n <value> -l <value> [--json] [--flags-dir <value>] [-d <value>]
886
+ [--api-version <value>]
826
887
 
827
888
  FLAGS
828
889
  -d, --output-dir=<value> [default: .] Directory for saving the created files.
@@ -842,15 +903,16 @@ DESCRIPTION
842
903
 
843
904
  ALIASES
844
905
  $ sf force visualforce page create
906
+ $ sf visualforce generate page
845
907
 
846
908
  EXAMPLES
847
909
  Generate the metadata files for a Visualforce page in the current directory:
848
910
 
849
- $ sf visualforce generate page --name mypage --label mylabel
911
+ $ sf template generate visualforce page --name mypage --label mylabel
850
912
 
851
913
  Similar to previous example, but generate the files in the directory "force-app/main/default/pages":
852
914
 
853
- $ sf visualforce generate page --name mypage --label mylabel --output-dir pages
915
+ $ sf template generate visualforce page --name mypage --label mylabel --output-dir pages
854
916
 
855
917
  FLAG DESCRIPTIONS
856
918
  -d, --output-dir=<value> Directory for saving the created files.
@@ -863,6 +925,6 @@ FLAG DESCRIPTIONS
863
925
  The name can be up to 40 characters and must start with a letter.
864
926
  ```
865
927
 
866
- _See code: [src/commands/visualforce/generate/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.5.2/src/commands/visualforce/generate/page.ts)_
928
+ _See code: [src/commands/template/generate/visualforce/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.7.0/src/commands/template/generate/visualforce/page.ts)_
867
929
 
868
930
  <!-- commandsstop -->