create-sitecore-jss 22.3.0-canary.11 → 22.3.0-canary.12
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/dist/templates/angular-xmcloud/.env +7 -0
- package/dist/templates/angular-xmcloud/scripts/config/plugins/xmcloud.ts +2 -0
- package/dist/templates/angular-xmcloud/server.exports.ts +2 -0
- package/dist/templates/node-xmcloud-proxy/.env +0 -5
- package/dist/templates/node-xmcloud-proxy/src/config.ts +1 -1
- package/dist/templates/node-xmcloud-proxy/src/types.ts +1 -0
- package/package.json +2 -2
|
@@ -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=
|
|
@@ -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
|
}
|
|
@@ -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
|
};
|
|
@@ -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
|
|
|
@@ -77,7 +77,7 @@ export const personalizeConfig: PersonalizeConfig = {
|
|
|
77
77
|
400,
|
|
78
78
|
},
|
|
79
79
|
// Optional Sitecore Personalize scope identifier.
|
|
80
|
-
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.
|
|
@@ -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>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-sitecore-jss",
|
|
3
|
-
"version": "22.3.0-canary.
|
|
3
|
+
"version": "22.3.0-canary.12",
|
|
4
4
|
"description": "Sitecore JSS initializer",
|
|
5
5
|
"bin": "./dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"ts-node": "^10.9.1",
|
|
64
64
|
"typescript": "~4.9.5"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "5a151c7d8a44adf6c7fc3c389d57712558a450aa"
|
|
67
67
|
}
|