Repository navigation
feat(lightning-out): @W-24812375@ --site and --access for CLWR apps - #1093
Draft
akashdhake wants to merge 10 commits into
Draft
akashdhake wants to merge 10 commits into
akashdhake wants to merge 10 commits into
Conversation
- --site/--access flags and site/access definition-file keys (flag > file, per key) - CLWR without a site is an error at sourceApiVersion >= 69.0 or with no DX project; allowed below 69.0 with the Setup site-link guidance - 69.0 warnings for --site below 69.0 / without a project - guest: no org-settings warning or ECA notes; warns on ignored eca inputs and on authenticated-only files left in the output dir - unknown definition-file keys (now incl. nested eca.*) get a did-you-mean - CLWR guidance: site linked on deploy, finish setup in Experience Builder
- --site pins --api-version 69.0 - unknown eca keys warned separately - no-project and stale-files wording - D3 site-required respects below-69 projects
- print the guest public-page line whether or not --site is given - normalize null site/access to undefined in the merge - stale-file scan is advisory: ignore fs errors and non-metadata files - tests for the 68.0/69.0 pin boundaries and the stale-files negatives
- Org E2E: --api-version does not change the deployed manifest version - --site on a 68.0 project fails with "Property 'sites' not valid in version 68.0" even pinned - A 66.0 project fails "Not available for deploy for this API version" even with --api-version 68.0 - Drop the pin from the next-step command; warnings say to raise sourceApiVersion
…ersions strictly Read sourceApiVersion from the project that contains --output-dir instead of the cwd. Parse versions strictly so values such as 0x40 or 1e1 are unknown and CLWR fails closed. Say that a site below 69.0 fails the deploy, warn that a later 69.0 redeploy without a site unlinks, fix the CLWR host-domains help, list eligible site templates, and note that deploys replace lists.
… at 69.0+ Coerce a numeric sourceApiVersion (68) to a string instead of crashing. Require a site for CLWR when the cwd project, which sets the deploy version, is at 69.0+ or unknown. Warn when --site is given with an unrecognized sourceApiVersion.
…iVersion Tell a non-project cwd apart from a cwd project without sourceApiVersion. The latter deploys at the org default, so CLWR without a site now errors with a cwd message. Also warn when a different cwd project is below the API version the app needs.
Unrecognized definition-file keys now get the plain warning. Exact key names are expected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Adds
--siteand--accesstosf template generate lightning-outfor CLWR (Experience Cloud site) apps. Both can also be set in--definition-file.--site "<site name>"links the app to an Experience Cloud site. It's written as<sites>in the LightningOutApp file.--access guestgenerates only the LightningOutApp file.--access authenticated(the default) generates the full set.LWR_COREbehaviour is unchanged, and--site/--accessare rejected for it.Safety rule: a CLWR app without a site is an error unless the project's
sourceApiVersionis known to be below 69.0. At API 69.0+, deploying a CLWR app file without<sites>removes the app's existing site link (verified in an org).--output-dir.sf project deploy startwould use that project's version, so it must also be below 69.0.The command also:
--siteis used with a project below 69.0, because the deploy fails;--api-versionhint, because it doesn't change the deployed metadata version (verified in an org);Verification:
snapshot:compareshows no changes.Release note (behaviour change)
sf template generate lightning-out --runtime CLWRnow requires--site(orsitein the definition file) when the project's sourceApiVersion is 69.0 or later, or can't be determined. To keep generating CLWR apps without a site link, use a project whose sourceApiVersion is below 69.0, and link the site in Setup.What issues does this PR fix or reference?
Lightning Out 2.0: scaffold CLWR apps linked to an Experience Cloud site (guest and authenticated access). Depends on forcedotcom/salesforcedx-templates#949.
GUS: W-24812375 (depends on generator W-24812373)