@salesforce/plugin-templates 57.6.1 → 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 CHANGED
@@ -167,7 +167,7 @@ FLAG DESCRIPTIONS
167
167
  directory.
168
168
  ```
169
169
 
170
- _See code: [src/commands/template/generate/analytics/template.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/analytics/template.ts)_
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)_
171
171
 
172
172
  ## `sf template generate apex class`
173
173
 
@@ -229,7 +229,7 @@ FLAG DESCRIPTIONS
229
229
  Supplied parameter values or default values are filled into a copy of the template.
230
230
  ```
231
231
 
232
- _See code: [src/commands/template/generate/apex/class.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/apex/class.ts)_
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)_
233
233
 
234
234
  ## `sf template generate apex trigger`
235
235
 
@@ -299,7 +299,7 @@ FLAG DESCRIPTIONS
299
299
  Supplied parameter values or default values are filled into a copy of the template.
300
300
  ```
301
301
 
302
- _See code: [src/commands/template/generate/apex/trigger.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/apex/trigger.ts)_
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)_
303
303
 
304
304
  ## `sf template generate digital-experience site`
305
305
 
@@ -353,7 +353,7 @@ FLAG DESCRIPTIONS
353
353
  project, defaults to the current directory.
354
354
  ```
355
355
 
356
- _See code: [src/commands/template/generate/digital-experience/site.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/digital-experience/site.ts)_
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)_
357
357
 
358
358
  ## `sf template generate flexipage`
359
359
 
@@ -435,7 +435,7 @@ FLAG DESCRIPTIONS
435
435
  'Custom_Object__c'. This sets the `sobjectType` field in the FlexiPage metadata.
436
436
  ```
437
437
 
438
- _See code: [src/commands/template/generate/flexipage/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/flexipage/index.ts)_
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)_
439
439
 
440
440
  ## `sf template generate lightning-out`
441
441
 
@@ -445,10 +445,13 @@ Generate the required metadata to scaffold a Lightning Out 2.0 app.
445
445
  USAGE
446
446
  $ sf template generate lightning-out [--json] [--flags-dir <value>] [--app-name <value>] [--eca-name <value>] [--runtime
447
447
  LWR_CORE|CLWR] [--host-domains <value>...] [--components <value>...] [--eca-contact-email <value>]
448
- [--eca-callback-url <value>] [--definition-file <value>] [-d <value>]
448
+ [--eca-callback-url <value>] [--site <value>] [--access guest|authenticated] [--definition-file <value>] [-d
449
+ <value>]
449
450
 
450
451
  FLAGS
451
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>
452
455
  --app-name=<value> Developer name of the new Lightning Out 2.0 app.
453
456
  --components=<value>... Name of a Lightning web component exposed by the app. Repeat the flag to specify more
454
457
  than one. Replaces, rather than merges with, any components in the --definition-file.
@@ -457,12 +460,10 @@ FLAGS
457
460
  --eca-callback-url=<value> OAuth callback URL for the External Client Application.
458
461
  --eca-contact-email=<value> Contact email for the External Client Application.
459
462
  --eca-name=<value> Developer name of the External Client Application associated with the app.
460
- --host-domains=<value>... HTTP or HTTPS origin of an external host page that embeds the app. Repeat the flag to
461
- specify more than one. Replaces, rather than merges with, any hostDomains in the
462
- --definition-file. For CLWR apps, host domains are used only for CORS, which
463
- 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.
464
464
  --runtime=<option> Runtime that serves the app.
465
465
  <options: LWR_CORE|CLWR>
466
+ --site=<value> Name of the Experience Cloud site to link a CLWR app to.
466
467
 
467
468
  GLOBAL FLAGS
468
469
  --flags-dir=<value> Import flag values from a directory.
@@ -476,8 +477,11 @@ DESCRIPTION
476
477
  This command gets you started by generating the seven metadata artifact types that a Lightning Out 2.0 app requires
477
478
  into your Salesforce DX project: LightningOutApp, MyDomain and Security settings, one CorsWhitelistOrigin per host
478
479
  domain, and the three External Client Application OAuth components (ExternalClientApplication,
479
- ExtlClntAppGlobalOauthSettings, ExtlClntAppOauthSettings). The command only generates files. It doesn't deploy any
480
- metadata to an org.
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.
481
485
 
482
486
  Inputs can come from a --definition-file JSON, individual flags, or both. Flag values take precedence over the file on
483
487
  a per-key basis. The command validates the types of definition-file fields; the underlying generator performs the
@@ -497,9 +501,15 @@ EXAMPLES
497
501
 
498
502
  $ sf template generate lightning-out --definition-file lo-def.json --output-dir force-app/main/default
499
503
 
500
- Generate a CLWR app for an Experience Cloud site using a definition file:
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":
501
510
 
502
- $ sf template generate lightning-out --runtime CLWR --definition-file lo-def.json
511
+ $ sf template generate lightning-out --app-name MyLoApp --runtime CLWR --access guest --site "My Site" \
512
+ --components c/myHeader
503
513
 
504
514
  Generate the app using most of the values from a definition file, but the --host-domains value overrides its
505
515
  equivalent in the file:
@@ -512,13 +522,31 @@ FLAG DESCRIPTIONS
512
522
  The location can be an absolute path or relative to the current working directory. The default is the current
513
523
  directory.
514
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
+
515
536
  --runtime=LWR_CORE|CLWR Runtime that serves the app.
516
537
 
517
538
  LWR_CORE serves the app from your Salesforce org to authenticated users. CLWR serves it from an Experience Cloud
518
- site to guest and authenticated users. After you deploy a CLWR app, link it to your site in Setup.
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.
519
547
  ```
