Commit da1ead1 1 parent 0c8193a commit da1ead1 Copy full SHA for da1ead1
File tree 7 files changed +14
-7
lines changed
packages/create-sitecore-jss/src/templates
7 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ Our versioning strategy is as follows:
40
40
* ` proxyAppDestination ` arg can be passed into ` create-sitecore-jss ` command to define path for proxy to be installed in
41
41
* ` [templates/angular] ` ` [templates/angular-xmcloud] ` ` [template/node-xmcloud-proxy] ` ` [sitecore-jss-proxy] ` Introduced /api/editing/config endpoint ([ #1903 ] ( https://github.com/Sitecore/jss/pull/1903 ) )
42
42
* ` [templates/angular] ` ` [templates/angular-xmcloud] ` ` [template/node-xmcloud-proxy] ` ` [sitecore-jss-proxy] ` Introduced /api/editing/render endpoint ([ #1908 ] ( https://github.com/Sitecore/jss/pull/1908 ) )
43
- * ` [templates/angular-xmcloud] ` ` [template/node-xmcloud-proxy] ` Personalization support ([ #1964 ] ( https://github.com/Sitecore/jss/pull/1964 ) [ #1971 ] ( https://github.com/Sitecore/jss/pull/1971 ) )
43
+ * ` [templates/angular-xmcloud] ` ` [template/node-xmcloud-proxy] ` Personalization support ([ #1964 ] ( https://github.com/Sitecore/jss/pull/1964 ) [ #1971 ] ( https://github.com/Sitecore/jss/pull/1971 ) [ # 1973 ] ( https://github.com/Sitecore/jss/pull/1973 ) )
44
44
* ` [create-sitecore-jss]``[sitecore-jss-angular]``[template/angular-xmcloud] ` Angular SXA components
45
45
* Angular placeholder now supports SXA components ([ #1870 ] ( https://github.com/Sitecore/jss/pull/1870 ) )
46
46
* Component styles ([ #1917 ] ( https://github.com/Sitecore/jss/pull/1917 ) )
Original file line number Diff line number Diff line change @@ -12,3 +12,10 @@ PROXY_HOST=http://localhost:3000
12
12
13
13
# Your XM Cloud Proxy server path is needed to build the app. The build output will be copied to the proxy server path.
14
14
PROXY_BUILD_PATH = <%- locals.relativeProxyAppDestination.replace(/\\/g, '\\\\') %>dist
15
+
16
+ # ==============================================
17
+
18
+ # An optional Sitecore Personalize scope identifier.
19
+ # This can be used to isolate personalization data when multiple XM Cloud Environments share a Personalize tenant.
20
+ # This should match the PAGES_PERSONALIZE_SCOPE environment variable for your connected XM Cloud Environment.
21
+ PERSONALIZE_SCOPE =
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ class XMCloudPlugin implements ConfigPlugin {
18
18
process . env [ `${ constantCase ( 'sitecoreEdgeUrl' ) } ` ] ?. replace ( / \/ $ / , '' ) ||
19
19
'https://edge-platform.sitecorecloud.io' ;
20
20
const sitecoreEdgeContextId = process . env [ `${ constantCase ( 'sitecoreEdgeContextId' ) } ` ] ;
21
+ const personalizeScope = process . env [ `${ constantCase ( 'personalizeScope' ) } ` ]
21
22
22
23
if ( config . sitecoreApiKey && sitecoreEdgeContextId ) {
23
24
console . log (
@@ -32,6 +33,7 @@ class XMCloudPlugin implements ConfigPlugin {
32
33
proxyHost,
33
34
sitecoreEdgeUrl,
34
35
sitecoreEdgeContextId,
36
+ personalizeScope,
35
37
} ) ;
36
38
}
37
39
}
Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import metadata from './src/environments/metadata.json';
11
11
12
12
const defaultLanguage = environment . defaultLanguage ;
13
13
const sitecoreSiteName = environment . sitecoreSiteName ;
14
+ const personalizeScope = environment . personalizeScope ;
14
15
const getClientFactoryConfig = getGraphQLClientFactoryConfig ;
15
16
16
17
export {
@@ -20,6 +21,7 @@ export {
20
21
layoutServiceFactory ,
21
22
defaultLanguage ,
22
23
sitecoreSiteName ,
24
+ personalizeScope ,
23
25
components ,
24
26
metadata ,
25
27
} ;
Original file line number Diff line number Diff line change @@ -13,11 +13,6 @@ PROXY_BUNDLE_PATH=
13
13
# Set the DEBUG environment variable to 'sitecore-jss:*,sitecore-jss:proxy,http-proxy-middleware*' to see all logs:
14
14
# DEBUG=sitecore-jss:*,http-proxy-middleware*
15
15
16
- # An optional Sitecore Personalize scope identifier.
17
- # This can be used to isolate personalization data when multiple XM Cloud Environments share a Personalize tenant.
18
- # This should match the PAGES_PERSONALIZE_SCOPE environment variable for your connected XM Cloud Environment.
19
- PERSONALIZE_SCOPE =
20
-
21
16
# Timeout (ms) for Sitecore CDP requests to respond within. Default is 400.
22
17
PERSONALIZE_MIDDLEWARE_CDP_TIMEOUT =
23
18
Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ export const personalizeConfig: PersonalizeConfig = {
77
77
400 ,
78
78
} ,
79
79
// Optional Sitecore Personalize scope identifier.
80
- scope : process . env . PERSONALIZE_SCOPE ,
80
+ scope : serverBundle . personalizeScope ,
81
81
// This function determines if the personalization should be turned off.
82
82
// IMPORTANT: You should implement based on your cookie consent management solution of choice.
83
83
// You may wish to keep it disabled while in development mode.
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ export interface ServerBundle {
17
17
getClientFactoryConfig : ( ) => GraphQLRequestClientFactoryConfig ;
18
18
defaultLanguage : string ;
19
19
sitecoreSiteName : string ;
20
+ personalizeScope ?: string ;
20
21
layoutServiceFactory : { create : ( ) => LayoutService } ;
21
22
dictionaryServiceFactory : { create : ( ) => DictionaryService } ;
22
23
components : string [ ] | Map < string , unknown > ;
You can’t perform that action at this time.
0 commit comments