@salesforce/plugin-templates 57.6.0 → 57.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.
- package/README.md +67 -51
- package/lib/commands/template/generate/lightning-out/index.d.ts +15 -1
- package/lib/commands/template/generate/lightning-out/index.js +131 -30
- package/lib/commands/template/generate/lightning-out/index.js.map +1 -1
- package/messages/lightningOut.md +76 -8
- package/oclif.manifest.json +27 -5
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -7,15 +7,15 @@ This repository provides a series of commands, templates, and generators for var
|
|
|
7
7
|
|
|
8
8
|
# Getting Started
|
|
9
9
|
|
|
10
|
-
To use, install the [Salesforce CLI](https://developer.salesforce.com/tools/
|
|
10
|
+
To use, install the [Salesforce CLI](https://developer.salesforce.com/tools/salesforcecli) and run the following commands.
|
|
11
11
|
|
|
12
12
|
```
|
|
13
13
|
Verify the CLI is installed
|
|
14
|
-
$
|
|
14
|
+
$ sf (-v | --version)
|
|
15
15
|
Install the @salesforce/plugin-templates plugin
|
|
16
|
-
$
|
|
16
|
+
$ sf plugins install @salesforce/plugin-templates
|
|
17
17
|
To run a command
|
|
18
|
-
$
|
|
18
|
+
$ sf [command]
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
## Install
|
|
@@ -29,8 +29,7 @@ git clone git@github.com:salesforcecli/plugin-templates.git
|
|
|
29
29
|
2. Ensure you have [Yarn](https://yarnpkg.com/) installed and run the following to build:
|
|
30
30
|
|
|
31
31
|
```
|
|
32
|
-
yarn
|
|
33
|
-
yarn build
|
|
32
|
+
yarn && yarn build
|
|
34
33
|
```
|
|
35
34
|
|
|
36
35
|
## Issues
|
|
@@ -39,18 +38,7 @@ Please report any issues to https://github.com/salesforcecli/plugin-templates/is
|
|
|
39
38
|
|
|
40
39
|
## Contributing
|
|
41
40
|
|
|
42
|
-
|
|
43
|
-
- If you're adding a new template generator, see the [Development Guide](./DEVELOPMENT.md) for detailed instructions.
|
|
44
|
-
1. Create a new issue before starting your project so that we can keep track of
|
|
45
|
-
what you're trying to add/fix. That way, we can also offer suggestions or
|
|
46
|
-
let you know if there is already an effort in progress.
|
|
47
|
-
1. Fork this repository.
|
|
48
|
-
1. The [build](#build) section has details on how to set up your environment.
|
|
49
|
-
1. Create a _topic_ branch in your fork based on the correct branch (usually the **main** branch). Note: this step is recommended but technically not required if contributing using a fork.
|
|
50
|
-
1. Edit the code in your fork.
|
|
51
|
-
1. Sign CLA (see [CLA](#cla)).
|
|
52
|
-
1. Send us a pull request when you're done. We'll review your code, suggest any
|
|
53
|
-
needed changes, and merge it in.
|
|
41
|
+
If you're interested in contributing, take a look at the [CONTRIBUTING](CONTRIBUTING.md) guide.
|
|
54
42
|
|
|
55
43
|
## Pull Requests
|
|
56
44
|
|
|
@@ -69,22 +57,22 @@ Agreement. You can do so by going to https://cla.salesforce.com/sign-cla.
|
|
|
69
57
|
|
|
70
58
|
## Developing Plugin
|
|
71
59
|
|
|
72
|
-
To test plugin locally, use `bin/dev` in place of `
|
|
60
|
+
To test plugin locally, use `bin/dev.js` in place of `sf`. For example:
|
|
73
61
|
|
|
74
62
|
```sh
|
|
75
|
-
./bin/dev force:apex:class:create --classname 'TestClass' --template 'DefaultApexClass' --outputdir ./testsoutput/myApex/
|
|
63
|
+
./bin/dev.js force:apex:class:create --classname 'TestClass' --template 'DefaultApexClass' --outputdir ./testsoutput/myApex/
|
|
76
64
|
```
|
|
77
65
|
|
|
78
66
|
Link your plugin to Salesforce CLI:
|
|
79
67
|
|
|
80
68
|
```sh
|
|
81
|
-
|
|
69
|
+
sf plugins link .
|
|
82
70
|
```
|
|
83
71
|
|
|
84
72
|
Verify plugin is linked:
|
|
85
73
|
|
|
86
74
|
```sh
|
|
87
|
-
|
|
75
|
+
sf plugins
|
|
88
76
|
```
|
|
89
77
|
|
|
90
78
|
To test plugin locally with Salesforce CLI, add `"@salesforce/plugin-templates": "file://path/to/plugin-templates"` to the plugin's `package.json`.
|
|
@@ -98,13 +86,13 @@ To debug the `hello:org` command:
|
|
|
98
86
|
1. If you linked your plugin to the Salesforce CLI, call your command with the `dev-suspend` switch:
|
|
99
87
|
|
|
100
88
|
```sh-session
|
|
101
|
-
$
|
|
89
|
+
$ sf hello:org -u myOrg@example.com --dev-suspend
|
|
102
90
|
```
|
|
103
91
|
|
|
104
92
|
Alternatively, to call your command using the `bin/dev` script, set the `NODE_OPTIONS` environment variable to `--inspect-brk` when starting the debugger:
|
|
105
93
|
|
|
106
94
|
```sh-session
|
|
107
|
-
$ NODE_OPTIONS=--inspect-brk ./bin/dev force:apex:class:create --classname 'TestClass' --template 'DefaultApexClass' --outputdir ./testsoutput/myApex/
|
|
95
|
+
$ NODE_OPTIONS=--inspect-brk ./bin/dev.js force:apex:class:create --classname 'TestClass' --template 'DefaultApexClass' --outputdir ./testsoutput/myApex/
|
|
108
96
|
```
|
|
109
97
|
|
|
110
98
|
2. Set some breakpoints in your command code.
|
|
@@ -179,7 +167,7 @@ FLAG DESCRIPTIONS
|
|
|
179
167
|
directory.
|
|
180
168
|
```
|
|
181
169
|
|
|
182
|
-
_See code: [src/commands/template/generate/analytics/template.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
170
|
+
_See code: [src/commands/template/generate/analytics/template.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/analytics/template.ts)_
|
|
183
171
|
|
|
184
172
|
## `sf template generate apex class`
|
|
185
173
|
|
|
@@ -241,7 +229,7 @@ FLAG DESCRIPTIONS
|
|
|
241
229
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
242
230
|
```
|
|
243
231
|
|
|
244
|
-
_See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
232
|
+
_See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/apex/class.ts)_
|
|
245
233
|
|
|
246
234
|
## `sf template generate apex trigger`
|
|
247
235
|
|
|
@@ -311,7 +299,7 @@ FLAG DESCRIPTIONS
|
|
|
311
299
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
312
300
|
```
|
|
313
301
|
|
|
314
|
-
_See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
302
|
+
_See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/apex/trigger.ts)_
|
|
315
303
|
|
|
316
304
|
## `sf template generate digital-experience site`
|
|
317
305
|
|
|
@@ -365,7 +353,7 @@ FLAG DESCRIPTIONS
|
|
|
365
353
|
project, defaults to the current directory.
|
|
366
354
|
```
|
|
367
355
|
|
|
368
|
-
_See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
356
|
+
_See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/digital-experience/site.ts)_
|
|
369
357
|
|
|
370
358
|
## `sf template generate flexipage`
|
|
371
359
|
|
|
@@ -447,7 +435,7 @@ FLAG DESCRIPTIONS
|
|
|
447
435
|
'Custom_Object__c'. This sets the `sobjectType` field in the FlexiPage metadata.
|
|
448
436
|
```
|
|
449
437
|
|
|
450
|
-
_See code: [src/commands/template/generate/flexipage/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
438
|
+
_See code: [src/commands/template/generate/flexipage/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/flexipage/index.ts)_
|
|
451
439
|
|
|
452
440
|
## `sf template generate lightning-out`
|
|
453
441
|
|
|
@@ -457,10 +445,13 @@ Generate the required metadata to scaffold a Lightning Out 2.0 app.
|
|
|
457
445
|
USAGE
|
|
458
446
|
$ sf template generate lightning-out [--json] [--flags-dir <value>] [--app-name <value>] [--eca-name <value>] [--runtime
|
|
459
447
|
LWR_CORE|CLWR] [--host-domains <value>...] [--components <value>...] [--eca-contact-email <value>]
|
|
460
|
-
[--eca-callback-url <value>] [--
|
|
448
|
+
[--eca-callback-url <value>] [--site <value>] [--access guest|authenticated] [--definition-file <value>] [-d
|
|
449
|
+
<value>]
|
|
461
450
|
|
|
462
451
|
FLAGS
|
|
463
452
|
-d, --output-dir=<value> [default: .] Directory for saving the created files.
|
|
453
|
+
--access=<option> Type of Experience Cloud site user who accesses a CLWR app.
|
|
454
|
+
<options: guest|authenticated>
|
|
464
455
|
--app-name=<value> Developer name of the new Lightning Out 2.0 app.
|
|
465
456
|
--components=<value>... Name of a Lightning web component exposed by the app. Repeat the flag to specify more
|
|
466
457
|
than one. Replaces, rather than merges with, any components in the --definition-file.
|
|
@@ -469,12 +460,10 @@ FLAGS
|
|
|
469
460
|
--eca-callback-url=<value> OAuth callback URL for the External Client Application.
|
|
470
461
|
--eca-contact-email=<value> Contact email for the External Client Application.
|
|
471
462
|
--eca-name=<value> Developer name of the External Client Application associated with the app.
|
|
472
|
-
--host-domains=<value>... HTTP or HTTPS origin of an external host page that embeds the app.
|
|
473
|
-
specify more than one. Replaces, rather than merges with, any hostDomains in the
|
|
474
|
-
--definition-file. For CLWR apps, host domains are used only for CORS, which
|
|
475
|
-
authenticated users need. Set up framing for the site in Experience Builder.
|
|
463
|
+
--host-domains=<value>... HTTP or HTTPS origin of an external host page that embeds the app.
|
|
476
464
|
--runtime=<option> Runtime that serves the app.
|
|
477
465
|
<options: LWR_CORE|CLWR>
|
|
466
|
+
--site=<value> Name of the Experience Cloud site to link a CLWR app to.
|
|
478
467
|
|
|
479
468
|
GLOBAL FLAGS
|
|
480
469
|
--flags-dir=<value> Import flag values from a directory.
|
|
@@ -488,8 +477,11 @@ DESCRIPTION
|
|
|
488
477
|
This command gets you started by generating the seven metadata artifact types that a Lightning Out 2.0 app requires
|
|
489
478
|
into your Salesforce DX project: LightningOutApp, MyDomain and Security settings, one CorsWhitelistOrigin per host
|
|
490
479
|
domain, and the three External Client Application OAuth components (ExternalClientApplication,
|
|
491
|
-
ExtlClntAppGlobalOauthSettings, ExtlClntAppOauthSettings).
|
|
492
|
-
|
|
480
|
+
ExtlClntAppGlobalOauthSettings, ExtlClntAppOauthSettings). For a CLWR app with --access guest, the command generates
|
|
481
|
+
only the LightningOutApp, because guest users don't log in. The command only generates files. It doesn't deploy any
|
|
482
|
+
metadata to an org. When you deploy the generated LightningOutApp, its components and host domains replace the app's
|
|
483
|
+
existing ones in the org, including any added in Setup. List every component and host domain the app needs, not just
|
|
484
|
+
the new ones.
|
|
493
485
|
|
|
494
486
|
Inputs can come from a --definition-file JSON, individual flags, or both. Flag values take precedence over the file on
|
|
495
487
|
a per-key basis. The command validates the types of definition-file fields; the underlying generator performs the
|
|
@@ -509,9 +501,15 @@ EXAMPLES
|
|
|
509
501
|
|
|
510
502
|
$ sf template generate lightning-out --definition-file lo-def.json --output-dir force-app/main/default
|
|
511
503
|
|
|
512
|
-
Generate a CLWR app for
|
|
504
|
+
Generate a CLWR app for authenticated users (the default) of the Experience Cloud site named "My Site", using a
|
|
505
|
+
definition file for the other values:
|
|
506
|
+
|
|
507
|
+
$ sf template generate lightning-out --runtime CLWR --site "My Site" --definition-file lo-def.json
|
|
508
|
+
|
|
509
|
+
Generate a CLWR app for guest users of the Experience Cloud site named "My Site":
|
|
513
510
|
|
|
514
|
-
$ sf template generate lightning-out --runtime CLWR --
|
|
511
|
+
$ sf template generate lightning-out --app-name MyLoApp --runtime CLWR --access guest --site "My Site" \
|
|
512
|
+
--components c/myHeader
|
|
515
513
|
|
|
516
514
|
Generate the app using most of the values from a definition file, but the --host-domains value overrides its
|
|
517
515
|
equivalent in the file:
|
|
@@ -524,13 +522,31 @@ FLAG DESCRIPTIONS
|
|
|
524
522
|
The location can be an absolute path or relative to the current working directory. The default is the current
|
|
525
523
|
directory.
|
|
526
524
|
|
|
525
|
+
--access=guest|authenticated Type of Experience Cloud site user who accesses a CLWR app.
|
|
526
|
+
|
|
527
|
+
Valid values are "authenticated" (default) and "guest". With "authenticated", the command generates the app plus the
|
|
528
|
+
External Client Application, CORS, and MyDomain and Security settings that site users need to log in. With "guest",
|
|
529
|
+
the command generates only the app, because guest users don't log in. Used only with --runtime CLWR.
|
|
530
|
+
|
|
531
|
+
--host-domains=<value>... HTTP or HTTPS origin of an external host page that embeds the app.
|
|
532
|
+
|
|
533
|
+
Repeat the flag to specify more than one. Replaces, rather than merges with, any hostDomains in the
|
|
534
|
+
--definition-file. Not used for CLWR with --access guest.
|
|
535
|
+
|
|
527
536
|
--runtime=LWR_CORE|CLWR Runtime that serves the app.
|
|
528
537
|
|
|
529
538
|
LWR_CORE serves the app from your Salesforce org to authenticated users. CLWR serves it from an Experience Cloud
|
|
530
|
-
site to guest and authenticated users.
|
|
539
|
+
site to guest and authenticated users. For CLWR, specify the site with --site and the type of user with --access.
|
|
540
|
+
|
|
541
|
+
--site=<value> Name of the Experience Cloud site to link a CLWR app to.
|
|
542
|
+
|
|
543
|
+
Use the site name shown on the All Sites page in Setup, not its URL path prefix. The site must be active and use the
|
|
544
|
+
Lightning Out (LWR) or Build Your Own (LWR) template. Used only with --runtime CLWR. To deploy an app that's linked
|
|
545
|
+
to a site, use API version 69.0 or later. This flag is required for CLWR unless the project's sourceApiVersion is
|
|
546
|
+
below 69.0, because deploying a CLWR app without a site at 69.0 or later removes the app's existing site link.
|
|
531
547
|
```
|
|
532
548
|
|
|
533
|
-
_See code: [src/commands/template/generate/lightning-out/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
549
|
+
_See code: [src/commands/template/generate/lightning-out/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/lightning-out/index.ts)_
|
|
534
550
|
|
|
535
551
|
## `sf template generate lightning app`
|
|
536
552
|
|
|
@@ -588,7 +604,7 @@ FLAG DESCRIPTIONS
|
|
|
588
604
|
field in the DX project's "sfdx-project.json" file.
|
|
589
605
|
```
|
|
590
606
|
|
|
591
|
-
_See code: [src/commands/template/generate/lightning/app.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
607
|
+
_See code: [src/commands/template/generate/lightning/app.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/lightning/app.ts)_
|
|
592
608
|
|
|
593
609
|
## `sf template generate lightning component`
|
|
594
610
|
|
|
@@ -665,7 +681,7 @@ FLAG DESCRIPTIONS
|
|
|
665
681
|
field in the DX project's "sfdx-project.json" file.
|
|
666
682
|
```
|
|
667
683
|
|
|
668
|
-
_See code: [src/commands/template/generate/lightning/component.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
684
|
+
_See code: [src/commands/template/generate/lightning/component.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/lightning/component.ts)_
|
|
669
685
|
|
|
670
686
|
## `sf template generate lightning event`
|
|
671
687
|
|
|
@@ -723,7 +739,7 @@ FLAG DESCRIPTIONS
|
|
|
723
739
|
field in the DX project's "sfdx-project.json" file.
|
|
724
740
|
```
|
|
725
741
|
|
|
726
|
-
_See code: [src/commands/template/generate/lightning/event.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
742
|
+
_See code: [src/commands/template/generate/lightning/event.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/lightning/event.ts)_
|
|
727
743
|
|
|
728
744
|
## `sf template generate lightning interface`
|
|
729
745
|
|
|
@@ -781,7 +797,7 @@ FLAG DESCRIPTIONS
|
|
|
781
797
|
field in the DX project's "sfdx-project.json" file.
|
|
782
798
|
```
|
|
783
799
|
|
|
784
|
-
_See code: [src/commands/template/generate/lightning/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
800
|
+
_See code: [src/commands/template/generate/lightning/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/lightning/interface.ts)_
|
|
785
801
|
|
|
786
802
|
## `sf template generate lightning test`
|
|
787
803
|
|
|
@@ -839,7 +855,7 @@ FLAG DESCRIPTIONS
|
|
|
839
855
|
field in the DX project's "sfdx-project.json" file.
|
|
840
856
|
```
|
|
841
857
|
|
|
842
|
-
_See code: [src/commands/template/generate/lightning/test.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
858
|
+
_See code: [src/commands/template/generate/lightning/test.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/lightning/test.ts)_
|
|
843
859
|
|
|
844
860
|
## `sf template generate project`
|
|
845
861
|
|
|
@@ -973,7 +989,7 @@ FLAG DESCRIPTIONS
|
|
|
973
989
|
server-side type stripping.
|
|
974
990
|
```
|
|
975
991
|
|
|
976
|
-
_See code: [src/commands/template/generate/project/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
992
|
+
_See code: [src/commands/template/generate/project/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/project/index.ts)_
|
|
977
993
|
|
|
978
994
|
## `sf template generate static-resource`
|
|
979
995
|
|
|
@@ -1036,7 +1052,7 @@ FLAG DESCRIPTIONS
|
|
|
1036
1052
|
etc.
|
|
1037
1053
|
```
|
|
1038
1054
|
|
|
1039
|
-
_See code: [src/commands/template/generate/static-resource/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
1055
|
+
_See code: [src/commands/template/generate/static-resource/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/static-resource/index.ts)_
|
|
1040
1056
|
|
|
1041
1057
|
## `sf template generate ui-bundle`
|
|
1042
1058
|
|
|
@@ -1131,7 +1147,7 @@ FLAG DESCRIPTIONS
|
|
|
1131
1147
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
1132
1148
|
```
|
|
1133
1149
|
|
|
1134
|
-
_See code: [src/commands/template/generate/ui-bundle/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
1150
|
+
_See code: [src/commands/template/generate/ui-bundle/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/ui-bundle/index.ts)_
|
|
1135
1151
|
|
|
1136
1152
|
## `sf template generate ui-embedding`
|
|
1137
1153
|
|
|
@@ -1210,7 +1226,7 @@ FLAG DESCRIPTIONS
|
|
|
1210
1226
|
(announced by screen readers).
|
|
1211
1227
|
```
|
|
1212
1228
|
|
|
1213
|
-
_See code: [src/commands/template/generate/ui-embedding/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
1229
|
+
_See code: [src/commands/template/generate/ui-embedding/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/ui-embedding/index.ts)_
|
|
1214
1230
|
|
|
1215
1231
|
## `sf template generate visualforce component`
|
|
1216
1232
|
|
|
@@ -1267,7 +1283,7 @@ FLAG DESCRIPTIONS
|
|
|
1267
1283
|
Supplied parameter values or default values are filled into a copy of the template.
|
|
1268
1284
|
```
|
|
1269
1285
|
|
|
1270
|
-
_See code: [src/commands/template/generate/visualforce/component.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
1286
|
+
_See code: [src/commands/template/generate/visualforce/component.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/visualforce/component.ts)_
|
|
1271
1287
|
|
|
1272
1288
|
## `sf template generate visualforce page`
|
|
1273
1289
|
|
|
@@ -1318,6 +1334,6 @@ FLAG DESCRIPTIONS
|
|
|
1318
1334
|
The name can be up to 40 characters and must start with a letter.
|
|
1319
1335
|
```
|
|
1320
1336
|
|
|
1321
|
-
_See code: [src/commands/template/generate/visualforce/page.ts](https://github.com/salesforcecli/plugin-templates/blob/57.
|
|
1337
|
+
_See code: [src/commands/template/generate/visualforce/page.ts](https://github.com/salesforcecli/plugin-templates/blob/57.7.0/src/commands/template/generate/visualforce/page.ts)_
|
|
1322
1338
|
|
|
1323
1339
|
<!-- commandsstop -->
|
|
@@ -9,6 +9,8 @@ type LightningOutFlags = {
|
|
|
9
9
|
components?: string[];
|
|
10
10
|
'eca-contact-email'?: string;
|
|
11
11
|
'eca-callback-url'?: string;
|
|
12
|
+
site?: string;
|
|
13
|
+
access?: 'guest' | 'authenticated';
|
|
12
14
|
'output-dir'?: string;
|
|
13
15
|
};
|
|
14
16
|
/** Parse the --definition-file JSON, surfacing a clear error on malformed or non-object input. */
|
|
@@ -18,6 +20,7 @@ export declare function readDefinition(file: string): Record<string, unknown>;
|
|
|
18
20
|
* JSON (e.g. `"appName": 123`) yields an actionable error here rather than an internal TypeError
|
|
19
21
|
* from the generator (which calls `.trim()` on string fields). A field is skipped when the matching
|
|
20
22
|
* flag overrides it, since flags always arrive as strings and win per-key (see mergeLightningOutInputs).
|
|
23
|
+
* An explicit JSON null for `site`/`access` counts as absent, matching the generator.
|
|
21
24
|
*/
|
|
22
25
|
export declare function validateDefinitionShape(defn: Record<string, unknown>, flags: LightningOutFlags): void;
|
|
23
26
|
/**
|
|
@@ -30,8 +33,13 @@ export declare function mergeLightningOutInputs(defn: Record<string, unknown>, f
|
|
|
30
33
|
opts: LightningOutOptions;
|
|
31
34
|
unknownKeys: string[];
|
|
32
35
|
};
|
|
33
|
-
/** True when a project sourceApiVersion is
|
|
36
|
+
/** True when a project sourceApiVersion is known and below the v68.0 deploy floor. Pure; testable. */
|
|
34
37
|
export declare function isBelowApiFloor(projApi: string | undefined): boolean;
|
|
38
|
+
/**
|
|
39
|
+
* True when a project sourceApiVersion is known and below 69.0, where <sites> isn't deployable.
|
|
40
|
+
* An unknown or unparsable version is not "below", so CLWR without a site fails closed. Pure; testable.
|
|
41
|
+
*/
|
|
42
|
+
export declare function isBelowSitesApi(projApi: string | undefined): boolean;
|
|
35
43
|
/**
|
|
36
44
|
* Quote a path for safe copy-paste into a POSIX shell when it contains whitespace or quote chars,
|
|
37
45
|
* so the suggested deploy command survives output dirs such as "/tmp/Lightning Out".
|
|
@@ -49,10 +57,16 @@ export default class LightningOut extends SfCommand<CreateOutput> {
|
|
|
49
57
|
components: import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
50
58
|
'eca-contact-email': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
51
59
|
'eca-callback-url': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
60
|
+
site: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
61
|
+
access: import("@oclif/core/interfaces").OptionFlag<"guest" | "authenticated" | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
52
62
|
'definition-file': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
53
63
|
'output-dir': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
|
|
54
64
|
loglevel: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
|
|
55
65
|
};
|
|
56
66
|
run(): Promise<CreateOutput>;
|
|
67
|
+
/** Post-generate warnings (`this.warn`, so they also appear in the --json `warnings` array). */
|
|
68
|
+
private warnAfterGenerate;
|
|
69
|
+
/** Success guidance (log/info are suppressed automatically under --json). */
|
|
70
|
+
private printGuidance;
|
|
57
71
|
}
|
|
58
72
|
export {};
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
import * as fs from 'node:fs';
|
|
17
|
+
import * as path from 'node:path';
|
|
17
18
|
import { Flags, loglevel, SfCommand, Ux } from '@salesforce/sf-plugins-core';
|
|
18
19
|
import { TemplateType } from '@salesforce/templates';
|
|
19
20
|
import { Messages, SfProject } from '@salesforce/core';
|
|
@@ -21,6 +22,11 @@ import { getCustomTemplates, runGenerator } from '../../../../utils/templateComm
|
|
|
21
22
|
import { outputDirFlagLightning } from '../../../../utils/flags.js';
|
|
22
23
|
Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
|
|
23
24
|
const messages = Messages.loadMessages('@salesforce/plugin-templates', 'lightningOut');
|
|
25
|
+
const KNOWN_KEYS = ['appName', 'runtime', 'hostDomains', 'components', 'eca', 'site', 'access'];
|
|
26
|
+
/** The v68.0 deploy floor for LightningOutApp. */
|
|
27
|
+
const API_FLOOR = 68;
|
|
28
|
+
/** First API version whose LightningOutApp accepts <sites>; at/after it, omitting <sites> can unlink. */
|
|
29
|
+
const SITES_API_VERSION = 69;
|
|
24
30
|
/** Parse the --definition-file JSON, surfacing a clear error on malformed or non-object input. */
|
|
25
31
|
export function readDefinition(file) {
|
|
26
32
|
let parsed;
|
|
@@ -44,6 +50,7 @@ function isStringArray(v) {
|
|
|
44
50
|
* JSON (e.g. `"appName": 123`) yields an actionable error here rather than an internal TypeError
|
|
45
51
|
* from the generator (which calls `.trim()` on string fields). A field is skipped when the matching
|
|
46
52
|
* flag overrides it, since flags always arrive as strings and win per-key (see mergeLightningOutInputs).
|
|
53
|
+
* An explicit JSON null for `site`/`access` counts as absent, matching the generator.
|
|
47
54
|
*/
|
|
48
55
|
export function validateDefinitionShape(defn, flags) {
|
|
49
56
|
const requireString = (overridden, val, key) => {
|
|
@@ -60,6 +67,8 @@ export function validateDefinitionShape(defn, flags) {
|
|
|
60
67
|
requireString(flags.runtime !== undefined, defn.runtime, 'runtime');
|
|
61
68
|
requireStringArray(flags['host-domains'] !== undefined, defn.hostDomains, 'hostDomains');
|
|
62
69
|
requireStringArray(flags.components !== undefined, defn.components, 'components');
|
|
70
|
+
requireString(flags.site !== undefined, defn.site ?? undefined, 'site');
|
|
71
|
+
requireString(flags.access !== undefined, defn.access ?? undefined, 'access');
|
|
63
72
|
if (defn.eca !== undefined) {
|
|
64
73
|
if (typeof defn.eca !== 'object' || defn.eca === null || Array.isArray(defn.eca)) {
|
|
65
74
|
throw messages.createError('error.definition-file-field-type', ['eca', 'an object']);
|
|
@@ -77,7 +86,7 @@ export function validateDefinitionShape(defn, flags) {
|
|
|
77
86
|
* formats) is the generator's job — this function only resolves precedence.
|
|
78
87
|
*/
|
|
79
88
|
export function mergeLightningOutInputs(defn, flags) {
|
|
80
|
-
const known = new Set(
|
|
89
|
+
const known = new Set(KNOWN_KEYS);
|
|
81
90
|
const unknownKeys = Object.keys(defn).filter((k) => !known.has(k));
|
|
82
91
|
const ecaDefn = (defn.eca ?? {});
|
|
83
92
|
const opts = {
|
|
@@ -90,28 +99,65 @@ export function mergeLightningOutInputs(defn, flags) {
|
|
|
90
99
|
contactEmail: flags['eca-contact-email'] ?? ecaDefn.contactEmail,
|
|
91
100
|
callbackUrl: flags['eca-callback-url'] ?? ecaDefn.callbackUrl,
|
|
92
101
|
},
|
|
102
|
+
// An explicit JSON null counts as absent, so the `site === undefined` checks stay sound.
|
|
103
|
+
site: flags.site ?? defn.site ?? undefined,
|
|
104
|
+
access: flags.access ?? defn.access ?? undefined,
|
|
93
105
|
outputdir: flags['output-dir'],
|
|
94
106
|
};
|
|
95
107
|
return { opts, unknownKeys };
|
|
96
108
|
}
|
|
97
109
|
/**
|
|
98
|
-
* Resolve the
|
|
99
|
-
*
|
|
100
|
-
*
|
|
110
|
+
* Resolve the DX project that contains `dir` and its `sourceApiVersion` (the generator itself has no
|
|
111
|
+
* project context). `inProject` is false when `dir` isn't in a DX project, so generating outside a
|
|
112
|
+
* project doesn't error. `api` is undefined when the version is missing or not a string or number.
|
|
101
113
|
*/
|
|
102
|
-
async function
|
|
114
|
+
async function getProjectApi(dir) {
|
|
115
|
+
let project;
|
|
116
|
+
try {
|
|
117
|
+
project = await SfProject.resolve(path.resolve(dir));
|
|
118
|
+
}
|
|
119
|
+
catch (e) {
|
|
120
|
+
return { inProject: false };
|
|
121
|
+
}
|
|
103
122
|
try {
|
|
104
|
-
const project = await SfProject.resolve();
|
|
105
123
|
const projectJson = await project.resolveProjectConfig();
|
|
106
|
-
|
|
124
|
+
// sfdx-project.json isn't schema-validated on read, so a bare number (66) can arrive here.
|
|
125
|
+
const v = projectJson.sourceApiVersion;
|
|
126
|
+
return { inProject: true, api: typeof v === 'string' || typeof v === 'number' ? String(v) : undefined };
|
|
107
127
|
}
|
|
108
128
|
catch (e) {
|
|
109
|
-
return
|
|
129
|
+
return { inProject: true };
|
|
110
130
|
}
|
|
111
131
|
}
|
|
112
|
-
/**
|
|
132
|
+
/**
|
|
133
|
+
* Strictly parse an API version such as "68.0" or "68". Anything else (for example "latest", "0x44",
|
|
134
|
+
* or "1e2") is NaN, so callers treat it as unknown and fail closed.
|
|
135
|
+
*/
|
|
136
|
+
function parseApiVersion(projApi) {
|
|
137
|
+
const v = projApi?.trim() ?? '';
|
|
138
|
+
return /^\d+(\.\d+)?$/.test(v) ? Number(v) : NaN;
|
|
139
|
+
}
|
|
140
|
+
/** True when a project sourceApiVersion is known and below the v68.0 deploy floor. Pure; testable. */
|
|
113
141
|
export function isBelowApiFloor(projApi) {
|
|
114
|
-
return
|
|
142
|
+
return parseApiVersion(projApi) < API_FLOOR;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* True when a project sourceApiVersion is known and below 69.0, where <sites> isn't deployable.
|
|
146
|
+
* An unknown or unparsable version is not "below", so CLWR without a site fails closed. Pure; testable.
|
|
147
|
+
*/
|
|
148
|
+
export function isBelowSitesApi(projApi) {
|
|
149
|
+
return parseApiVersion(projApi) < SITES_API_VERSION;
|
|
150
|
+
}
|
|
151
|
+
/** Last sentence of the site-required error: why the project's version didn't exempt the app. */
|
|
152
|
+
function siteRequiredReason(inProject, projApi) {
|
|
153
|
+
if (!inProject)
|
|
154
|
+
return messages.getMessage('error.clwr-site-required.no-project');
|
|
155
|
+
if (projApi === undefined)
|
|
156
|
+
return messages.getMessage('error.clwr-site-required.no-version');
|
|
157
|
+
if (Number.isNaN(parseApiVersion(projApi))) {
|
|
158
|
+
return messages.getMessage('error.clwr-site-required.invalid-version', [projApi]);
|
|
159
|
+
}
|
|
160
|
+
return messages.getMessage('error.clwr-site-required.version', [projApi]);
|
|
115
161
|
}
|
|
116
162
|
/**
|
|
117
163
|
* Quote a path for safe copy-paste into a POSIX shell when it contains whitespace or quote chars,
|
|
@@ -132,10 +178,23 @@ export default class LightningOut extends SfCommand {
|
|
|
132
178
|
summary: messages.getMessage('flags.runtime.summary'),
|
|
133
179
|
description: messages.getMessage('flags.runtime.description'),
|
|
134
180
|
})(),
|
|
135
|
-
'host-domains': Flags.string({
|
|
181
|
+
'host-domains': Flags.string({
|
|
182
|
+
summary: messages.getMessage('flags.host-domains.summary'),
|
|
183
|
+
description: messages.getMessage('flags.host-domains.description'),
|
|
184
|
+
multiple: true,
|
|
185
|
+
}),
|
|
136
186
|
components: Flags.string({ summary: messages.getMessage('flags.components.summary'), multiple: true }),
|
|
137
187
|
'eca-contact-email': Flags.string({ summary: messages.getMessage('flags.eca-contact-email.summary') }),
|
|
138
188
|
'eca-callback-url': Flags.string({ summary: messages.getMessage('flags.eca-callback-url.summary') }),
|
|
189
|
+
site: Flags.string({
|
|
190
|
+
summary: messages.getMessage('flags.site.summary'),
|
|
191
|
+
description: messages.getMessage('flags.site.description'),
|
|
192
|
+
}),
|
|
193
|
+
access: Flags.option({
|
|
194
|
+
options: ['guest', 'authenticated'],
|
|
195
|
+
summary: messages.getMessage('flags.access.summary'),
|
|
196
|
+
description: messages.getMessage('flags.access.description'),
|
|
197
|
+
})(),
|
|
139
198
|
'definition-file': Flags.file({ exists: true, summary: messages.getMessage('flags.definition-file.summary') }),
|
|
140
199
|
'output-dir': outputDirFlagLightning,
|
|
141
200
|
loglevel,
|
|
@@ -146,37 +205,79 @@ export default class LightningOut extends SfCommand {
|
|
|
146
205
|
validateDefinitionShape(defn, flags);
|
|
147
206
|
const { opts, unknownKeys } = mergeLightningOutInputs(defn, flags);
|
|
148
207
|
unknownKeys.forEach((k) => this.warn(messages.getMessage('warning.unknown-definition-key', [k])));
|
|
208
|
+
const isClwr = opts.runtime === 'CLWR';
|
|
209
|
+
const isGuest = isClwr && opts.access === 'guest';
|
|
210
|
+
const outputDir = opts.outputdir ?? '.';
|
|
211
|
+
// CLI-side sourceApiVersion check, against the project the files are generated into.
|
|
212
|
+
const { inProject, api: projApi } = await getProjectApi(outputDir);
|
|
213
|
+
// A CLWR app file without <sites> can unlink the app's site when deployed at 69.0+, so a site is
|
|
214
|
+
// required unless the project is known to be below 69.0 (where <sites> can't be deployed and
|
|
215
|
+
// Core keeps the link). Checked before generating so no files are written. A blank or empty site
|
|
216
|
+
// is the generator's error, not this one.
|
|
217
|
+
if (isClwr && opts.site === undefined && !isBelowSitesApi(projApi)) {
|
|
218
|
+
throw messages.createError('error.clwr-site-required', [siteRequiredReason(inProject, projApi)]);
|
|
219
|
+
}
|
|
149
220
|
const result = await runGenerator({
|
|
150
221
|
templateType: TemplateType.LightningOut,
|
|
151
222
|
opts,
|
|
152
223
|
ux: new Ux({ jsonEnabled: this.jsonEnabled() }),
|
|
153
224
|
templates: getCustomTemplates(this.configAggregator),
|
|
154
225
|
});
|
|
155
|
-
//
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
226
|
+
// Only a known version below 69.0 is certain to fail; an unknown one may deploy at the org's version.
|
|
227
|
+
const siteWillFail = opts.site !== undefined && isBelowSitesApi(projApi);
|
|
228
|
+
this.warnAfterGenerate(opts, { projApi, isClwr, isGuest, siteWillFail });
|
|
229
|
+
this.printGuidance(opts, { isClwr, isGuest, outputDir, siteWillFail, belowFloor: isBelowApiFloor(projApi) });
|
|
230
|
+
return result; // --json returns the full CreateOutput (created[])
|
|
231
|
+
}
|
|
232
|
+
/** Post-generate warnings (`this.warn`, so they also appear in the --json `warnings` array). */
|
|
233
|
+
warnAfterGenerate(opts, ctx) {
|
|
234
|
+
// Also shown with a site: the site warning's "regenerate without --site" fallback still needs 68.0.
|
|
235
|
+
if (isBelowApiFloor(ctx.projApi)) {
|
|
236
|
+
this.warn(messages.getMessage('warning.source-api-version', [String(ctx.projApi)]));
|
|
160
237
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
//
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
238
|
+
if (ctx.siteWillFail) {
|
|
239
|
+
this.warn(messages.getMessage('warning.site-api-version', [String(ctx.projApi)]));
|
|
240
|
+
}
|
|
241
|
+
// Reaching here with CLWR and no site means the project is below 69.0; a later bump would unlink it.
|
|
242
|
+
if (ctx.isClwr && opts.site === undefined) {
|
|
243
|
+
this.warn(messages.getMessage('warning.clwr-site-later'));
|
|
244
|
+
}
|
|
245
|
+
// Guest writes no settings files, so the org-wide settings notice applies only otherwise.
|
|
246
|
+
if (!ctx.isGuest) {
|
|
247
|
+
this.warn(messages.getMessage('warning.org-settings'));
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
/** Success guidance (log/info are suppressed automatically under --json). */
|
|
251
|
+
printGuidance(opts, ctx) {
|
|
168
252
|
this.info(messages.getMessage('success.components-exist'));
|
|
169
|
-
|
|
170
|
-
//
|
|
171
|
-
if (
|
|
172
|
-
this.
|
|
253
|
+
// A deploy known to fail (below the 68.0 floor, or a site below 69.0) gets no copy-paste command; its
|
|
254
|
+
// warning says how to fix it. --api-version isn't offered: it doesn't change the deployed metadata's version.
|
|
255
|
+
if (!ctx.siteWillFail && !ctx.belowFloor) {
|
|
256
|
+
this.log(messages.getMessage('success.next-step', [ctx.outputDir, shellQuoteArg(ctx.outputDir)]));
|
|
257
|
+
}
|
|
258
|
+
if (ctx.isClwr) {
|
|
259
|
+
if (opts.site) {
|
|
260
|
+
// The deploy itself links the site; the rest of the site setup is done in Experience Builder.
|
|
261
|
+
// Skipped when the version warning says this deploy fails, since the site wouldn't be linked.
|
|
262
|
+
if (!ctx.siteWillFail) {
|
|
263
|
+
const key = ctx.isGuest ? 'success.clwr-site-linked-guest' : 'success.clwr-site-linked-authenticated';
|
|
264
|
+
this.info(messages.getMessage(key, [opts.site.trim()]));
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
// Below 69.0: <sites> can't be deployed, so the site is linked in Setup.
|
|
269
|
+
this.info(messages.getMessage('success.clwr-site'));
|
|
270
|
+
this.info(messages.getMessage(ctx.isGuest ? 'success.clwr-site-guest' : 'success.clwr-site-authenticated'));
|
|
271
|
+
}
|
|
173
272
|
}
|
|
174
273
|
else {
|
|
274
|
+
// CLWR finds the app through the site link; app-id only applies to LWR_CORE.
|
|
175
275
|
this.info(messages.getMessage('success.app-id'));
|
|
176
276
|
}
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
277
|
+
if (!ctx.isGuest) {
|
|
278
|
+
this.info(messages.getMessage('success.dont-delete'));
|
|
279
|
+
this.info(messages.getMessage('success.eca-overwrite', [opts.eca?.name ?? '']));
|
|
280
|
+
}
|
|
180
281
|
}
|
|
181
282
|
}
|
|
182
283
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/commands/template/generate/lightning-out/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AAC7E,OAAO,EAAqC,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACxF,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEpE,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,8BAA8B,EAAE,cAAc,CAAC,CAAC;AAcvF,kGAAkG;AAClG,MAAM,UAAU,cAAc,CAAC,IAAY;IACzC,IAAI,MAAe,CAAC;IACpB,IAAI,CAAC;QACH,MAAM,GAAG,IAAI,CAAC,KAAK,CAA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
15
|
-
- Generate a CLWR app for
|
|
15
|
+
- Generate a CLWR app for authenticated users (the default) of the Experience Cloud site named "My Site", using a definition file for the other values:
|
|
16
16
|
|
|
17
|
-
<%= config.bin %> <%= command.id %> --runtime CLWR --definition-file lo-def.json
|
|
17
|
+
<%= config.bin %> <%= command.id %> --runtime CLWR --site "My Site" --definition-file lo-def.json
|
|
18
|
+
|
|
19
|
+
- Generate a CLWR app for guest users of the Experience Cloud site named "My Site":
|
|
20
|
+
|
|
21
|
+
<%= config.bin %> <%= command.id %> --app-name MyLoApp --runtime CLWR --access guest --site "My Site" --components c/myHeader
|
|
18
22
|
|
|
19
23
|
- Generate the app using most of the values from a definition file, but the --host-domains value overrides its equivalent in the file:
|
|
20
24
|
|
|
@@ -28,7 +32,7 @@ Generate the required metadata to scaffold a Lightning Out 2.0 app.
|
|
|
28
32
|
|
|
29
33
|
Lightning Out 2.0 lets you embed custom Lightning web components (LWCs) into your external, non-Salesforce apps.
|
|
30
34
|
|
|
31
|
-
This command gets you started by generating the seven metadata artifact types that a Lightning Out 2.0 app requires into your Salesforce DX project: LightningOutApp, MyDomain and Security settings, one CorsWhitelistOrigin per host domain, and the three External Client Application OAuth components (ExternalClientApplication, ExtlClntAppGlobalOauthSettings, ExtlClntAppOauthSettings). The command only generates files. It doesn't deploy any metadata to an org.
|
|
35
|
+
This command gets you started by generating the seven metadata artifact types that a Lightning Out 2.0 app requires into your Salesforce DX project: LightningOutApp, MyDomain and Security settings, one CorsWhitelistOrigin per host domain, and the three External Client Application OAuth components (ExternalClientApplication, ExtlClntAppGlobalOauthSettings, ExtlClntAppOauthSettings). For a CLWR app with --access guest, the command generates only the LightningOutApp, because guest users don't log in. The command only generates files. It doesn't deploy any metadata to an org. When you deploy the generated LightningOutApp, its components and host domains replace the app's existing ones in the org, including any added in Setup. List every component and host domain the app needs, not just the new ones.
|
|
32
36
|
|
|
33
37
|
Inputs can come from a --definition-file JSON, individual flags, or both. Flag values take precedence over the file on a per-key basis. The command validates the types of definition-file fields; the underlying generator performs the remaining structural validation, such as required fields and formats.
|
|
34
38
|
|
|
@@ -46,11 +50,15 @@ Runtime that serves the app.
|
|
|
46
50
|
|
|
47
51
|
# flags.runtime.description
|
|
48
52
|
|
|
49
|
-
LWR_CORE serves the app from your Salesforce org to authenticated users. CLWR serves it from an Experience Cloud site to guest and authenticated users.
|
|
53
|
+
LWR_CORE serves the app from your Salesforce org to authenticated users. CLWR serves it from an Experience Cloud site to guest and authenticated users. For CLWR, specify the site with --site and the type of user with --access.
|
|
50
54
|
|
|
51
55
|
# flags.host-domains.summary
|
|
52
56
|
|
|
53
|
-
HTTP or HTTPS origin of an external host page that embeds the app.
|
|
57
|
+
HTTP or HTTPS origin of an external host page that embeds the app.
|
|
58
|
+
|
|
59
|
+
# flags.host-domains.description
|
|
60
|
+
|
|
61
|
+
Repeat the flag to specify more than one. Replaces, rather than merges with, any hostDomains in the --definition-file. Not used for CLWR with --access guest.
|
|
54
62
|
|
|
55
63
|
# flags.components.summary
|
|
56
64
|
|
|
@@ -64,6 +72,22 @@ Contact email for the External Client Application.
|
|
|
64
72
|
|
|
65
73
|
OAuth callback URL for the External Client Application.
|
|
66
74
|
|
|
75
|
+
# flags.site.summary
|
|
76
|
+
|
|
77
|
+
Name of the Experience Cloud site to link a CLWR app to.
|
|
78
|
+
|
|
79
|
+
# flags.site.description
|
|
80
|
+
|
|
81
|
+
Use the site name shown on the All Sites page in Setup, not its URL path prefix. The site must be active and use the Lightning Out (LWR) or Build Your Own (LWR) template. Used only with --runtime CLWR. To deploy an app that's linked to a site, use API version 69.0 or later. This flag is required for CLWR unless the project's sourceApiVersion is below 69.0, because deploying a CLWR app without a site at 69.0 or later removes the app's existing site link.
|
|
82
|
+
|
|
83
|
+
# flags.access.summary
|
|
84
|
+
|
|
85
|
+
Type of Experience Cloud site user who accesses a CLWR app.
|
|
86
|
+
|
|
87
|
+
# flags.access.description
|
|
88
|
+
|
|
89
|
+
Valid values are "authenticated" (default) and "guest". With "authenticated", the command generates the app plus the External Client Application, CORS, and MyDomain and Security settings that site users need to log in. With "guest", the command generates only the app, because guest users don't log in. Used only with --runtime CLWR.
|
|
90
|
+
|
|
67
91
|
# flags.definition-file.summary
|
|
68
92
|
|
|
69
93
|
Path to a JSON file describing the Lightning Out 2.0 app. Individual flags, when supplied, override the corresponding value in this file.
|
|
@@ -84,9 +108,41 @@ Definition file field "%s" must be %s.
|
|
|
84
108
|
|
|
85
109
|
Ignoring unrecognized key "%s" in --definition-file.
|
|
86
110
|
|
|
111
|
+
# error.clwr-site-required
|
|
112
|
+
|
|
113
|
+
Specify the Experience Cloud site for this CLWR app with --site or with "site" in the definition file. Without a site, deploying the app at API version 69.0 or later removes the app's existing site link. %s
|
|
114
|
+
|
|
115
|
+
# error.clwr-site-required.version
|
|
116
|
+
|
|
117
|
+
The project's sourceApiVersion is %s.
|
|
118
|
+
|
|
119
|
+
# error.clwr-site-required.no-version
|
|
120
|
+
|
|
121
|
+
The command can't check the API version because sfdx-project.json doesn't set sourceApiVersion.
|
|
122
|
+
|
|
123
|
+
# error.clwr-site-required.invalid-version
|
|
124
|
+
|
|
125
|
+
The command can't check the API version because the project's sourceApiVersion, "%s", isn't valid.
|
|
126
|
+
|
|
127
|
+
# error.clwr-site-required.no-project
|
|
128
|
+
|
|
129
|
+
The command can't check the API version because the output directory isn't in a Salesforce DX project.
|
|
130
|
+
|
|
131
|
+
# warning.site-api-version
|
|
132
|
+
|
|
133
|
+
To deploy an app that's linked to a site, use sourceApiVersion 69.0 or later. The project's sourceApiVersion is %s, so the deploy fails. Set sourceApiVersion to 69.0 or later in sfdx-project.json, or regenerate the app without --site and link the site in Setup after you deploy.
|
|
134
|
+
|
|
135
|
+
# success.clwr-site-authenticated
|
|
136
|
+
|
|
137
|
+
For authenticated users, on your host page, also set "frontdoor-url" on the <lightning-out-application> tag to the frontdoor_uri that your host app gets for the logged-in user from the site's /services/oauth2/lightningoutsingleaccess endpoint.
|
|
138
|
+
|
|
139
|
+
# warning.clwr-site-later
|
|
140
|
+
|
|
141
|
+
If you later set sourceApiVersion to 69.0 or later, regenerate the app with --site before you redeploy. Otherwise, the deploy removes the app's site link.
|
|
142
|
+
|
|
87
143
|
# warning.source-api-version
|
|
88
144
|
|
|
89
|
-
|
|
145
|
+
The project's sourceApiVersion is %s, which is below 68.0, the minimum API version for deploying a Lightning Out 2.0 app, so the deploy fails. Set sourceApiVersion to 68.0 or later in sfdx-project.json before you deploy. Passing --api-version when you deploy doesn't change the API version of the deployed metadata.
|
|
90
146
|
|
|
91
147
|
# warning.org-settings
|
|
92
148
|
|
|
@@ -94,7 +150,7 @@ Deploying the generated MyDomain and Security settings changes two org-wide sett
|
|
|
94
150
|
|
|
95
151
|
# success.next-step
|
|
96
152
|
|
|
97
|
-
Scaffold generated in %s. Deploy it with: sf project deploy start --source-dir %s
|
|
153
|
+
Scaffold generated in %s. Deploy it with: sf project deploy start --source-dir %s
|
|
98
154
|
|
|
99
155
|
# success.app-id
|
|
100
156
|
|
|
@@ -112,6 +168,18 @@ Re-running this command overwrites the generated files for the "%s" External Cli
|
|
|
112
168
|
|
|
113
169
|
Verify that every component you referenced already exists and is exposed for Lightning Out 2.0 before deploying.
|
|
114
170
|
|
|
171
|
+
# success.clwr-site-linked-guest
|
|
172
|
+
|
|
173
|
+
Deploying the app links it to the "%s" site and replaces the app's current site link, if it has one. After you deploy, in Experience Builder for the site, go to Settings > Security & Privacy, set "Clickjack Protection Level" to "Allow framing of site pages on external domains", and add your host domains to "Trusted Domains for Inline Framing". Then make the site's /lightning-out page public, and publish the site. On your host page, set "org-url" to the site's origin without its path prefix, for example "https://example.my.site.com", and "site-prefix" to the URL path prefix, for example "/mysite", on the <lightning-out-application> tag. For a site at the root of its domain, set "site-prefix" to "". For host-page setup, see "Use Components Outside Salesforce with Lightning Out 2.0" in the Lightning Web Components Developer Guide.
|
|
174
|
+
|
|
175
|
+
# success.clwr-site-linked-authenticated
|
|
176
|
+
|
|
177
|
+
Deploying the app links it to the "%s" site and replaces the app's current site link, if it has one. After you deploy, in Experience Builder for the site, go to Settings > Security & Privacy, set "Clickjack Protection Level" to "Allow framing of site pages on external domains", and add your host domains to "Trusted Domains for Inline Framing". Then publish the site. On your host page, set "frontdoor-url" to the frontdoor_uri that your host app gets for the logged-in user from the site's /services/oauth2/lightningoutsingleaccess endpoint, and set "site-prefix" to the site's URL path prefix, for example "/mysite", on the <lightning-out-application> tag. For a site at the root of its domain, set "site-prefix" to "". For host-page setup, see "Use Components Outside Salesforce with Lightning Out 2.0" in the Lightning Web Components Developer Guide.
|
|
178
|
+
|
|
115
179
|
# success.clwr-site
|
|
116
180
|
|
|
117
|
-
Link the app to your Experience Cloud site after deploying. From Setup, in the Quick Find box, enter Lightning Out, and then select "Lightning Out 2.0 App Manager". Edit the app, select your site on the "Linked Communities Site" tab, and save. Then
|
|
181
|
+
Link the app to your Experience Cloud site after deploying. From Setup, in the Quick Find box, enter Lightning Out, and then select "Lightning Out 2.0 App Manager". Edit the app, select your site on the "Linked Communities Site" tab, and save. Then, in Experience Builder for the site, go to Settings > Security & Privacy and set "Clickjack Protection Level" to "Allow framing of site pages on external domains". The "Complete Deployment in Experience Builder" dialog doesn't include this step. Then follow the steps in the dialog, which include adding your host domains to the site's trusted domains and publishing the site. On your host page, set the "site-prefix" attribute on the <lightning-out-application> tag to your site's URL path prefix, for example "/mysite". For a site at the root of its domain, set "site-prefix" to "". For host-page setup, see "Use Components Outside Salesforce with Lightning Out 2.0" in the Lightning Web Components Developer Guide.
|
|
182
|
+
|
|
183
|
+
# success.clwr-site-guest
|
|
184
|
+
|
|
185
|
+
For guest users, don't skip the dialog's Guest User Mode step for the site's /lightning-out page. On your host page, also set "org-url" on the <lightning-out-application> tag to the site's origin without its path prefix, for example "https://example.my.site.com".
|
package/oclif.manifest.json
CHANGED
|
@@ -1742,12 +1742,13 @@
|
|
|
1742
1742
|
"template:generate:lightning-out": {
|
|
1743
1743
|
"aliases": [],
|
|
1744
1744
|
"args": {},
|
|
1745
|
-
"description": "Lightning Out 2.0 lets you embed custom Lightning web components (LWCs) into your external, non-Salesforce apps.\n\nThis command gets you started by generating the seven metadata artifact types that a Lightning Out 2.0 app requires into your Salesforce DX project: LightningOutApp, MyDomain and Security settings, one CorsWhitelistOrigin per host domain, and the three External Client Application OAuth components (ExternalClientApplication, ExtlClntAppGlobalOauthSettings, ExtlClntAppOauthSettings). The command only generates files. It doesn't deploy any metadata to an org.\n\nInputs can come from a --definition-file JSON, individual flags, or both. Flag values take precedence over the file on a per-key basis. The command validates the types of definition-file fields; the underlying generator performs the remaining structural validation, such as required fields and formats.",
|
|
1745
|
+
"description": "Lightning Out 2.0 lets you embed custom Lightning web components (LWCs) into your external, non-Salesforce apps.\n\nThis command gets you started by generating the seven metadata artifact types that a Lightning Out 2.0 app requires into your Salesforce DX project: LightningOutApp, MyDomain and Security settings, one CorsWhitelistOrigin per host domain, and the three External Client Application OAuth components (ExternalClientApplication, ExtlClntAppGlobalOauthSettings, ExtlClntAppOauthSettings). For a CLWR app with --access guest, the command generates only the LightningOutApp, because guest users don't log in. The command only generates files. It doesn't deploy any metadata to an org. When you deploy the generated LightningOutApp, its components and host domains replace the app's existing ones in the org, including any added in Setup. List every component and host domain the app needs, not just the new ones.\n\nInputs can come from a --definition-file JSON, individual flags, or both. Flag values take precedence over the file on a per-key basis. The command validates the types of definition-file fields; the underlying generator performs the remaining structural validation, such as required fields and formats.",
|
|
1746
1746
|
"examples": [
|
|
1747
1747
|
"Generate a Lightning Out 2.0 app using individual flags to specify the values:\n<%= config.bin %> <%= command.id %> --app-name MyLoApp --runtime LWR_CORE --host-domains https://example.com --eca-name MyLoAppEca --eca-contact-email dev@example.com --eca-callback-url https://example.com/cb",
|
|
1748
1748
|
"Generate an app using the values in a JSON definition file called lo-def.json:\n<%= config.bin %> <%= command.id %> --definition-file lo-def.json",
|
|
1749
1749
|
"Generate the app into a specific directory:\n<%= config.bin %> <%= command.id %> --definition-file lo-def.json --output-dir force-app/main/default",
|
|
1750
|
-
"Generate a CLWR app for
|
|
1750
|
+
"Generate a CLWR app for authenticated users (the default) of the Experience Cloud site named \"My Site\", using a definition file for the other values:\n<%= config.bin %> <%= command.id %> --runtime CLWR --site \"My Site\" --definition-file lo-def.json",
|
|
1751
|
+
"Generate a CLWR app for guest users of the Experience Cloud site named \"My Site\":\n<%= config.bin %> <%= command.id %> --app-name MyLoApp --runtime CLWR --access guest --site \"My Site\" --components c/myHeader",
|
|
1751
1752
|
"Generate the app using most of the values from a definition file, but the --host-domains value overrides its equivalent in the file:\n<%= config.bin %> <%= command.id %> --definition-file lo-def.json --host-domains https://staging.example.com"
|
|
1752
1753
|
],
|
|
1753
1754
|
"flags": {
|
|
@@ -1783,7 +1784,7 @@
|
|
|
1783
1784
|
"type": "option"
|
|
1784
1785
|
},
|
|
1785
1786
|
"runtime": {
|
|
1786
|
-
"description": "LWR_CORE serves the app from your Salesforce org to authenticated users. CLWR serves it from an Experience Cloud site to guest and authenticated users.
|
|
1787
|
+
"description": "LWR_CORE serves the app from your Salesforce org to authenticated users. CLWR serves it from an Experience Cloud site to guest and authenticated users. For CLWR, specify the site with --site and the type of user with --access.",
|
|
1787
1788
|
"name": "runtime",
|
|
1788
1789
|
"summary": "Runtime that serves the app.",
|
|
1789
1790
|
"hasDynamicHelp": false,
|
|
@@ -1795,8 +1796,9 @@
|
|
|
1795
1796
|
"type": "option"
|
|
1796
1797
|
},
|
|
1797
1798
|
"host-domains": {
|
|
1799
|
+
"description": "Repeat the flag to specify more than one. Replaces, rather than merges with, any hostDomains in the --definition-file. Not used for CLWR with --access guest.",
|
|
1798
1800
|
"name": "host-domains",
|
|
1799
|
-
"summary": "HTTP or HTTPS origin of an external host page that embeds the app.
|
|
1801
|
+
"summary": "HTTP or HTTPS origin of an external host page that embeds the app.",
|
|
1800
1802
|
"hasDynamicHelp": false,
|
|
1801
1803
|
"multiple": true,
|
|
1802
1804
|
"type": "option"
|
|
@@ -1822,6 +1824,26 @@
|
|
|
1822
1824
|
"multiple": false,
|
|
1823
1825
|
"type": "option"
|
|
1824
1826
|
},
|
|
1827
|
+
"site": {
|
|
1828
|
+
"description": "Use the site name shown on the All Sites page in Setup, not its URL path prefix. The site must be active and use the Lightning Out (LWR) or Build Your Own (LWR) template. Used only with --runtime CLWR. To deploy an app that's linked to a site, use API version 69.0 or later. This flag is required for CLWR unless the project's sourceApiVersion is below 69.0, because deploying a CLWR app without a site at 69.0 or later removes the app's existing site link.",
|
|
1829
|
+
"name": "site",
|
|
1830
|
+
"summary": "Name of the Experience Cloud site to link a CLWR app to.",
|
|
1831
|
+
"hasDynamicHelp": false,
|
|
1832
|
+
"multiple": false,
|
|
1833
|
+
"type": "option"
|
|
1834
|
+
},
|
|
1835
|
+
"access": {
|
|
1836
|
+
"description": "Valid values are \"authenticated\" (default) and \"guest\". With \"authenticated\", the command generates the app plus the External Client Application, CORS, and MyDomain and Security settings that site users need to log in. With \"guest\", the command generates only the app, because guest users don't log in. Used only with --runtime CLWR.",
|
|
1837
|
+
"name": "access",
|
|
1838
|
+
"summary": "Type of Experience Cloud site user who accesses a CLWR app.",
|
|
1839
|
+
"hasDynamicHelp": false,
|
|
1840
|
+
"multiple": false,
|
|
1841
|
+
"options": [
|
|
1842
|
+
"guest",
|
|
1843
|
+
"authenticated"
|
|
1844
|
+
],
|
|
1845
|
+
"type": "option"
|
|
1846
|
+
},
|
|
1825
1847
|
"definition-file": {
|
|
1826
1848
|
"name": "definition-file",
|
|
1827
1849
|
"summary": "Path to a JSON file describing the Lightning Out 2.0 app. Individual flags, when supplied, override the corresponding value in this file.",
|
|
@@ -2816,5 +2838,5 @@
|
|
|
2816
2838
|
]
|
|
2817
2839
|
}
|
|
2818
2840
|
},
|
|
2819
|
-
"version": "57.
|
|
2841
|
+
"version": "57.7.0"
|
|
2820
2842
|
}
|
package/package.json
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-templates",
|
|
3
3
|
"description": "Commands to create metadata from a default or custom template",
|
|
4
|
-
"version": "57.
|
|
4
|
+
"version": "57.7.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
10
|
"@salesforce/core": "^9.2.0",
|
|
11
|
-
"@salesforce/sf-plugins-core": "^13.0.
|
|
12
|
-
"@salesforce/templates": "^66.
|
|
11
|
+
"@salesforce/sf-plugins-core": "^13.0.8",
|
|
12
|
+
"@salesforce/templates": "^66.20.0"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@oclif/plugin-command-snapshot": "^6.0.
|
|
16
|
-
"@salesforce/cli-plugins-testkit": "^5.3.
|
|
17
|
-
"@salesforce/dev-scripts": "^15.0.
|
|
15
|
+
"@oclif/plugin-command-snapshot": "^6.0.7",
|
|
16
|
+
"@salesforce/cli-plugins-testkit": "^5.3.90",
|
|
17
|
+
"@salesforce/dev-scripts": "^15.0.1",
|
|
18
18
|
"@salesforce/plugin-command-reference": "^3.1.147",
|
|
19
19
|
"@types/chai": "^4.3.17",
|
|
20
20
|
"@types/mocha": "^10.0.10",
|
|
21
21
|
"@types/node": "^18",
|
|
22
22
|
"@types/sinon": "^10.0.20",
|
|
23
23
|
"@types/yeoman-assert": "^3.1.4",
|
|
24
|
-
"eslint": "^10.
|
|
25
|
-
"eslint-config-salesforce-typescript": "^7.0.
|
|
24
|
+
"eslint": "^10.14.0",
|
|
25
|
+
"eslint-config-salesforce-typescript": "^7.0.6",
|
|
26
26
|
"eslint-plugin-sf-plugin": "^3.0.4",
|
|
27
27
|
"oclif": "^5.0.2",
|
|
28
28
|
"ts-node": "^10.9.2",
|
|
@@ -259,7 +259,7 @@
|
|
|
259
259
|
"exports": "./lib/index.js",
|
|
260
260
|
"type": "module",
|
|
261
261
|
"sfdx": {
|
|
262
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/57.
|
|
263
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/57.
|
|
262
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/57.7.0.crt",
|
|
263
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/57.7.0.sig"
|
|
264
264
|
}
|
|
265
265
|
}
|