520
548
 
521
- _See code: [src/commands/template/generate/lightning-out/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/lightning-out/index.ts)_
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)_
522
550
 
523
551
  ## `sf template generate lightning app`
524
552
 
@@ -576,7 +604,7 @@ FLAG DESCRIPTIONS
576
604
  field in the DX project's "sfdx-project.json" file.
577
605
  ```
578
606
 
579
- _See code: [src/commands/template/generate/lightning/app.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/lightning/app.ts)_
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)_
580
608
 
581
609
  ## `sf template generate lightning component`
582
610
 
@@ -653,7 +681,7 @@ FLAG DESCRIPTIONS
653
681
  field in the DX project's "sfdx-project.json" file.
654
682
  ```
655
683
 
656
- _See code: [src/commands/template/generate/lightning/component.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/lightning/component.ts)_
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)_
657
685
 
658
686
  ## `sf template generate lightning event`
659
687
 
@@ -711,7 +739,7 @@ FLAG DESCRIPTIONS
711
739
  field in the DX project's "sfdx-project.json" file.
712
740
  ```
713
741
 
714
- _See code: [src/commands/template/generate/lightning/event.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/lightning/event.ts)_
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)_
715
743
 
716
744
  ## `sf template generate lightning interface`
717
745
 
@@ -769,7 +797,7 @@ FLAG DESCRIPTIONS
769
797
  field in the DX project's "sfdx-project.json" file.
770
798
  ```
771
799
 
772
- _See code: [src/commands/template/generate/lightning/interface.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/lightning/interface.ts)_
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)_
773
801
 
774
802
  ## `sf template generate lightning test`
775
803
 
@@ -827,7 +855,7 @@ FLAG DESCRIPTIONS
827
855
  field in the DX project's "sfdx-project.json" file.
828
856
  ```
829
857
 
830
- _See code: [src/commands/template/generate/lightning/test.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/lightning/test.ts)_
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)_
831
859
 
832
860
  ## `sf template generate project`
833
861
 
@@ -961,7 +989,7 @@ FLAG DESCRIPTIONS
961
989
  server-side type stripping.
962
990
  ```
963
991
 
964
- _See code: [src/commands/template/generate/project/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/project/index.ts)_
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)_
965
993
 
966
994
  ## `sf template generate static-resource`
967
995
 
@@ -1024,7 +1052,7 @@ FLAG DESCRIPTIONS
1024
1052
  etc.
1025
1053
  ```
1026
1054
 
1027
- _See code: [src/commands/template/generate/static-resource/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/static-resource/index.ts)_
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)_
1028
1056
 
1029
1057
  ## `sf template generate ui-bundle`
1030
1058
 
@@ -1119,7 +1147,7 @@ FLAG DESCRIPTIONS
1119
1147
  Supplied parameter values or default values are filled into a copy of the template.
1120
1148
  ```
1121
1149
 
1122
- _See code: [src/commands/template/generate/ui-bundle/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/ui-bundle/index.ts)_
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)_
1123
1151
 
1124
1152
  ## `sf template generate ui-embedding`
