@salesforce/plugin-templates 56.8.1 → 56.9.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/README.md CHANGED
@@ -175,7 +175,7 @@ FLAG DESCRIPTIONS
175
175
  directory.
176
176
  ```
177
177
 
178
- _See code: [src/commands/template/generate/analytics/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/analytics/template.ts)_
178
+ _See code: [src/commands/template/generate/analytics/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/analytics/template.ts)_
179
179
 
180
180
  ## `sf template generate apex class`
181
181
 
@@ -235,7 +235,7 @@ FLAG DESCRIPTIONS
235
235
  Supplied parameter values or default values are filled into a copy of the template.
236
236
  ```
237
237
 
238
- _See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/apex/class.ts)_
238
+ _See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/apex/class.ts)_
239
239
 
240
240
  ## `sf template generate apex trigger`
241
241
 
@@ -305,7 +305,7 @@ FLAG DESCRIPTIONS
305
305
  Supplied parameter values or default values are filled into a copy of the template.
306
306
  ```
307
307
 
308
- _See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/apex/trigger.ts)_
308
+ _See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/apex/trigger.ts)_
309
309
 
310
310
  ## `sf template generate digital-experience site`
311
311
 
@@ -313,8 +313,8 @@ Generate an Experience Cloud site.
313
313
 
314
314
  ```
315
315
  USAGE
316
- $ sf template generate digital-experience site -n <value> -t BuildYourOwnLWR [--json] [--flags-dir <value>] [-o <value>] [-p <value>] [-e
317
- <value>] [-d <value>]
316
+ $ sf template generate digital-experience site -n <value> -t Build Your Own (LWR) [--json] [--flags-dir <value>] [-o <value>] [-p <value>]
317
+ [-e <value>] [-d <value>]
318
318
 
319
319
  FLAGS
320
320
  -d, --output-dir=<value> Directory to generate the site files in.
@@ -323,8 +323,8 @@ FLAGS
323
323
  -n, --name=<value> (required) Name of the Experience Cloud site to generate.
324
324
  -o, --target-org=<value> Username or alias of the target org.
325
325
  -p, --url-path-prefix=<value> URL path prefix for the site; must contain only alphanumeric characters.
326
- -t, --template=<option> (required) Template to use when generating the site.
327
- <options: BuildYourOwnLWR>
326
+ -t, --template-name=<option> (required) Template to use when generating the site.
327
+ <options: Build Your Own (LWR)>
328
328
 
329
329
  GLOBAL FLAGS
330
330
  --flags-dir=<value> Import flag values from a directory.
@@ -333,19 +333,23 @@ GLOBAL FLAGS
333
333
  DESCRIPTION
334
334
  Generate an Experience Cloud site.
335
335
 
336
- Creates an Experience Cloud site with the specified template, name, and URL path prefix. The site includes all
337
- necessary metadata files, including DigitalExperienceConfig, DigitalExperienceBundle, Network, and CustomSite.
336
+ Creates the metadata of an Experience Cloud site with the specified template, name, and URL path prefix. The output
337
+ includes all the necessary metadata files, including DigitalExperienceConfig, DigitalExperienceBundle, Network, and
338
+ CustomSite.
339
+ Unlike `sf community create`, which builds the site directly in the org, this command generates only the local
340
+ metadata.
338
341
 
339
342
  EXAMPLES
340
- Generate an Experience Cloud site using the BuildYourOwnLWR template. The site is called "mysite" and has the URL
341
- path prefix "mysite":
343
+ Generate an Experience Cloud site using the Build Your Own (LWR) template. The site is called "mysite" and has the
344
+ URL path prefix "mysite":
342
345
 
343
- $ sf template generate digital-experience site --template BuildYourOwnLWR --name mysite --url-path-prefix mysite
346
+ $ sf template generate digital-experience site --template-name "Build Your Own (LWR)" --name mysite \
347
+ --url-path-prefix mysite
344
348
 
345
349
  Generate an Experience Cloud site like the last example, but generate the files into the specified output directory:
346
350
 
347
- $ sf template generate digital-experience site --template BuildYourOwnLWR --name mysite --url-path-prefix mysite \
348
- --output-dir force-app/main/default
351
+ $ sf template generate digital-experience site --template-name "Build Your Own (LWR)" --name mysite \
352
+ --url-path-prefix mysite --output-dir force-app/main/default
349
353
 
