@salesforce/plugin-templates 56.5.1 → 56.6.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 +63 -12
- package/lib/commands/template/generate/digital-experience/site.d.ts +23 -0
- package/lib/commands/template/generate/digital-experience/site.js +89 -0
- package/lib/commands/template/generate/digital-experience/site.js.map +1 -0
- package/messages/digitalExperienceSite.md +47 -0
- package/oclif.manifest.json +129 -1
- package/package.json +9 -6
package/README.md
CHANGED
|
@@ -128,6 +128,7 @@ Congrats, you are debugging!
|
|
|
128
128
|
- [`sf static-resource generate`](#sf-static-resource-generate)
|
|
129
129
|
- [`sf template generate apex class`](#sf-template-generate-apex-class)
|
|
130
130
|
- [`sf template generate apex trigger`](#sf-template-generate-apex-trigger)
|
|
131
|
+
- [`sf template generate digital-experience site`](#sf-template-generate-digital-experience-site)
|
|
131
132
|
- [`sf visualforce generate component`](#sf-visualforce-generate-component)
|
|
132
133
|
- [`sf visualforce generate page`](#sf-visualforce-generate-page)
|
|
133
134
|
|
|
@@ -171,7 +172,7 @@ FLAG DESCRIPTIONS
|
|
|
171
172
|
directory.
|
|
172
173
|
```
|
|
173
174
|
|
|
174
|
-
_See code: [src/commands/analytics/generate/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
175
|
+
_See code: [src/commands/analytics/generate/template.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/analytics/generate/template.ts)_
|
|
175
176
|
|
|
176
177
|
## `sf lightning generate app`
|
|
177
178
|
|
|
@@ -226,7 +227,7 @@ FLAG DESCRIPTIONS
|
|
|
226
227
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
227
228
|
```
|
|
228
229
|
|
|
229
|
-
_See code: [src/commands/lightning/generate/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
230
|
+
_See code: [src/commands/lightning/generate/app.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/lightning/generate/app.ts)_
|
|
230
231
|
|
|
231
232
|
## `sf lightning generate component`
|
|
232
233
|
|
|
@@ -295,7 +296,7 @@ FLAG DESCRIPTIONS
|
|
|
295
296
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
296
297
|
```
|
|
297
298
|
|
|
298
|
-
_See code: [src/commands/lightning/generate/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
299
|
+
_See code: [src/commands/lightning/generate/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/lightning/generate/component.ts)_
|
|
299
300
|
|
|
300
301
|
## `sf lightning generate event`
|
|
301
302
|
|
|
@@ -350,7 +351,7 @@ FLAG DESCRIPTIONS
|
|
|
350
351
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
351
352
|
```
|
|
352
353
|
|
|
353
|
-
_See code: [src/commands/lightning/generate/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
354
|
+
_See code: [src/commands/lightning/generate/event.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/lightning/generate/event.ts)_
|
|
354
355
|
|
|
355
356
|
## `sf lightning generate interface`
|
|
356
357
|
|
|
@@ -405,7 +406,7 @@ FLAG DESCRIPTIONS
|
|
|
405
406
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
406
407
|
```
|
|
407
408
|
|
|
408
|
-
_See code: [src/commands/lightning/generate/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
409
|
+
_See code: [src/commands/lightning/generate/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/lightning/generate/interface.ts)_
|
|
409
410
|
|
|
410
411
|
## `sf lightning generate test`
|
|
411
412
|
|
|
@@ -460,7 +461,7 @@ FLAG DESCRIPTIONS
|
|
|
460
461
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
461
462
|
```
|
|
462
463
|
|
|
463
|
-
_See code: [src/commands/lightning/generate/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
464
|
+
_See code: [src/commands/lightning/generate/test.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/lightning/generate/test.ts)_
|
|
464
465
|
|
|
465
466
|
## `sf project generate`
|
|
466
467
|
|
|
@@ -565,7 +566,7 @@ FLAG DESCRIPTIONS
|
|
|
565
566
|
Override the api version used for api requests made by this command
|
|
566
567
|
```
|
|
567
568
|
|
|
568
|
-
_See code: [src/commands/project/generate.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
569
|
+
_See code: [src/commands/project/generate.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/project/generate.ts)_
|
|
569
570
|
|
|
570
571
|
## `sf static-resource generate`
|
|
571
572
|
|
|
@@ -627,7 +628,7 @@ FLAG DESCRIPTIONS
|
|
|
627
628
|
etc.
|
|
628
629
|
```
|
|
629
630
|
|
|
630
|
-
_See code: [src/commands/static-resource/generate.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
631
|
+
_See code: [src/commands/static-resource/generate.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/static-resource/generate.ts)_
|
|
631
632
|
|
|
632
633
|
## `sf template generate apex class`
|
|
633
634
|
|
|
@@ -687,7 +688,7 @@ FLAG DESCRIPTIONS
|
|
|
687
688
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
688
689
|
```
|
|
689
690
|
|
|
690
|
-
_See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
691
|
+
_See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/template/generate/apex/class.ts)_
|
|
691
692
|
|
|
692
693
|
## `sf template generate apex trigger`
|
|
693
694
|
|
|
@@ -757,7 +758,57 @@ FLAG DESCRIPTIONS
|
|
|
757
758
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
758
759
|
```
|
|
759
760
|
|
|
760
|
-
_See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
761
|
+
_See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/template/generate/apex/trigger.ts)_
|
|
762
|
+
|
|
763
|
+
## `sf template generate digital-experience site`
|
|
764
|
+
|
|
765
|
+
Generate an Experience Cloud site.
|
|
766
|
+
|
|
767
|
+
```
|
|
768
|
+
USAGE
|
|
769
|
+
$ sf template generate digital-experience site -n <value> -t BuildYourOwnLWR [--json] [--flags-dir <value>] [-o <value>] [-p <value>] [-e
|
|
770
|
+
<value>] [-d <value>]
|
|
771
|
+
|
|
772
|
+
FLAGS
|
|
773
|
+
-d, --output-dir=<value> Directory to generate the site files in.
|
|
774
|
+
-e, --admin-email=<value> Email address for the site administrator. Defaults to the username of the currently
|
|
775
|
+
authenticated user.
|
|
776
|
+
-n, --name=<value> (required) Name of the Experience Cloud site to generate.
|
|
777
|
+
-o, --target-org=<value> Username or alias of the target org.
|
|
778
|
+
-p, --url-path-prefix=<value> URL path prefix for the site; must contain only alphanumeric characters.
|
|
779
|
+
-t, --template=<option> (required) Template to use when generating the site.
|
|
780
|
+
<options: BuildYourOwnLWR>
|
|
781
|
+
|
|
782
|
+
GLOBAL FLAGS
|
|
783
|
+
--flags-dir=<value> Import flag values from a directory.
|
|
784
|
+
--json Format output as json.
|
|
785
|
+
|
|
786
|
+
DESCRIPTION
|
|
787
|
+
Generate an Experience Cloud site.
|
|
788
|
+
|
|
789
|
+
Creates an Experience Cloud site with the specified template, name, and URL path prefix. The site includes all
|
|
790
|
+
necessary metadata files, including DigitalExperienceConfig, DigitalExperienceBundle, Network, and CustomSite.
|
|
791
|
+
|
|
792
|
+
EXAMPLES
|
|
793
|
+
Generate an Experience Cloud site using the BuildYourOwnLWR template. The site is called "mysite" and has the URL
|
|
794
|
+
path prefix "mysite":
|
|
795
|
+
|
|
796
|
+
$ sf template generate digital-experience site --template BuildYourOwnLWR --name mysite --url-path-prefix mysite
|
|
797
|
+
|
|
798
|
+
Generate an Experience Cloud site like the last example, but generate the files into the specified output directory:
|
|
799
|
+
|
|
800
|
+
$ sf template generate digital-experience site --template BuildYourOwnLWR --name mysite --url-path-prefix mysite \
|
|
801
|
+
--output-dir force-app/main/default
|
|
802
|
+
|
|
803
|
+
FLAG DESCRIPTIONS
|
|
804
|
+
-d, --output-dir=<value> Directory to generate the site files in.
|
|
805
|
+
|
|
806
|
+
The location can be an absolute path or relative to the current working directory. If not specified, the command
|
|
807
|
+
reads your sfdx-project.json file and uses the default package directory. When running outside a Salesforce DX
|
|
808
|
+
project, defaults to the current directory.
|
|
809
|
+
```
|
|
810
|
+
|
|
811
|
+
_See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/template/generate/digital-experience/site.ts)_
|
|
761
812
|
|
|
762
813
|
## `sf visualforce generate component`
|
|
763
814
|
|
|
@@ -813,7 +864,7 @@ FLAG DESCRIPTIONS
|
|
|
813
864
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
814
865
|
```
|
|
815
866
|
|
|
816
|
-
_See code: [src/commands/visualforce/generate/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
867
|
+
_See code: [src/commands/visualforce/generate/component.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/visualforce/generate/component.ts)_
|
|
817
868
|
|
|
818
869
|
## `sf visualforce generate page`
|
|
819
870
|
|
|
@@ -863,6 +914,6 @@ FLAG DESCRIPTIONS
|
|
|
863
914
|
The name can be up to 40 characters and must start with a letter.
|
|
864
915
|
```
|
|
865
916
|
|
|
866
|
-
_See code: [src/commands/visualforce/generate/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.
|
|
917
|
+
_See code: [src/commands/visualforce/generate/page.ts](https://github.com/salesforcecli/plugin-templates/blob/56.6.0/src/commands/visualforce/generate/page.ts)_
|
|
867
918
|
|
|
868
919
|
<!-- commandsstop -->
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SfCommand } from '@salesforce/sf-plugins-core';
|
|
2
|
+
import { CreateOutput } from '@salesforce/templates';
|
|
3
|
+
export default class GenerateSite extends SfCommand<CreateOutput> {
|
|
4
|
+
static readonly state = "preview";
|
|
5
|
+
static readonly summary: string;
|
|
6
|
+
static readonly description: string;
|
|
7
|
+
static readonly examples: string[];
|
|
8
|
+
static readonly flags: {
|
|
9
|
+
'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
|
|
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>;
|
|
12
|
+
'url-path-prefix': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
13
|
+
'admin-email': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
14
|
+
'output-dir': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Resolves the default output directory by reading the project's sfdx-project.json.
|
|
18
|
+
* Returns the path to the default package directory,
|
|
19
|
+
* or falls back to the current directory if not in a project context.
|
|
20
|
+
*/
|
|
21
|
+
private static getDefaultOutputDir;
|
|
22
|
+
run(): Promise<CreateOutput>;
|
|
23
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2026, salesforce.com, inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* Licensed under the BSD 3-Clause license.
|
|
5
|
+
* For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
|
|
6
|
+
*/
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import { Flags, SfCommand, Ux } from '@salesforce/sf-plugins-core';
|
|
9
|
+
import { TemplateType } from '@salesforce/templates';
|
|
10
|
+
import { Messages, SfProject } from '@salesforce/core';
|
|
11
|
+
import { getCustomTemplates, runGenerator } from '../../../../utils/templateCommand.js';
|
|
12
|
+
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
13
|
+
const messages = Messages.loadMessages('@salesforce/plugin-templates', 'digitalExperienceSite');
|
|
14
|
+
export default class GenerateSite extends SfCommand {
|
|
15
|
+
static state = 'preview';
|
|
16
|
+
static summary = messages.getMessage('summary');
|
|
17
|
+
static description = messages.getMessage('description');
|
|
18
|
+
static examples = messages.getMessages('examples');
|
|
19
|
+
static flags = {
|
|
20
|
+
'target-org': Flags.optionalOrg(),
|
|
21
|
+
name: Flags.string({
|
|
22
|
+
char: 'n',
|
|
23
|
+
summary: messages.getMessage('flags.name.summary'),
|
|
24
|
+
required: true,
|
|
25
|
+
}),
|
|
26
|
+
template: Flags.string({
|
|
27
|
+
char: 't',
|
|
28
|
+
summary: messages.getMessage('flags.template.summary'),
|
|
29
|
+
options: ['BuildYourOwnLWR'],
|
|
30
|
+
required: true,
|
|
31
|
+
}),
|
|
32
|
+
'url-path-prefix': Flags.string({
|
|
33
|
+
char: 'p',
|
|
34
|
+
summary: messages.getMessage('flags.url-path-prefix.summary'),
|
|
35
|
+
// each site must have a unique url path prefix, if not provided assume it's empty
|
|
36
|
+
// to mimic UI's behavior
|
|
37
|
+
default: '',
|
|
38
|
+
}),
|
|
39
|
+
'admin-email': Flags.string({
|
|
40
|
+
char: 'e',
|
|
41
|
+
summary: messages.getMessage('flags.admin-email.summary'),
|
|
42
|
+
}),
|
|
43
|
+
'output-dir': Flags.directory({
|
|
44
|
+
char: 'd',
|
|
45
|
+
summary: messages.getMessage('flags.output-dir.summary'),
|
|
46
|
+
description: messages.getMessage('flags.output-dir.description'),
|
|
47
|
+
}),
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Resolves the default output directory by reading the project's sfdx-project.json.
|
|
51
|
+
* Returns the path to the default package directory,
|
|
52
|
+
* or falls back to the current directory if not in a project context.
|
|
53
|
+
*/
|
|
54
|
+
static async getDefaultOutputDir() {
|
|
55
|
+
try {
|
|
56
|
+
const project = await SfProject.resolve();
|
|
57
|
+
const defaultPackage = project.getDefaultPackage();
|
|
58
|
+
return path.join(defaultPackage.path, 'main', 'default');
|
|
59
|
+
}
|
|
60
|
+
catch {
|
|
61
|
+
return '.';
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async run() {
|
|
65
|
+
const { flags } = await this.parse(GenerateSite);
|
|
66
|
+
let adminEmail = flags['admin-email'];
|
|
67
|
+
if (!adminEmail) {
|
|
68
|
+
const org = flags['target-org'];
|
|
69
|
+
// If this ever fails to return a username, the default value will be appeneded ".invalid"
|
|
70
|
+
// in admin workspace with a note asking the admin to set a valid email and verify it.
|
|
71
|
+
adminEmail = org?.getConnection()?.getUsername() ?? 'senderEmail@example.com';
|
|
72
|
+
}
|
|
73
|
+
const outputDir = flags['output-dir'] ?? (await GenerateSite.getDefaultOutputDir());
|
|
74
|
+
const flagsAsOptions = {
|
|
75
|
+
sitename: flags.name,
|
|
76
|
+
urlpathprefix: flags['url-path-prefix'],
|
|
77
|
+
adminemail: adminEmail,
|
|
78
|
+
template: flags.template,
|
|
79
|
+
outputdir: outputDir,
|
|
80
|
+
};
|
|
81
|
+
return runGenerator({
|
|
82
|
+
templateType: TemplateType.DigitalExperienceSite,
|
|
83
|
+
opts: flagsAsOptions,
|
|
84
|
+
ux: new Ux({ jsonEnabled: this.jsonEnabled() }),
|
|
85
|
+
templates: getCustomTemplates(this.configAggregator),
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
//# sourceMappingURL=site.js.map
|
|
@@ -0,0 +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,W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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"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# summary
|
|
2
|
+
|
|
3
|
+
Generate an Experience Cloud site.
|
|
4
|
+
|
|
5
|
+
# description
|
|
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.
|
|
8
|
+
|
|
9
|
+
# examples
|
|
10
|
+
|
|
11
|
+
- Generate an Experience Cloud site using the BuildYourOwnLWR template. The site is called "mysite" and has the URL path prefix "mysite":
|
|
12
|
+
|
|
13
|
+
<%= config.bin %> <%= command.id %> --template BuildYourOwnLWR --name mysite --url-path-prefix mysite
|
|
14
|
+
|
|
15
|
+
- Generate an Experience Cloud site like the last example, but generate the files into the specified output directory:
|
|
16
|
+
|
|
17
|
+
<%= config.bin %> <%= command.id %> --template BuildYourOwnLWR --name mysite --url-path-prefix mysite --output-dir force-app/main/default
|
|
18
|
+
|
|
19
|
+
# flags.name.summary
|
|
20
|
+
|
|
21
|
+
Name of the Experience Cloud site to generate.
|
|
22
|
+
|
|
23
|
+
# flags.template.summary
|
|
24
|
+
|
|
25
|
+
Template to use when generating the site.
|
|
26
|
+
|
|
27
|
+
# flags.template.description
|
|
28
|
+
|
|
29
|
+
Supported templates:
|
|
30
|
+
|
|
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
|
+
|
|
33
|
+
# flags.url-path-prefix.summary
|
|
34
|
+
|
|
35
|
+
URL path prefix for the site; must contain only alphanumeric characters.
|
|
36
|
+
|
|
37
|
+
# flags.admin-email.summary
|
|
38
|
+
|
|
39
|
+
Email address for the site administrator. Defaults to the username of the currently authenticated user.
|
|
40
|
+
|
|
41
|
+
# flags.output-dir.summary
|
|
42
|
+
|
|
43
|
+
Directory to generate the site files in.
|
|
44
|
+
|
|
45
|
+
# flags.output-dir.description
|
|
46
|
+
|
|
47
|
+
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.
|
package/oclif.manifest.json
CHANGED
|
@@ -1580,6 +1580,134 @@
|
|
|
1580
1580
|
"page:generate:visualforce"
|
|
1581
1581
|
]
|
|
1582
1582
|
},
|
|
1583
|
+
"template:generate:digital-experience:site": {
|
|
1584
|
+
"aliases": [],
|
|
1585
|
+
"args": {},
|
|
1586
|
+
"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.",
|
|
1587
|
+
"examples": [
|
|
1588
|
+
"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",
|
|
1589
|
+
"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"
|
|
1590
|
+
],
|
|
1591
|
+
"flags": {
|
|
1592
|
+
"json": {
|
|
1593
|
+
"description": "Format output as json.",
|
|
1594
|
+
"helpGroup": "GLOBAL",
|
|
1595
|
+
"name": "json",
|
|
1596
|
+
"allowNo": false,
|
|
1597
|
+
"type": "boolean"
|
|
1598
|
+
},
|
|
1599
|
+
"flags-dir": {
|
|
1600
|
+
"helpGroup": "GLOBAL",
|
|
1601
|
+
"name": "flags-dir",
|
|
1602
|
+
"summary": "Import flag values from a directory.",
|
|
1603
|
+
"hasDynamicHelp": false,
|
|
1604
|
+
"multiple": false,
|
|
1605
|
+
"type": "option"
|
|
1606
|
+
},
|
|
1607
|
+
"target-org": {
|
|
1608
|
+
"char": "o",
|
|
1609
|
+
"name": "target-org",
|
|
1610
|
+
"noCacheDefault": true,
|
|
1611
|
+
"summary": "Username or alias of the target org.",
|
|
1612
|
+
"hasDynamicHelp": true,
|
|
1613
|
+
"multiple": false,
|
|
1614
|
+
"type": "option"
|
|
1615
|
+
},
|
|
1616
|
+
"name": {
|
|
1617
|
+
"char": "n",
|
|
1618
|
+
"name": "name",
|
|
1619
|
+
"required": true,
|
|
1620
|
+
"summary": "Name of the Experience Cloud site to generate.",
|
|
1621
|
+
"hasDynamicHelp": false,
|
|
1622
|
+
"multiple": false,
|
|
1623
|
+
"type": "option"
|
|
1624
|
+
},
|
|
1625
|
+
"template": {
|
|
1626
|
+
"char": "t",
|
|
1627
|
+
"name": "template",
|
|
1628
|
+
"required": true,
|
|
1629
|
+
"summary": "Template to use when generating the site.",
|
|
1630
|
+
"hasDynamicHelp": false,
|
|
1631
|
+
"multiple": false,
|
|
1632
|
+
"options": [
|
|
1633
|
+
"BuildYourOwnLWR"
|
|
1634
|
+
],
|
|
1635
|
+
"type": "option"
|
|
1636
|
+
},
|
|
1637
|
+
"url-path-prefix": {
|
|
1638
|
+
"char": "p",
|
|
1639
|
+
"name": "url-path-prefix",
|
|
1640
|
+
"summary": "URL path prefix for the site; must contain only alphanumeric characters.",
|
|
1641
|
+
"default": "",
|
|
1642
|
+
"hasDynamicHelp": false,
|
|
1643
|
+
"multiple": false,
|
|
1644
|
+
"type": "option"
|
|
1645
|
+
},
|
|
1646
|
+
"admin-email": {
|
|
1647
|
+
"char": "e",
|
|
1648
|
+
"name": "admin-email",
|
|
1649
|
+
"summary": "Email address for the site administrator. Defaults to the username of the currently authenticated user.",
|
|
1650
|
+
"hasDynamicHelp": false,
|
|
1651
|
+
"multiple": false,
|
|
1652
|
+
"type": "option"
|
|
1653
|
+
},
|
|
1654
|
+
"output-dir": {
|
|
1655
|
+
"char": "d",
|
|
1656
|
+
"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.",
|
|
1657
|
+
"name": "output-dir",
|
|
1658
|
+
"summary": "Directory to generate the site files in.",
|
|
1659
|
+
"hasDynamicHelp": false,
|
|
1660
|
+
"multiple": false,
|
|
1661
|
+
"type": "option"
|
|
1662
|
+
}
|
|
1663
|
+
},
|
|
1664
|
+
"hasDynamicHelp": true,
|
|
1665
|
+
"hiddenAliases": [],
|
|
1666
|
+
"id": "template:generate:digital-experience:site",
|
|
1667
|
+
"pluginAlias": "@salesforce/plugin-templates",
|
|
1668
|
+
"pluginName": "@salesforce/plugin-templates",
|
|
1669
|
+
"pluginType": "core",
|
|
1670
|
+
"state": "preview",
|
|
1671
|
+
"strict": true,
|
|
1672
|
+
"summary": "Generate an Experience Cloud site.",
|
|
1673
|
+
"enableJsonFlag": true,
|
|
1674
|
+
"isESM": true,
|
|
1675
|
+
"relativePath": [
|
|
1676
|
+
"lib",
|
|
1677
|
+
"commands",
|
|
1678
|
+
"template",
|
|
1679
|
+
"generate",
|
|
1680
|
+
"digital-experience",
|
|
1681
|
+
"site.js"
|
|
1682
|
+
],
|
|
1683
|
+
"aliasPermutations": [],
|
|
1684
|
+
"permutations": [
|
|
1685
|
+
"template:generate:digital-experience:site",
|
|
1686
|
+
"generate:template:digital-experience:site",
|
|
1687
|
+
"generate:digital-experience:template:site",
|
|
1688
|
+
"generate:digital-experience:site:template",
|
|
1689
|
+
"template:digital-experience:generate:site",
|
|
1690
|
+
"digital-experience:template:generate:site",
|
|
1691
|
+
"digital-experience:generate:template:site",
|
|
1692
|
+
"digital-experience:generate:site:template",
|
|
1693
|
+
"template:digital-experience:site:generate",
|
|
1694
|
+
"digital-experience:template:site:generate",
|
|
1695
|
+
"digital-experience:site:template:generate",
|
|
1696
|
+
"digital-experience:site:generate:template",
|
|
1697
|
+
"template:generate:site:digital-experience",
|
|
1698
|
+
"generate:template:site:digital-experience",
|
|
1699
|
+
"generate:site:template:digital-experience",
|
|
1700
|
+
"generate:site:digital-experience:template",
|
|
1701
|
+
"template:site:generate:digital-experience",
|
|
1702
|
+
"site:template:generate:digital-experience",
|
|
1703
|
+
"site:generate:template:digital-experience",
|
|
1704
|
+
"site:generate:digital-experience:template",
|
|
1705
|
+
"template:site:digital-experience:generate",
|
|
1706
|
+
"site:template:digital-experience:generate",
|
|
1707
|
+
"site:digital-experience:template:generate",
|
|
1708
|
+
"site:digital-experience:generate:template"
|
|
1709
|
+
]
|
|
1710
|
+
},
|
|
1583
1711
|
"template:generate:apex:class": {
|
|
1584
1712
|
"aliases": [
|
|
1585
1713
|
"force:apex:class:create",
|
|
@@ -1956,5 +2084,5 @@
|
|
|
1956
2084
|
]
|
|
1957
2085
|
}
|
|
1958
2086
|
},
|
|
1959
|
-
"version": "56.
|
|
2087
|
+
"version": "56.6.0"
|
|
1960
2088
|
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-templates",
|
|
3
3
|
"description": "Commands to create metadata from a default or custom template",
|
|
4
|
-
"version": "56.
|
|
4
|
+
"version": "56.6.0",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bugs": "https://github.com/salesforcecli/plugin-templates/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@salesforce/core": "^8.25.
|
|
8
|
+
"@salesforce/core": "^8.25.1",
|
|
9
9
|
"@salesforce/sf-plugins-core": "^12",
|
|
10
|
-
"@salesforce/templates": "^65.5.
|
|
10
|
+
"@salesforce/templates": "^65.5.3"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@oclif/plugin-command-snapshot": "^5.3.8",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"@salesforce/plugin-command-reference": "^3.1.79",
|
|
17
17
|
"@types/yeoman-assert": "^3.1.4",
|
|
18
18
|
"eslint-plugin-sf-plugin": "^1.20.33",
|
|
19
|
-
"oclif": "^4.22.
|
|
19
|
+
"oclif": "^4.22.73",
|
|
20
20
|
"ts-node": "^10.9.2",
|
|
21
21
|
"typescript": "^5.9.3",
|
|
22
22
|
"yeoman-assert": "^3.1.1"
|
|
@@ -92,6 +92,9 @@
|
|
|
92
92
|
"subtopics": {
|
|
93
93
|
"apex": {
|
|
94
94
|
"description": "Create an apex class or trigger."
|
|
95
|
+
},
|
|
96
|
+
"digital-experience": {
|
|
97
|
+
"description": "Create a Digital Experience site."
|
|
95
98
|
}
|
|
96
99
|
}
|
|
97
100
|
}
|
|
@@ -255,7 +258,7 @@
|
|
|
255
258
|
"exports": "./lib/index.js",
|
|
256
259
|
"type": "module",
|
|
257
260
|
"sfdx": {
|
|
258
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.
|
|
259
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.
|
|
261
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.6.0.crt",
|
|
262
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/56.6.0.sig"
|
|
260
263
|
}
|
|
261
264
|
}
|