1125
1153
 
@@ -1198,7 +1226,7 @@ FLAG DESCRIPTIONS
1198
1226
  (announced by screen readers).
1199
1227
  ```
1200
1228
 
1201
- _See code: [src/commands/template/generate/ui-embedding/index.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/ui-embedding/index.ts)_
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)_
1202
1230
 
1203
1231
  ## `sf template generate visualforce component`
1204
1232
 
@@ -1255,7 +1283,7 @@ FLAG DESCRIPTIONS
1255
1283
  Supplied parameter values or default values are filled into a copy of the template.
1256
1284
  ```
1257
1285
 
1258
- _See code: [src/commands/template/generate/visualforce/component.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/visualforce/component.ts)_
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)_
1259
1287
 
1260
1288
  ## `sf template generate visualforce page`
1261
1289
 
@@ -1306,6 +1334,6 @@ FLAG DESCRIPTIONS
1306
1334
  The name can be up to 40 characters and must start with a letter.
1307
1335
  ```
1308
1336
 
1309
- _See code: [src/commands/template/generate/visualforce/page.ts](https://github.com/salesforcecli/plugin-templates/blob/57.6.1/src/commands/template/generate/visualforce/page.ts)_
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)_
1310
1338
 
1311
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 present and below the v68.0 deploy floor. Pure; testable. */
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(['appName', 'runtime', 'hostDomains', 'components', 'eca']);
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 local DX project's `sourceApiVersion`, used only for a CLI-side advisory warning
99
- * (the generator itself has no project context). Returns undefined when there's no DX project —
100
- * generating outside a project must not error.
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 getSourceApiVersion() {
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
- return projectJson.sourceApiVersion;
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 undefined;
129
+ return { inProject: true };
110
130
  }
111
131
  }
112
- /** True when a project sourceApiVersion is present and below the v68.0 deploy floor. Pure; testable. */
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 !!projApi && Number(projApi) < 68;
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({ summary: messages.getMessage('flags.host-domains.summary'), multiple: true }),
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
- // CLI-side sourceApiVersion floor check (the generator has no project context).
156
- const projApi = await getSourceApiVersion();
157
- const belowFloor = isBelowApiFloor(projApi);
158
- if (belowFloor) {
159
- this.warn(messages.getMessage('warning.source-api-version', [String(projApi)]));
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
- // The org-wide settings notice is a warning, so it also appears in the --json `warnings` array.
162
- this.warn(messages.getMessage('warning.org-settings'));
163
- // Success guidance (log/info are suppressed automatically under --json).
164
- // Only pin --api-version to the 68.0 deploy floor when the project is below it; otherwise omit
165
- // the optional flag so the user's own (>= floor) project default applies rather than being downgraded.
166
- const outputDir = opts.outputdir ?? '.';
167
- const apiVersionSuffix = belowFloor ? ' --api-version 68.0' : '';
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
- this.log(messages.getMessage('success.next-step', [outputDir, shellQuoteArg(outputDir), apiVersionSuffix]));
170
- // CLWR finds the app through the site link; app-id only applies to LWR_CORE.
171
- if (opts.runtime === 'CLWR') {
172
- this.info(messages.getMessage('success.clwr-site'));
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
- this.info(messages.getMessage('success.dont-delete'));
178
- this.info(messages.getMessage('success.eca-overwrite', [opts.eca.name ?? '']));
179
- return result; // --json returns the full CreateOutput (created[])
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,CAAC,EAAE,CAAC,YAAY,CAAC,IAAI,EAA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AE,CAAC;gBACd,8FAA8F;gBAC9F,8FAA8F;gBAC9F,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC;oBACtB,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,gCAAgC,CAAC,CAAC,CAAC,wCAAwC,CAAC;oBACtG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;gBAC1D,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,yEAAyE;gBACzE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,mBAAmB,CAAC,CAAC,CAAC;gBACpD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC;YAC9G,CAAC;QACH,CAAC;aAAM,CAAC;YACN,6EAA6E;YAC7E,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC,CAAC;QACnD,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;YACjB,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAAC;YACtD,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,uBAAuB,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;QAClF,CAAC;IACH,CAAC"}
@@ -12,9 +12,13 @@
12
12
 
13
13
  <%= config.bin %> <%= command.id %> --definition-file lo-def.json --output-dir force-app/main/default
14
14
 
15
- - Generate a CLWR app for an Experience Cloud site using a definition file:
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. After you deploy a CLWR app, link it to your site in Setup.
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. Repeat the flag to specify more than one. Replaces, rather than merges with, any hostDomains in the --definition-file. For CLWR apps, host domains are used only for CORS, which authenticated users need. Set up framing for the site in Experience Builder.
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
- Your local project's sourceApiVersion (%s) is below 68.0, the minimum API version this scaffold supports for deployment. Set sourceApiVersion to 68.0 or later in sfdx-project.json, or pass --api-version 68.0 or later when you deploy.
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%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 follow the steps in the "Complete Deployment in Experience Builder" dialog, which include 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 host-page setup, see "Use Components Outside Salesforce with Lightning Out 2.0" in the Lightning Web Components Developer Guide.
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".
@@ -841,149 +841,6 @@
841
841
  "flexipage:generate:template"
842
842
  ]
843
843
  },
844
- "template:generate:lightning-out": {
845
- "aliases": [],
846
- "args": {},
847
- "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.",
848
- "examples": [
849
- "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",
850
- "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",
851
- "Generate the app into a specific directory:\n<%= config.bin %> <%= command.id %> --definition-file lo-def.json --output-dir force-app/main/default",
852
- "Generate a CLWR app for an Experience Cloud site using a definition file:\n<%= config.bin %> <%= command.id %> --runtime CLWR --definition-file lo-def.json",
853
- "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"
854
- ],
855
- "flags": {
856
- "json": {
857
- "description": "Format output as json.",
858
- "helpGroup": "GLOBAL",
859
- "name": "json",
860
- "allowNo": false,
861
- "type": "boolean"
862
- },
863
- "flags-dir": {
864
- "helpGroup": "GLOBAL",
865
- "name": "flags-dir",
866
- "summary": "Import flag values from a directory.",
867
- "hasDynamicHelp": false,
868
- "multiple": false,
869
- "type": "option"
870
- },
871
- "app-name": {
872
- "name": "app-name",
873
- "required": false,
874
- "summary": "Developer name of the new Lightning Out 2.0 app.",
875
- "hasDynamicHelp": false,
876
- "multiple": false,
877
- "type": "option"
878
- },
879
- "eca-name": {
880
- "name": "eca-name",
881
- "required": false,
882
- "summary": "Developer name of the External Client Application associated with the app.",
883
- "hasDynamicHelp": false,
884
- "multiple": false,
885
- "type": "option"
886
- },
887
- "runtime": {
888
- "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. After you deploy a CLWR app, link it to your site in Setup.",
889
- "name": "runtime",
890
- "summary": "Runtime that serves the app.",
891
- "hasDynamicHelp": false,
892
- "multiple": false,
893
- "options": [
894
- "LWR_CORE",
895
- "CLWR"
896
- ],
897
- "type": "option"
898
- },
899
- "host-domains": {
900
- "name": "host-domains",
901
- "summary": "HTTP or HTTPS origin of an external host page that embeds the app. Repeat the flag to specify more than one. Replaces, rather than merges with, any hostDomains in the --definition-file. For CLWR apps, host domains are used only for CORS, which authenticated users need. Set up framing for the site in Experience Builder.",
902
- "hasDynamicHelp": false,
903
- "multiple": true,
904
- "type": "option"
905
- },
906
- "components": {
907
- "name": "components",
908
- "summary": "Name of a Lightning web component exposed by the app. Repeat the flag to specify more than one. Replaces, rather than merges with, any components in the --definition-file.",
909
- "hasDynamicHelp": false,
910
- "multiple": true,
911
- "type": "option"
912
- },
913
- "eca-contact-email": {
914
- "name": "eca-contact-email",
915
- "summary": "Contact email for the External Client Application.",
916
- "hasDynamicHelp": false,
917
- "multiple": false,
918
- "type": "option"
919
- },
920
- "eca-callback-url": {
921
- "name": "eca-callback-url",
922
- "summary": "OAuth callback URL for the External Client Application.",
923
- "hasDynamicHelp": false,
924
- "multiple": false,
925
- "type": "option"
926
- },
927
- "definition-file": {
928
- "name": "definition-file",
929
- "summary": "Path to a JSON file describing the Lightning Out 2.0 app. Individual flags, when supplied, override the corresponding value in this file.",
930
- "hasDynamicHelp": false,
931
- "multiple": false,
932
- "type": "option"
933
- },
934
- "output-dir": {
935
- "aliases": [
936
- "outputdir"
937
- ],
938
- "char": "d",
939
- "deprecateAliases": true,
940
- "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.",
941
- "name": "output-dir",
942
- "summary": "Directory for saving the created files.",
943
- "default": ".",
944
- "hasDynamicHelp": false,
945
- "multiple": false,
946
- "type": "option"
947
- },
948
- "loglevel": {
949
- "deprecated": {
950
- "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SF_LOG_LEVEL` environment variable."
951
- },
952
- "hidden": true,
953
- "name": "loglevel",
954
- "hasDynamicHelp": false,
955
- "multiple": false,
956
- "type": "option"
957
- }
958
- },
959
- "hasDynamicHelp": false,
960
- "hiddenAliases": [],
961
- "id": "template:generate:lightning-out",
962
- "pluginAlias": "@salesforce/plugin-templates",
963
- "pluginName": "@salesforce/plugin-templates",
964
- "pluginType": "core",
965
- "strict": true,
966
- "summary": "Generate the required metadata to scaffold a Lightning Out 2.0 app.",
967
- "enableJsonFlag": true,
968
- "isESM": true,
969
- "relativePath": [
970
- "lib",
971
- "commands",
972
- "template",
973
- "generate",
974
- "lightning-out",
975
- "index.js"
976
- ],
977
- "aliasPermutations": [],
978
- "permutations": [
979
- "template:generate:lightning-out",
980
- "generate:template:lightning-out",
981
- "generate:lightning-out:template",
982
- "template:lightning-out:generate",
983
- "lightning-out:template:generate",
984
- "lightning-out:generate:template"
985
- ]
986
- },
987
844
  "template:generate:lightning:app": {
988
845
  "aliases": [
989
846
  "force:lightning:app:create",
@@ -1882,6 +1739,171 @@
1882
1739
  "test:lightning:generate:template"
1883
1740
  ]
1884
1741
  },