350
354
  FLAG DESCRIPTIONS
351
355
  -d, --output-dir=<value> Directory to generate the site files in.
@@ -355,7 +359,7 @@ FLAG DESCRIPTIONS
355
359
  project, defaults to the current directory.
356
360
  ```
357
361
 
358
- _See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/digital-experience/site.ts)_
362
+ _See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/digital-experience/site.ts)_
359
363
 
360
364
  ## `sf template generate flexipage`
361
365
 
@@ -437,7 +441,7 @@ FLAG DESCRIPTIONS
437
441
  'Custom_Object__c'. This sets the `sobjectType` field in the FlexiPage metadata.
438
442
  ```
439
443
 
440
- _See code: [src/commands/template/generate/flexipage/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/flexipage/index.ts)_
444
+ _See code: [src/commands/template/generate/flexipage/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/flexipage/index.ts)_
441
445
 
442
446
  ## `sf template generate lightning app`
443
447
 
@@ -493,7 +497,7 @@ FLAG DESCRIPTIONS
493
497
  Supplied parameter values or default values are filled into a copy of the template.
494
498
  ```
495
499
 
496
- _See code: [src/commands/template/generate/lightning/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/lightning/app.ts)_
500
+ _See code: [src/commands/template/generate/lightning/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/lightning/app.ts)_
497
501
 
498
502
  ## `sf template generate lightning component`
499
503
 
@@ -563,7 +567,7 @@ FLAG DESCRIPTIONS
563
567
  Supplied parameter values or default values are filled into a copy of the template.
564
568
  ```
565
569
 
566
- _See code: [src/commands/template/generate/lightning/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/lightning/component.ts)_
570
+ _See code: [src/commands/template/generate/lightning/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/lightning/component.ts)_
567
571
 
568
572
  ## `sf template generate lightning event`
569
573
 
@@ -619,7 +623,7 @@ FLAG DESCRIPTIONS
619
623
  Supplied parameter values or default values are filled into a copy of the template.
620
624
  ```
621
625
 
622
- _See code: [src/commands/template/generate/lightning/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/lightning/event.ts)_
626
+ _See code: [src/commands/template/generate/lightning/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/lightning/event.ts)_
623
627
 
624
628
  ## `sf template generate lightning interface`
625
629
 
@@ -675,7 +679,7 @@ FLAG DESCRIPTIONS
675
679
  Supplied parameter values or default values are filled into a copy of the template.
676
680
  ```
677
681
 
678
- _See code: [src/commands/template/generate/lightning/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/lightning/interface.ts)_
682
+ _See code: [src/commands/template/generate/lightning/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/lightning/interface.ts)_
679
683
 
680
684
  ## `sf template generate lightning test`
681
685
 
@@ -731,7 +735,7 @@ FLAG DESCRIPTIONS
731
735
  Supplied parameter values or default values are filled into a copy of the template.
732
736
  ```
733
737
 
734
- _See code: [src/commands/template/generate/lightning/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/lightning/test.ts)_
738
+ _See code: [src/commands/template/generate/lightning/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/lightning/test.ts)_
735
739
 
736
740
  ## `sf template generate project`
737
741
 
@@ -837,7 +841,7 @@ FLAG DESCRIPTIONS
837
841
  Override the api version used for api requests made by this command
838
842
  ```
839
843
 
840
- _See code: [src/commands/template/generate/project/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/project/index.ts)_
844
+ _See code: [src/commands/template/generate/project/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/project/index.ts)_
841
845
 
842
846
  ## `sf template generate static-resource`
843
847
 
@@ -900,7 +904,7 @@ FLAG DESCRIPTIONS
900
904
  etc.
901
905
  ```
902
906
 
903
- _See code: [src/commands/template/generate/static-resource/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/static-resource/index.ts)_
907
+ _See code: [src/commands/template/generate/static-resource/index.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/static-resource/index.ts)_
904
908
 
905
909
  ## `sf template generate visualforce component`
906
910
 
@@ -957,7 +961,7 @@ FLAG DESCRIPTIONS
957
961
  Supplied parameter values or default values are filled into a copy of the template.
958
962
  ```
959
963
 
960
- _See code: [src/commands/template/generate/visualforce/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/visualforce/component.ts)_
964
+ _See code: [src/commands/template/generate/visualforce/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/visualforce/component.ts)_
961
965
 
962
966
  ## `sf template generate visualforce page`