1742
+ "template:generate:lightning-out": {
1743
+ "aliases": [],
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). 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
+ "examples": [
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
+ "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
+ "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 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",
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"
1753
+ ],
1754
+ "flags": {
1755
+ "json": {
1756
+ "description": "Format output as json.",
1757
+ "helpGroup": "GLOBAL",
1758
+ "name": "json",
1759
+ "allowNo": false,
1760
+ "type": "boolean"
1761
+ },
1762
+ "flags-dir": {
1763
+ "helpGroup": "GLOBAL",
1764
+ "name": "flags-dir",
1765
+ "summary": "Import flag values from a directory.",
1766
+ "hasDynamicHelp": false,
1767
+ "multiple": false,
1768
+ "type": "option"
1769
+ },
1770
+ "app-name": {
1771
+ "name": "app-name",
1772
+ "required": false,
1773
+ "summary": "Developer name of the new Lightning Out 2.0 app.",
1774
+ "hasDynamicHelp": false,
1775
+ "multiple": false,
1776
+ "type": "option"
1777
+ },
1778
+ "eca-name": {
1779
+ "name": "eca-name",
1780
+ "required": false,
1781
+ "summary": "Developer name of the External Client Application associated with the app.",
1782
+ "hasDynamicHelp": false,
1783
+ "multiple": false,
1784
+ "type": "option"
1785
+ },
1786
+ "runtime": {
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.",
1788
+ "name": "runtime",
1789
+ "summary": "Runtime that serves the app.",
1790
+ "hasDynamicHelp": false,
1791
+ "multiple": false,
1792
+ "options": [
1793
+ "LWR_CORE",
1794
+ "CLWR"
1795
+ ],
1796
+ "type": "option"
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.",
1800
+ "name": "host-domains",
1801
+ "summary": "HTTP or HTTPS origin of an external host page that embeds the app.",
1802
+ "hasDynamicHelp": false,
1803
+ "multiple": true,
1804
+ "type": "option"
1805
+ },
1806
+ "components": {
1807
+ "name": "components",
1808
+ "summary": "Name of a Lightning web component exposed by the app. Repeat the flag to specify more than one. Replaces, rather than merges with, any components in the --definition-file.",
1809
+ "hasDynamicHelp": false,
1810
+ "multiple": true,
1811
+ "type": "option"
1812
+ },
1813
+ "eca-contact-email": {
1814
+ "name": "eca-contact-email",
1815
+ "summary": "Contact email for the External Client Application.",
1816
+ "hasDynamicHelp": false,
1817
+ "multiple": false,
1818
+ "type": "option"
1819
+ },
1820
+ "eca-callback-url": {
1821
+ "name": "eca-callback-url",
1822
+ "summary": "OAuth callback URL for the External Client Application.",
1823
+ "hasDynamicHelp": false,
1824
+ "multiple": false,
1825
+ "type": "option"
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
+ },
1847
+ "definition-file": {
1848
+ "name": "definition-file",
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.",
1850
+ "hasDynamicHelp": false,
1851
+ "multiple": false,
1852
+ "type": "option"
1853
+ },
1854
+ "output-dir": {
1855
+ "aliases": [
1856
+ "outputdir"
1857
+ ],
1858
+ "char": "d",
1859
+ "deprecateAliases": true,
1860
+ "description": "The location can be an absolute path or relative to the current working directory. The default is the current directory.",
1861
+ "name": "output-dir",
1862
+ "summary": "Directory for saving the created files.",
1863
+ "default": ".",
1864
+ "hasDynamicHelp": false,
1865
+ "multiple": false,
1866
+ "type": "option"
1867
+ },
1868
+ "loglevel": {
1869
+ "deprecated": {
1870
+ "message": "The loglevel flag is no longer in use on this command. You may use it without error, but it will be ignored.\nSet the log level using the `SF_LOG_LEVEL` environment variable."
1871
+ },
1872
+ "hidden": true,
1873
+ "name": "loglevel",
1874
+ "hasDynamicHelp": false,
1875
+ "multiple": false,
1876
+ "type": "option"
1877
+ }
1878
+ },
1879
+ "hasDynamicHelp": false,
1880
+ "hiddenAliases": [],
1881
+ "id": "template:generate:lightning-out",
1882
+ "pluginAlias": "@salesforce/plugin-templates",
1883
+ "pluginName": "@salesforce/plugin-templates",
1884
+ "pluginType": "core",
1885
+ "strict": true,
1886
+ "summary": "Generate the required metadata to scaffold a Lightning Out 2.0 app.",
1887
+ "enableJsonFlag": true,
1888
+ "isESM": true,
1889
+ "relativePath": [
1890
+ "lib",
1891
+ "commands",
1892
+ "template",
1893
+ "generate",
1894
+ "lightning-out",
1895
+ "index.js"
1896
+ ],
1897
+ "aliasPermutations": [],
1898
+ "permutations": [
1899
+ "template:generate:lightning-out",
1900
+ "generate:template:lightning-out",
1901
+ "generate:lightning-out:template",
1902
+ "template:lightning-out:generate",
1903
+ "lightning-out:template:generate",
1904
+ "lightning-out:generate:template"
1905
+ ]
1906
+ },
1885
1907
  "template:generate:project": {
1886
1908
  "aliases": [
1887
1909
  "force:project:create",
@@ -2816,5 +2838,5 @@
2816
2838
  ]
2817
2839
  }
2818
2840
  },
2819
- "version": "57.6.1"
2841
+ "version": "57.7.0"
2820
2842
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@salesforce/plugin-templates",
3
3
  "description": "Commands to create metadata from a default or custom template",
4
- "version": "57.6.1",
4
+ "version": "57.7.0",
5
5
  "author": "Salesforce",
6
6
  "bugs": "https://github.com/salesforcecli/plugin-templates/issues",
7
7
  "enableO11y": true,
@@ -9,19 +9,19 @@
9
9
  "dependencies": {
10
10
  "@salesforce/core": "^9.2.0",
11
11
  "@salesforce/sf-plugins-core": "^13.0.8",
12
- "@salesforce/templates": "^66.19.0"
12
+ "@salesforce/templates": "^66.20.0"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@oclif/plugin-command-snapshot": "^6.0.7",
16
16
  "@salesforce/cli-plugins-testkit": "^5.3.90",
17
- "@salesforce/dev-scripts": "^15.0.0",
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.13.0",
24
+ "eslint": "^10.14.0",
25
25
  "eslint-config-salesforce-typescript": "^7.0.6",
26
26
  "eslint-plugin-sf-plugin": "^3.0.4",
27
27
  "oclif": "^5.0.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.6.1.crt",
263
- "signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-templates/57.6.1.sig"
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
  }