963
967
 
@@ -1008,6 +1012,6 @@ FLAG DESCRIPTIONS
1008
1012
  The name can be up to 40 characters and must start with a letter.
1009
1013
  ```
1010
1014
 
1011
- _See code: [src/commands/template/generate/visualforce/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.8.1/src/commands/template/generate/visualforce/page.ts)_
1015
+ _See code: [src/commands/template/generate/visualforce/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.9.0/src/commands/template/generate/visualforce/page.ts)_
1012
1016
 
1013
1017
  <!-- commandsstop -->
@@ -8,7 +8,7 @@ export default class GenerateSite extends SfCommand<CreateOutput> {
8
8
  static readonly flags: {
9
9
  'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
10
10
  name: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
- template: import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
11
+ 'template-name': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
12
  'url-path-prefix': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
13
13
  'admin-email': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
14
  'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
@@ -11,6 +11,13 @@ import { Messages, SfProject } from '@salesforce/core';
11
11
  import { getCustomTemplates, runGenerator } from '../../../../utils/templateCommand.js';
12
12
  Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
13
13
  const messages = Messages.loadMessages('@salesforce/plugin-templates', 'digitalExperienceSite');
14
+ /**
15
+ * Strips spaces and non-alphanumeric characters so display names map to template directories
16
+ * (e.g. "Build Your Own (LWR)" → "BuildYourOwnLWR").
17
+ */
18
+ function normalizeTemplateName(name) {
19
+ return name.replace(/[^a-zA-Z0-9]/g, '');
20
+ }
14
21
  export default class GenerateSite extends SfCommand {
15
22
  static state = 'preview';
16
23
  static summary = messages.getMessage('summary');
@@ -23,10 +30,10 @@ export default class GenerateSite extends SfCommand {
23
30
  summary: messages.getMessage('flags.name.summary'),
24
31
  required: true,
25
32
  }),
26
- template: Flags.string({
33
+ 'template-name': Flags.string({
27
34
  char: 't',
28
- summary: messages.getMessage('flags.template.summary'),
29
- options: ['BuildYourOwnLWR'],
35
+ summary: messages.getMessage('flags.template-name.summary'),
36
+ options: ['Build Your Own (LWR)'],
30
37
  required: true,
31
38
  }),
32
39
  'url-path-prefix': Flags.string({
@@ -75,7 +82,7 @@ export default class GenerateSite extends SfCommand {
75
82
  sitename: flags.name,
76
83
  urlpathprefix: flags['url-path-prefix'],
77
84
  adminemail: adminEmail,
78
- template: flags.template,
85
+ template: normalizeTemplateName(flags['template-name']),
79
86
  outputdir: outputDir,
80
87
  };
81
88
  return runGenerator({
@@ -1 +1 @@
1
- {"version":3,"file":"site.js","sourceRoot":"","sources":["../../../../../src/commands/template/generate/digital-experience/site.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAA8C,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAExF,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,uBAAuB,CAAC,CAAC;AAEhG,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,SAAuB;IACxD,MAAM,CAAU,KAAK,GAAG,SAAS,CAAC;IAClC,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAC5D,MAAM,CAAU,KAAK,GAAG;QAC7B,YAAY,EAAE,KAAK,CAAC,WAAW,EAAE;QACjC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC;YACjB,IAAI,EAAE,GAAG;YACT,OAAO,EAAE,QAAQ,CAAC,UAAU,CAAC,oBAAoB,CAAC;YAClD,QAAQ,EAA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,KAAK,CAAC,aAAa,CAAC,CAAC;QACtC,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,MAAM,GAAG,GAAG,KAAK,CAAC,YAAY,CAAC,CAAC;YAChC,0FAA0F;YAC1F,sFAAsF;YACtF,UAAU,GAAG,GAAG,EAAE,aAAa,EAAE,EAAE,WAAW,EAAE,IAAI,yBAAyB,CAAC;QAChF,CAAC;QAED,MAAM,SAAS,GAAG,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,YAAY,CAAC,mBAAmB,EAAE,CAAC,CAAC;QAEpF,MAAM,cAAc,GAAiC;YACnD,QAAQ,EAAE,KAAK,CAAC,IAAI;YACpB,aAAa,EAAE,KAAK,CAAC,iBAAiB,CAAC;YACvC,UAAU,EAAE,UAAU;YACtB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,SAAS,EAAE,SAAS;SACrB,CAAC;QAEF,OAAO,YAAY,CAAC;YAClB,YAAY,EAAE,YAAY,CAAC,qBAAqB;YAChD,IAAI,EAAE,cAAc;YACpB,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YAC/C,SAAS,EAAE,kBAAkB,CAAC,IAAI,CAAC,gBAAgB,CAAC;SACrD,CAAC,CAAC;IACL,CAAC"}
1
+ {"version":3,"file":"site.js","sourceRoot":"","sources":["../../../../../src/commands/template/generate/digital-experience/site.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,EAA8C,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AAExF,QAAQ,CAA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AAK,CAAC,iBAAiB,CAAC;YACvC,UAAU,EAAE,UAAU;YACtB,QAAQ,EAAE,qBAAqB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YACvD,SAAS,EAAE,SAAS;SACrB,CAAC;QAEF,OAAO,YAAY,CAAC;YAClB,YAAY,EAAE,YAAY,CAAC,qBAAqB;YAChD,IAAI,EAAE,cAAc;YACpB,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YAC/C,SAAS,EAAE,kBAAkB,CAAC,IAAI,CAAC,gBAAgB,CAAC;SACrD,CAAC,CAAC;IACL,CAAC"}
@@ -4,31 +4,32 @@ Generate an Experience Cloud site.
4
4
 
5
5
  # description
6
6
 
7
- Creates an Experience Cloud site with the specified template, name, and URL path prefix. The site includes all necessary metadata files, including DigitalExperienceConfig, DigitalExperienceBundle, Network, and CustomSite.
7
+ Creates the metadata of an Experience Cloud site with the specified template, name, and URL path prefix. The output includes all the necessary metadata files, including DigitalExperienceConfig, DigitalExperienceBundle, Network, and CustomSite.
8
+ Unlike `sf community create`, which builds the site directly in the org, this command generates only the local metadata.
8
9
 
9
10
  # examples
10
11
 
11
- - Generate an Experience Cloud site using the BuildYourOwnLWR template. The site is called "mysite" and has the URL path prefix "mysite":
12
+ - Generate an Experience Cloud site using the Build Your Own (LWR) template. The site is called "mysite" and has the URL path prefix "mysite":
12
13
 
13
- <%= config.bin %> <%= command.id %> --template BuildYourOwnLWR --name mysite --url-path-prefix mysite
14
+ <%= config.bin %> <%= command.id %> --template-name "Build Your Own (LWR)" --name mysite --url-path-prefix mysite
14
15
 
15
16
  - Generate an Experience Cloud site like the last example, but generate the files into the specified output directory:
16
17
 
17
- <%= config.bin %> <%= command.id %> --template BuildYourOwnLWR --name mysite --url-path-prefix mysite --output-dir force-app/main/default
18
+ <%= config.bin %> <%= command.id %> --template-name "Build Your Own (LWR)" --name mysite --url-path-prefix mysite --output-dir force-app/main/default
18
19
 
19
20
  # flags.name.summary
20
21
 
21
22
  Name of the Experience Cloud site to generate.
22
23
 
23
- # flags.template.summary
24
+ # flags.template-name.summary
24
25
 
25
26
  Template to use when generating the site.
26
27
 
27
- # flags.template.description
28
+ # flags.template-name.description
28
29
 
29
30
  Supported templates:
30
31
 
31
- - BuildYourOwnLWR - Creates blazing-fast digital experiences, such as websites, microsites, and portals, using the Lightning Web Components programming model. Powered by Lightning Web Runtime (LWR), this customizable template delivers unparalleled site performance. For additional details, see this Salesforce Help topic: https://help.salesforce.com/s/articleView?id=experience.rss_build_your_own_lwr.htm.
32
+ - Build Your Own (LWR) - Creates blazing-fast digital experiences, such as websites, microsites, and portals, using the Lightning Web Components programming model. Powered by Lightning Web Runtime (LWR), this customizable template delivers unparalleled site performance. For additional details, see this Salesforce Help topic: https://help.salesforce.com/s/articleView?id=experience.rss_build_your_own_lwr.htm.
32
33
 
33
34
  # flags.url-path-prefix.summary
34
35
 
@@ -375,6 +375,134 @@
375
375
  "trigger:apex:generate:template"
376
376
  ]
377
377
  },
378
+ "template:generate:digital-experience:site": {
379
+ "aliases": [],
380
+ "args": {},
381
+ "description": "Creates the metadata of an Experience Cloud site with the specified template, name, and URL path prefix. The output includes all the necessary metadata files, including DigitalExperienceConfig, DigitalExperienceBundle, Network, and CustomSite.\nUnlike `sf community create`, which builds the site directly in the org, this command generates only the local metadata.",
382
+ "examples": [
383
+ "Generate an Experience Cloud site using the Build Your Own (LWR) template. The site is called \"mysite\" and has the URL path prefix \"mysite\":\n<%= config.bin %> <%= command.id %> --template-name \"Build Your Own (LWR)\" --name mysite --url-path-prefix mysite",
384
+ "Generate an Experience Cloud site like the last example, but generate the files into the specified output directory:\n<%= config.bin %> <%= command.id %> --template-name \"Build Your Own (LWR)\" --name mysite --url-path-prefix mysite --output-dir force-app/main/default"
385
+ ],
386
+ "flags": {
387
+ "json": {
388
+ "description": "Format output as json.",
389
+ "helpGroup": "GLOBAL",
390
+ "name": "json",
391
+ "allowNo": false,
392
+ "type": "boolean"
393
+ },
394
+ "flags-dir": {
395
+ "helpGroup": "GLOBAL",
396
+ "name": "flags-dir",
397
+ "summary": "Import flag values from a directory.",
398
+ "hasDynamicHelp": false,
399
+ "multiple": false,
400
+ "type": "option"
401
+ },
402
+ "target-org": {
403
+ "char": "o",
404
+ "name": "target-org",
405
+ "noCacheDefault": true,
406
+ "summary": "Username or alias of the target org.",
407
+ "hasDynamicHelp": true,
408
+ "multiple": false,
409
+ "type": "option"
410
+ },
411
+ "name": {
412
+ "char": "n",
413
+ "name": "name",
414
+ "required": true,
415
+ "summary": "Name of the Experience Cloud site to generate.",
416
+ "hasDynamicHelp": false,
417
+ "multiple": false,
418
+ "type": "option"
419
+ },
420
+ "template-name": {
421
+ "char": "t",
422
+ "name": "template-name",
423
+ "required": true,
424
+ "summary": "Template to use when generating the site.",
425
+ "hasDynamicHelp": false,
426
+ "multiple": false,
427
+ "options": [
428
+ "Build Your Own (LWR)"
429
+ ],
430
+ "type": "option"
431
+ },
432
+ "url-path-prefix": {
433
+ "char": "p",
434
+ "name": "url-path-prefix",
435
+ "summary": "URL path prefix for the site; must contain only alphanumeric characters.",
436
+ "default": "",
437
+ "hasDynamicHelp": false,
438
+ "multiple": false,
439
+ "type": "option"
440
+ },
441
+ "admin-email": {
442
+ "char": "e",
443
+ "name": "admin-email",
444
+ "summary": "Email address for the site administrator. Defaults to the username of the currently authenticated user.",
445
+ "hasDynamicHelp": false,
446
+ "multiple": false,
447
+ "type": "option"
448
+ },
449
+ "output-dir": {
450
+ "char": "d",
451
+ "description": "The location can be an absolute path or relative to the current working directory. If not specified, the command reads your sfdx-project.json file and uses the default package directory. When running outside a Salesforce DX project, defaults to the current directory.",
452
+ "name": "output-dir",
453
+ "summary": "Directory to generate the site files in.",
454
+ "hasDynamicHelp": false,
455
+ "multiple": false,
456
+ "type": "option"
457
+ }
458
+ },
459
+ "hasDynamicHelp": true,
460
+ "hiddenAliases": [],
461
+ "id": "template:generate:digital-experience:site",
462
+ "pluginAlias": "@salesforce/plugin-templates",
463
+ "pluginName": "@salesforce/plugin-templates",
464
+ "pluginType": "core",
465
+ "state": "preview",
466
+ "strict": true,
467
+ "summary": "Generate an Experience Cloud site.",
468
+ "enableJsonFlag": true,
469
+ "isESM": true,
470
+ "relativePath": [
471
+ "lib",
472
+ "commands",
473
+ "template",
474
+ "generate",
475
+ "digital-experience",
476
+ "site.js"
477
+ ],
478
+ "aliasPermutations": [],
479
+ "permutations": [
480
+ "template:generate:digital-experience:site",
481
+ "generate:template:digital-experience:site",
482
+ "generate:digital-experience:template:site",
483
+ "generate:digital-experience:site:template",
484
+ "template:digital-experience:generate:site",
485
+ "digital-experience:template:generate:site",
486
+ "digital-experience:generate:template:site",
487
+ "digital-experience:generate:site:template",
488
+ "template:digital-experience:site:generate",
489
+ "digital-experience:template:site:generate",
490
+ "digital-experience:site:template:generate",
491
+ "digital-experience:site:generate:template",
492
+ "template:generate:site:digital-experience",
493
+ "generate:template:site:digital-experience",
494
+ "generate:site:template:digital-experience",
495
+ "generate:site:digital-experience:template",
496
+ "template:site:generate:digital-experience",
497
+ "site:template:generate:digital-experience",
498
+ "site:generate:template:digital-experience",
499
+ "site:generate:digital-experience:template",
500
+ "template:site:digital-experience:generate",
501
+ "site:template:digital-experience:generate",
502
+ "site:digital-experience:template:generate",
503
+ "site:digital-experience:generate:template"
504
+ ]
505
+ },
378
506
  "template:generate:analytics:template": {
379
507
  "aliases": [
380
508
  "force:analytics:template:create",
@@ -528,134 +656,6 @@
528
656
  "template:analytics:generate:template"
529
657
  ]
530
658
  },
531
- "template:generate:digital-experience:site": {
532
- "aliases": [],
533
- "args": {},
534
- "description": "Creates an Experience Cloud site with the specified template, name, and URL path prefix. The site includes all necessary metadata files, including DigitalExperienceConfig, DigitalExperienceBundle, Network, and CustomSite.",
535
- "examples": [
536
- "Generate an Experience Cloud site using the BuildYourOwnLWR template. The site is called \"mysite\" and has the URL path prefix \"mysite\":\n<%= config.bin %> <%= command.id %> --template BuildYourOwnLWR --name mysite --url-path-prefix mysite",
537
- "Generate an Experience Cloud site like the last example, but generate the files into the specified output directory:\n<%= config.bin %> <%= command.id %> --template BuildYourOwnLWR --name mysite --url-path-prefix mysite --output-dir force-app/main/default"
538
- ],
539
- "flags": {
540
- "json": {
541
- "description": "Format output as json.",
542
- "helpGroup": "GLOBAL",
543
- "name": "json",
544
- "allowNo": false,
545
- "type": "boolean"
546
- },
547
- "flags-dir": {
548
- "helpGroup": "GLOBAL",
549
- "name": "flags-dir",
550
- "summary": "Import flag values from a directory.",
551
- "hasDynamicHelp": false,
552
- "multiple": false,
553
- "type": "option"
554
- },
555
- "target-org": {
556
- "char": "o",
557
- "name": "target-org",
558
- "noCacheDefault": true,
559
- "summary": "Username or alias of the target org.",
560
- "hasDynamicHelp": true,
561
- "multiple": false,
562
- "type": "option"
563
- },
564
- "name": {
565
- "char": "n",
566
- "name": "name",
567
- "required": true,
568
- "summary": "Name of the Experience Cloud site to generate.",
569
- "hasDynamicHelp": false,
570
- "multiple": false,
571
- "type": "option"
572
- },
573
- "template": {
574
- "char": "t",
575
- "name": "template",
576
- "required": true,
577
- "summary": "Template to use when generating the site.",
578
- "hasDynamicHelp": false,
579
- "multiple": false,
580
- "options": [
581
- "BuildYourOwnLWR"
582
- ],
583
- "type": "option"
584
- },
585
- "url-path-prefix": {
586
- "char": "p",
587
- "name": "url-path-prefix",
588
- "summary": "URL path prefix for the site; must contain only alphanumeric characters.",
589
- "default": "",
590
- "hasDynamicHelp": false,
591
- "multiple": false,
592
- "type": "option"
593
- },
594
- "admin-email": {
595
- "char": "e",
596
- "name": "admin-email",
597
- "summary": "Email address for the site administrator. Defaults to the username of the currently authenticated user.",
598
- "hasDynamicHelp": false,
599
- "multiple": false,
600
- "type": "option"
601
- },
602
- "output-dir": {
603
- "char": "d",
604
- "description": "The location can be an absolute path or relative to the current working directory. If not specified, the command reads your sfdx-project.json file and uses the default package directory. When running outside a Salesforce DX project, defaults to the current directory.",
605
- "name": "output-dir",
606
- "summary": "Directory to generate the site files in.",
607
- "hasDynamicHelp": false,
608
- "multiple": false,
609
- "type": "option"
610
- }
611
- },
612
- "hasDynamicHelp": true,
613
- "hiddenAliases": [],
614
- "id": "template:generate:digital-experience:site",
615
- "pluginAlias": "@salesforce/plugin-templates",
616
- "pluginName": "@salesforce/plugin-templates",
617
- "pluginType": "core",
618
- "state": "preview",
619
- "strict": true,
620
- "summary": "Generate an Experience Cloud site.",
621
- "enableJsonFlag": true,
622
- "isESM": true,
623
- "relativePath": [
624
- "lib",
625
- "commands",
626
- "template",
627
- "generate",
628
- "digital-experience",
629
- "site.js"
630
- ],
631
- "aliasPermutations": [],
632
- "permutations": [
633
- "template:generate:digital-experience:site",
634
- "generate:template:digital-experience:site",
635
- "generate:digital-experience:template:site",
636
- "generate:digital-experience:site:template",
637
- "template:digital-experience:generate:site",
638
- "digital-experience:template:generate:site",
639
- "digital-experience:generate:template:site",
640
- "digital-experience:generate:site:template",
641
- "template:digital-experience:site:generate",
642
- "digital-experience:template:site:generate",
643
- "digital-experience:site:template:generate",
644
- "digital-experience:site:generate:template",
645
- "template:generate:site:digital-experience",
646
- "generate:template:site:digital-experience",
647
- "generate:site:template:digital-experience",
648
- "generate:site:digital-experience:template",
649
- "template:site:generate:digital-experience",
650
- "site:template:generate:digital-experience",
651
- "site:generate:template:digital-experience",
652
- "site:generate:digital-experience:template",
653
- "template:site:digital-experience:generate",
654
- "site:template:digital-experience:generate",
655
- "site:digital-experience:template:generate",
656
- "site:digital-experience:generate:template"
657
- ]
658
- },
659
659
  "template:generate:flexipage": {
660
660
  "aliases": [],
661
661
  "args": {},
@@ -2505,5 +2505,5 @@
2505
2505
  ]
2506
2506
  }
2507
2507
  },
2508
- "version": "56.8.1"
2508
+ "version": "56.9.0"
2509
2509
  }
package/package.json CHANGED
@@ -1,24 +1,24 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-templates",
3
3
  "description": "Commands to create metadata from a default or custom template",
4
- "version": "56.8.1",
4
+ "version": "56.9.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/salesforcecli/plugin-templates/issues",
7
7
  "enableO11y": true,
8
8
  "o11yUploadEndpoint": "https://794testsite.my.site.com/byolwr/webruntime/log/metrics",
9
9
  "dependencies": {
10
- "@salesforce/core": "^8.25.1",
10
+ "@salesforce/core": "^8.26.0",
11
11
  "@salesforce/sf-plugins-core": "^12",
12
12
  "@salesforce/templates": "^65.5.9"
13
13
  },
14
14
  "devDependencies": {
15
- "@oclif/plugin-command-snapshot": "^5.3.8",
15
+ "@oclif/plugin-command-snapshot": "^5.3.9",
16
16
  "@salesforce/cli-plugins-testkit": "^5.3.41",
17
17
  "@salesforce/dev-scripts": "^11.0.4",
18
- "@salesforce/plugin-command-reference": "^3.1.79",
18
+ "@salesforce/plugin-command-reference": "^3.1.80",
19
19
  "@types/yeoman-assert": "^3.1.4",
20
20
  "eslint-plugin-sf-plugin": "^1.20.33",
21
- "oclif": "^4.22.73",
21
+ "oclif": "^4.22.78",
22
22
  "ts-node": "^10.9.2",
23
23
  "typescript": "^5.9.3",
24
24
  "yeoman-assert": "^3.1.1"
@@ -249,7 +249,7 @@
249
249
  "exports": "./lib/index.js",
250
250
  "type": "module",
251
251
  "sfdx": {
252
- "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.8.1.crt",
253
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.8.1.sig"
252
+ "publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.9.0.crt",
253
+ "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.9.0.sig"
254
254
  }
255
255
  }