@sitecore-content-sdk/nextjs 2.0.0-canary.10 → 2.0.0-canary.13
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/cjs/index.js +7 -1
- package/dist/cjs/initialization/proxy/analytics-adapter.js +80 -0
- package/dist/cjs/initialization/proxy/personalize-adapter.js +81 -0
- package/dist/cjs/middleware/robots-middleware.js +3 -1
- package/dist/cjs/middleware/sitemap-middleware.js +3 -1
- package/dist/cjs/proxy/personalize-proxy.js +32 -15
- package/dist/esm/index.js +3 -0
- package/dist/esm/initialization/proxy/analytics-adapter.js +75 -0
- package/dist/esm/initialization/proxy/personalize-adapter.js +78 -0
- package/dist/esm/middleware/robots-middleware.js +3 -1
- package/dist/esm/middleware/sitemap-middleware.js +3 -1
- package/dist/esm/proxy/personalize-proxy.js +32 -15
- package/package.json +10 -10
- package/types/index.d.ts +6 -0
- package/types/index.d.ts.map +1 -1
- package/types/initialization/proxy/analytics-adapter.d.ts +30 -0
- package/types/initialization/proxy/analytics-adapter.d.ts.map +1 -0
- package/types/initialization/proxy/personalize-adapter.d.ts +23 -0
- package/types/initialization/proxy/personalize-adapter.d.ts.map +1 -0
- package/types/middleware/robots-middleware.d.ts.map +1 -1
- package/types/middleware/sitemap-middleware.d.ts.map +1 -1
- package/types/proxy/personalize-proxy.d.ts +2 -1
- package/types/proxy/personalize-proxy.d.ts.map +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -37,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.BYOCWrapper = exports.FEaaSWrapper = exports.BYOCServerWrapper = exports.BYOCClientWrapper = exports.FEaaSServerWrapper = exports.FEaaSClientWrapper = exports.NextImage = exports.Placeholder = exports.RichText = exports.Link = exports.useComponentProps = exports.ComponentPropsContext = exports.ComponentPropsReactContext = exports.ComponentPropsService = exports.normalizeSiteRewrite = exports.getSiteRewriteData = exports.getSiteRewrite = exports.SiteInfoService = exports.SiteResolver = exports.RobotsService = exports.ErrorPagesService = exports.SitemapXmlService = exports.REDIRECT_TYPE_SERVER_TRANSFER = exports.REDIRECT_TYPE_302 = exports.REDIRECT_TYPE_301 = exports.RedirectsService = exports.SitePathService = exports.PersonalizeService = exports.CdpHelper = exports.normalizePersonalizedRewrite = exports.getGroomedVariantIds = exports.getPersonalizedRewriteData = exports.getPersonalizedRewrite = exports.personalizeLayout = exports.DictionaryService = exports.mediaApi = exports.ComponentLayoutService = exports.ErrorPage = exports.RenderingType = exports.EditMode = exports.getContentStylesheetLink = exports.getFieldValue = exports.getChildPlaceholder = exports.LayoutService = exports.LayoutServicePageState = exports.MemoryCacheClient = exports.enableDebug = exports.NativeDataFetcher = exports.constants = exports.debug = void 0;
|
|
40
|
-
exports.renderEmptyPlaceholder = exports.AppPlaceholder = exports.ClientEditingChromesUpdate = exports.Form = exports.EditingScripts = exports.withEmptyFieldEditingComponent = exports.withFieldMetadata = exports.withDatasourceCheck = exports.withPlaceholder = exports.withAppPlaceholder = exports.withEditorChromes = exports.useSitecore = exports.withSitecore = exports.SitecoreProviderReactContext = exports.SitecoreProvider = exports.DefaultEmptyFieldEditingComponentText = exports.DefaultEmptyFieldEditingComponentImage = exports.DesignLibraryApp = exports.DesignLibrary = exports.File = exports.getDesignLibraryStylesheetLinks = exports.BYOCComponent = exports.fetchFEaaSComponentServerProps = exports.FEaaSComponent = exports.DateField = exports.Text = exports.Image = void 0;
|
|
40
|
+
exports.analyticsProxyAdapter = exports.personalizeProxyAdapter = exports.initContentSdk = exports.renderEmptyPlaceholder = exports.AppPlaceholder = exports.ClientEditingChromesUpdate = exports.Form = exports.EditingScripts = exports.withEmptyFieldEditingComponent = exports.withFieldMetadata = exports.withDatasourceCheck = exports.withPlaceholder = exports.withAppPlaceholder = exports.withEditorChromes = exports.useSitecore = exports.withSitecore = exports.SitecoreProviderReactContext = exports.SitecoreProvider = exports.DefaultEmptyFieldEditingComponentText = exports.DefaultEmptyFieldEditingComponentImage = exports.DesignLibraryApp = exports.DesignLibrary = exports.File = exports.getDesignLibraryStylesheetLinks = exports.BYOCComponent = exports.fetchFEaaSComponentServerProps = exports.FEaaSComponent = exports.DateField = exports.Text = exports.Image = void 0;
|
|
41
41
|
var debug_1 = require("./debug");
|
|
42
42
|
Object.defineProperty(exports, "debug", { enumerable: true, get: function () { return __importDefault(debug_1).default; } });
|
|
43
43
|
var core_1 = require("@sitecore-content-sdk/core");
|
|
@@ -136,3 +136,9 @@ Object.defineProperty(exports, "Form", { enumerable: true, get: function () { re
|
|
|
136
136
|
Object.defineProperty(exports, "ClientEditingChromesUpdate", { enumerable: true, get: function () { return react_2.ClientEditingChromesUpdate; } });
|
|
137
137
|
Object.defineProperty(exports, "AppPlaceholder", { enumerable: true, get: function () { return react_2.AppPlaceholder; } });
|
|
138
138
|
Object.defineProperty(exports, "renderEmptyPlaceholder", { enumerable: true, get: function () { return react_2.renderEmptyPlaceholder; } });
|
|
139
|
+
var core_2 = require("@sitecore-content-sdk/core");
|
|
140
|
+
Object.defineProperty(exports, "initContentSdk", { enumerable: true, get: function () { return core_2.initContentSdk; } });
|
|
141
|
+
var personalize_adapter_1 = require("./initialization/proxy/personalize-adapter");
|
|
142
|
+
Object.defineProperty(exports, "personalizeProxyAdapter", { enumerable: true, get: function () { return personalize_adapter_1.personalizeProxyAdapter; } });
|
|
143
|
+
var analytics_adapter_1 = require("./initialization/proxy/analytics-adapter");
|
|
144
|
+
Object.defineProperty(exports, "analyticsProxyAdapter", { enumerable: true, get: function () { return analytics_adapter_1.analyticsProxyAdapter; } });
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.getClientId = void 0;
|
|
13
|
+
exports.analyticsProxyAdapter = analyticsProxyAdapter;
|
|
14
|
+
const internal_1 = require("@sitecore-content-sdk/analytics-core/internal");
|
|
15
|
+
const internal_2 = require("@sitecore-content-sdk/analytics-core/internal");
|
|
16
|
+
const core_1 = require("@sitecore-content-sdk/core");
|
|
17
|
+
/**
|
|
18
|
+
* Creates a proxy-based analytics adapter that reads and writes the visitor ID
|
|
19
|
+
* using cookies and can resolve a new client ID from the Edge proxy when needed.
|
|
20
|
+
* The adapter also provides access to the current URL search parameters.
|
|
21
|
+
* @param {NextRequest} request - The Next.js request object.
|
|
22
|
+
* @param {NextResponse} response - The Next.js response object.
|
|
23
|
+
* @returns {AnalyticsProxyAdapter} The analytics proxy adapter.
|
|
24
|
+
* @public
|
|
25
|
+
*/
|
|
26
|
+
function analyticsProxyAdapter(request, response) {
|
|
27
|
+
return {
|
|
28
|
+
type: 'proxy',
|
|
29
|
+
getClientId: () => {
|
|
30
|
+
return (0, exports.getClientId)(request);
|
|
31
|
+
},
|
|
32
|
+
setClientId: () => __awaiter(this, void 0, void 0, function* () {
|
|
33
|
+
var _a;
|
|
34
|
+
const coreConfig = (0, core_1.getCoreContext)().config;
|
|
35
|
+
const analyticsOptions = (0, internal_2.getAnalyticsPlugin)().options;
|
|
36
|
+
const cookieOptions = analyticsOptions.cookies;
|
|
37
|
+
const clientIdCookieName = cookieOptions.name;
|
|
38
|
+
const legacyClientIdCookieName = `${internal_1.COOKIE_NAME_PREFIX}${coreConfig.contextId}`;
|
|
39
|
+
const cookieAttributes = (0, internal_1.getDefaultCookieAttributes)(cookieOptions.expiryDays, cookieOptions.domain);
|
|
40
|
+
const legacyClientIdCookie = (_a = request.cookies.get(legacyClientIdCookieName)) === null || _a === void 0 ? void 0 : _a.value;
|
|
41
|
+
if (legacyClientIdCookie) {
|
|
42
|
+
request.cookies.set(clientIdCookieName, legacyClientIdCookie);
|
|
43
|
+
response.cookies.set(clientIdCookieName, legacyClientIdCookie, Object.assign(Object.assign({}, cookieAttributes), { sameSite: 'none' }));
|
|
44
|
+
request.cookies.delete(legacyClientIdCookieName);
|
|
45
|
+
response.cookies.delete(legacyClientIdCookieName);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const clientIdCookie = (0, exports.getClientId)(request);
|
|
49
|
+
let newClientIdCookieValue;
|
|
50
|
+
if (!clientIdCookie) {
|
|
51
|
+
const cookieValues = yield (0, internal_1.fetchClientIdFromEdgeProxy)(coreConfig.edgeUrl, coreConfig.contextId, analyticsOptions.timeout);
|
|
52
|
+
newClientIdCookieValue = cookieValues.clientId;
|
|
53
|
+
analyticsOptions.visitorIds = cookieValues;
|
|
54
|
+
}
|
|
55
|
+
else
|
|
56
|
+
newClientIdCookieValue = clientIdCookie;
|
|
57
|
+
if (!clientIdCookie)
|
|
58
|
+
request.cookies.set(clientIdCookieName, newClientIdCookieValue);
|
|
59
|
+
const attributes = (0, internal_1.getDefaultCookieAttributes)(cookieOptions.expiryDays, cookieOptions.domain);
|
|
60
|
+
response.cookies.set(clientIdCookieName, newClientIdCookieValue, Object.assign(Object.assign({}, attributes), { sameSite: 'none' }));
|
|
61
|
+
}),
|
|
62
|
+
location: {
|
|
63
|
+
getSearchParams: () => {
|
|
64
|
+
return request.nextUrl.searchParams.toString();
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Retrieves the client ID from the request cookies.
|
|
71
|
+
* @param {NextRequest} request
|
|
72
|
+
* @returns {string | null} The client ID or null if not found.
|
|
73
|
+
* @internal
|
|
74
|
+
*/
|
|
75
|
+
const getClientId = (request) => {
|
|
76
|
+
var _a;
|
|
77
|
+
const clientIdCookieName = (0, internal_2.getAnalyticsPlugin)().options.cookies.name;
|
|
78
|
+
return ((_a = request.cookies.get(clientIdCookieName)) === null || _a === void 0 ? void 0 : _a.value) || null;
|
|
79
|
+
};
|
|
80
|
+
exports.getClientId = getClientId;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.personalizeProxyAdapter = personalizeProxyAdapter;
|
|
13
|
+
const internal_1 = require("@sitecore-content-sdk/analytics-core/internal");
|
|
14
|
+
const internal_2 = require("@sitecore-content-sdk/analytics-core/internal");
|
|
15
|
+
const core_1 = require("@sitecore-content-sdk/core");
|
|
16
|
+
const internal_3 = require("@sitecore-content-sdk/personalize/internal");
|
|
17
|
+
const analytics_adapter_1 = require("./analytics-adapter");
|
|
18
|
+
/**
|
|
19
|
+
* Creates a proxy-based personalize adapter that reads and writes the profile ID
|
|
20
|
+
* using cookies and can resolve a new profile ID from the Edge proxy when needed.
|
|
21
|
+
* The adapter also provides access user agent from the request headers.
|
|
22
|
+
* @param {NextRequest} request - The HTTP request object.
|
|
23
|
+
* @param {NextResponse} response - The HTTP response object.
|
|
24
|
+
* @returns {PersonalizeProxyAdapter} The personalize proxy adapter.
|
|
25
|
+
* @public
|
|
26
|
+
*/
|
|
27
|
+
function personalizeProxyAdapter(request, response) {
|
|
28
|
+
return {
|
|
29
|
+
type: 'proxy',
|
|
30
|
+
getUserAgent: () => request.headers.get('user-agent') || undefined,
|
|
31
|
+
getProfileId: () => {
|
|
32
|
+
return getProfileId(request);
|
|
33
|
+
},
|
|
34
|
+
setProfileId: () => __awaiter(this, void 0, void 0, function* () {
|
|
35
|
+
var _a;
|
|
36
|
+
const coreConfig = (0, core_1.getCoreContext)().config;
|
|
37
|
+
const cookieOptions = (0, internal_2.getAnalyticsPlugin)().options.cookies;
|
|
38
|
+
const personalizePlugin = (0, internal_3.getPersonalizePlugin)();
|
|
39
|
+
const profileIdCookieName = personalizePlugin.options.cookies.name;
|
|
40
|
+
const cookieAttributes = (0, internal_1.getDefaultCookieAttributes)(cookieOptions.expiryDays, cookieOptions.domain);
|
|
41
|
+
const legacyProfileIdCookieName = `${internal_1.COOKIE_NAME_PREFIX}${coreConfig.contextId}_personalize`;
|
|
42
|
+
const legacyProfileIdCookie = (_a = request.cookies.get(legacyProfileIdCookieName)) === null || _a === void 0 ? void 0 : _a.value;
|
|
43
|
+
if (legacyProfileIdCookie) {
|
|
44
|
+
request.cookies.set(profileIdCookieName, legacyProfileIdCookie);
|
|
45
|
+
response.cookies.set(profileIdCookieName, legacyProfileIdCookie, Object.assign(Object.assign({}, cookieAttributes), { sameSite: 'none' }));
|
|
46
|
+
request.cookies.delete(legacyProfileIdCookieName);
|
|
47
|
+
response.cookies.delete(legacyProfileIdCookieName);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const cookiesValuesFromEdgeServer = (0, internal_2.getAnalyticsPlugin)().options.visitorIds;
|
|
51
|
+
const profileIdCookie = getProfileId(request);
|
|
52
|
+
const clientIdCookie = (0, analytics_adapter_1.getClientId)(request);
|
|
53
|
+
let newProfileIdCookieValue;
|
|
54
|
+
if (profileIdCookie)
|
|
55
|
+
newProfileIdCookieValue = profileIdCookie;
|
|
56
|
+
else if (cookiesValuesFromEdgeServer === null || cookiesValuesFromEdgeServer === void 0 ? void 0 : cookiesValuesFromEdgeServer.profileId)
|
|
57
|
+
newProfileIdCookieValue = cookiesValuesFromEdgeServer.profileId;
|
|
58
|
+
else if (clientIdCookie) {
|
|
59
|
+
const profileIdCookieValueFromEdgeProxy = yield (0, internal_3.fetchProfileIdFromEdgeProxy)(clientIdCookie, coreConfig.contextId, coreConfig.edgeUrl);
|
|
60
|
+
newProfileIdCookieValue = profileIdCookieValueFromEdgeProxy;
|
|
61
|
+
}
|
|
62
|
+
else
|
|
63
|
+
return;
|
|
64
|
+
if (!profileIdCookie)
|
|
65
|
+
request.cookies.set(profileIdCookieName, newProfileIdCookieValue);
|
|
66
|
+
const attributes = (0, internal_1.getDefaultCookieAttributes)(cookieOptions.expiryDays, cookieOptions.domain);
|
|
67
|
+
response.cookies.set(profileIdCookieName, newProfileIdCookieValue, Object.assign(Object.assign({}, attributes), { sameSite: 'none' }));
|
|
68
|
+
}),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Retrieves the profile ID from request cookies.
|
|
73
|
+
* @param {NextRequest} request
|
|
74
|
+
* @returns {string | null} The profile ID or null if not found.
|
|
75
|
+
* @internal
|
|
76
|
+
*/
|
|
77
|
+
function getProfileId(request) {
|
|
78
|
+
var _a;
|
|
79
|
+
const profileIdCookieName = (0, internal_3.getPersonalizePlugin)().options.cookies.name;
|
|
80
|
+
return ((_a = request.cookies.get(profileIdCookieName)) === null || _a === void 0 ? void 0 : _a.value) || null;
|
|
81
|
+
}
|
|
@@ -10,7 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.RobotsMiddleware = void 0;
|
|
13
|
+
const core_1 = require("@sitecore-content-sdk/core");
|
|
13
14
|
const site_1 = require("../site");
|
|
15
|
+
const { ERROR_MESSAGES } = core_1.constants;
|
|
14
16
|
/**
|
|
15
17
|
* Middleware for handling robots.txt requests in a Next.js application.
|
|
16
18
|
* @public
|
|
@@ -37,7 +39,7 @@ class RobotsMiddleware {
|
|
|
37
39
|
res.status(200).send(robotsContent);
|
|
38
40
|
}
|
|
39
41
|
catch (_b) {
|
|
40
|
-
res.status(500).send(
|
|
42
|
+
res.status(500).send(`Internal Server Error. ${ERROR_MESSAGES.CONTACT_SUPPORT}`);
|
|
41
43
|
}
|
|
42
44
|
});
|
|
43
45
|
}
|
|
@@ -10,7 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.SitemapMiddleware = void 0;
|
|
13
|
+
const core_1 = require("@sitecore-content-sdk/core");
|
|
13
14
|
const site_1 = require("../site");
|
|
15
|
+
const { ERROR_MESSAGES } = core_1.constants;
|
|
14
16
|
/**
|
|
15
17
|
* Middleware for handling sitemap requests in a Next.js application.
|
|
16
18
|
* Encapsulates all HTTP-related logic for sitemap generation and delivery.
|
|
@@ -41,7 +43,7 @@ class SitemapMiddleware {
|
|
|
41
43
|
res.redirect('/404');
|
|
42
44
|
}
|
|
43
45
|
else {
|
|
44
|
-
res.status(500).send(
|
|
46
|
+
res.status(500).send(`Internal Server Error. ${ERROR_MESSAGES.CONTACT_SUPPORT}`);
|
|
45
47
|
}
|
|
46
48
|
}
|
|
47
49
|
});
|
|
@@ -15,9 +15,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.PersonalizeProxy = void 0;
|
|
16
16
|
const personalize_1 = require("@sitecore-content-sdk/content/personalize");
|
|
17
17
|
const proxy_1 = require("./proxy");
|
|
18
|
-
const
|
|
19
|
-
const
|
|
18
|
+
const core_1 = require("@sitecore-content-sdk/core");
|
|
19
|
+
const personalize_2 = require("@sitecore-content-sdk/personalize");
|
|
20
20
|
const debug_1 = __importDefault(require("../debug"));
|
|
21
|
+
const analytics_core_1 = require("@sitecore-content-sdk/analytics-core");
|
|
22
|
+
const analytics_adapter_1 = require("../initialization/proxy/analytics-adapter");
|
|
23
|
+
const personalize_3 = require("@sitecore-content-sdk/personalize");
|
|
24
|
+
const personalize_adapter_1 = require("../initialization/proxy/personalize-adapter");
|
|
21
25
|
/**
|
|
22
26
|
* Proxy / handler to support Sitecore Personalize
|
|
23
27
|
* @public
|
|
@@ -93,7 +97,7 @@ class PersonalizeProxy extends proxy_1.ProxyBase {
|
|
|
93
97
|
const executions = this.getPersonalizeExecutions(personalizeInfo, language);
|
|
94
98
|
const identifiedVariantIds = [];
|
|
95
99
|
yield Promise.all(executions.map((execution) => this.personalize(Object.assign({ friendlyId: execution.friendlyId, variantIds: execution.variantIds, params,
|
|
96
|
-
language, timeout: cdpTimeout }, (geo && { geo }))
|
|
100
|
+
language, timeout: cdpTimeout }, (geo && { geo }))).then((personalization) => {
|
|
97
101
|
const variantId = personalization.variantId;
|
|
98
102
|
if (variantId) {
|
|
99
103
|
if (!execution.variantIds.includes(variantId)) {
|
|
@@ -177,22 +181,35 @@ class PersonalizeProxy extends proxy_1.ProxyBase {
|
|
|
177
181
|
}
|
|
178
182
|
initPersonalizeServer(_a) {
|
|
179
183
|
return __awaiter(this, arguments, void 0, function* ({ hostname, siteName, request, response, }) {
|
|
180
|
-
yield (0,
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
184
|
+
yield (0, core_1.initContentSdk)({
|
|
185
|
+
config: {
|
|
186
|
+
contextId: this.config.contextId,
|
|
187
|
+
edgeUrl: this.config.edgeUrl,
|
|
188
|
+
siteName,
|
|
189
|
+
},
|
|
190
|
+
plugins: [
|
|
191
|
+
(0, analytics_core_1.analyticsPlugin)({
|
|
192
|
+
options: {
|
|
193
|
+
enableCookie: true,
|
|
194
|
+
cookieDomain: hostname,
|
|
195
|
+
},
|
|
196
|
+
adapter: (0, analytics_adapter_1.analyticsProxyAdapter)(request, response),
|
|
197
|
+
}),
|
|
198
|
+
(0, personalize_3.personalizeServerPlugin)({
|
|
199
|
+
options: {
|
|
200
|
+
enablePersonalizeCookie: true,
|
|
201
|
+
},
|
|
202
|
+
adapter: (0, personalize_adapter_1.personalizeProxyAdapter)(request, response),
|
|
203
|
+
}),
|
|
204
|
+
],
|
|
205
|
+
});
|
|
189
206
|
});
|
|
190
207
|
}
|
|
191
|
-
personalize(_a
|
|
192
|
-
return __awaiter(this, arguments, void 0, function* ({ params, friendlyId, language, timeout, variantIds, geo, }
|
|
208
|
+
personalize(_a) {
|
|
209
|
+
return __awaiter(this, arguments, void 0, function* ({ params, friendlyId, language, timeout, variantIds, geo, }) {
|
|
193
210
|
var _b;
|
|
194
211
|
debug_1.default.personalize('executing experience for %s %o', friendlyId, params);
|
|
195
|
-
return (yield (0,
|
|
212
|
+
return (yield (0, personalize_2.personalize)(Object.assign({ channel: this.config.channel || 'WEB', currency: (_b = this.config.currency) !== null && _b !== void 0 ? _b : 'USD', friendlyId,
|
|
196
213
|
params,
|
|
197
214
|
language, pageVariantIds: variantIds }, (geo && { geo })), { timeout }));
|
|
198
215
|
});
|
package/dist/esm/index.js
CHANGED
|
@@ -22,3 +22,6 @@ export { FEaaSClientWrapper, FEaaSServerWrapper, BYOCClientWrapper, BYOCServerWr
|
|
|
22
22
|
export { FEaaSWrapper };
|
|
23
23
|
export { BYOCWrapper };
|
|
24
24
|
export { Image, Text, DateField, FEaaSComponent, fetchFEaaSComponentServerProps, BYOCComponent, getDesignLibraryStylesheetLinks, File, DesignLibrary, DesignLibraryApp, DefaultEmptyFieldEditingComponentImage, DefaultEmptyFieldEditingComponentText, SitecoreProvider, SitecoreProviderReactContext, withSitecore, useSitecore, withEditorChromes, withAppPlaceholder, withPlaceholder, withDatasourceCheck, withFieldMetadata, withEmptyFieldEditingComponent, EditingScripts, Form, ClientEditingChromesUpdate, AppPlaceholder, renderEmptyPlaceholder, } from '@sitecore-content-sdk/react';
|
|
25
|
+
export { initContentSdk } from '@sitecore-content-sdk/core';
|
|
26
|
+
export { personalizeProxyAdapter } from './initialization/proxy/personalize-adapter';
|
|
27
|
+
export { analyticsProxyAdapter } from './initialization/proxy/analytics-adapter';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { COOKIE_NAME_PREFIX, fetchClientIdFromEdgeProxy, getDefaultCookieAttributes, } from '@sitecore-content-sdk/analytics-core/internal';
|
|
11
|
+
import { getAnalyticsPlugin, } from '@sitecore-content-sdk/analytics-core/internal';
|
|
12
|
+
import { getCoreContext } from '@sitecore-content-sdk/core';
|
|
13
|
+
/**
|
|
14
|
+
* Creates a proxy-based analytics adapter that reads and writes the visitor ID
|
|
15
|
+
* using cookies and can resolve a new client ID from the Edge proxy when needed.
|
|
16
|
+
* The adapter also provides access to the current URL search parameters.
|
|
17
|
+
* @param {NextRequest} request - The Next.js request object.
|
|
18
|
+
* @param {NextResponse} response - The Next.js response object.
|
|
19
|
+
* @returns {AnalyticsProxyAdapter} The analytics proxy adapter.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export function analyticsProxyAdapter(request, response) {
|
|
23
|
+
return {
|
|
24
|
+
type: 'proxy',
|
|
25
|
+
getClientId: () => {
|
|
26
|
+
return getClientId(request);
|
|
27
|
+
},
|
|
28
|
+
setClientId: () => __awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
var _a;
|
|
30
|
+
const coreConfig = getCoreContext().config;
|
|
31
|
+
const analyticsOptions = getAnalyticsPlugin().options;
|
|
32
|
+
const cookieOptions = analyticsOptions.cookies;
|
|
33
|
+
const clientIdCookieName = cookieOptions.name;
|
|
34
|
+
const legacyClientIdCookieName = `${COOKIE_NAME_PREFIX}${coreConfig.contextId}`;
|
|
35
|
+
const cookieAttributes = getDefaultCookieAttributes(cookieOptions.expiryDays, cookieOptions.domain);
|
|
36
|
+
const legacyClientIdCookie = (_a = request.cookies.get(legacyClientIdCookieName)) === null || _a === void 0 ? void 0 : _a.value;
|
|
37
|
+
if (legacyClientIdCookie) {
|
|
38
|
+
request.cookies.set(clientIdCookieName, legacyClientIdCookie);
|
|
39
|
+
response.cookies.set(clientIdCookieName, legacyClientIdCookie, Object.assign(Object.assign({}, cookieAttributes), { sameSite: 'none' }));
|
|
40
|
+
request.cookies.delete(legacyClientIdCookieName);
|
|
41
|
+
response.cookies.delete(legacyClientIdCookieName);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const clientIdCookie = getClientId(request);
|
|
45
|
+
let newClientIdCookieValue;
|
|
46
|
+
if (!clientIdCookie) {
|
|
47
|
+
const cookieValues = yield fetchClientIdFromEdgeProxy(coreConfig.edgeUrl, coreConfig.contextId, analyticsOptions.timeout);
|
|
48
|
+
newClientIdCookieValue = cookieValues.clientId;
|
|
49
|
+
analyticsOptions.visitorIds = cookieValues;
|
|
50
|
+
}
|
|
51
|
+
else
|
|
52
|
+
newClientIdCookieValue = clientIdCookie;
|
|
53
|
+
if (!clientIdCookie)
|
|
54
|
+
request.cookies.set(clientIdCookieName, newClientIdCookieValue);
|
|
55
|
+
const attributes = getDefaultCookieAttributes(cookieOptions.expiryDays, cookieOptions.domain);
|
|
56
|
+
response.cookies.set(clientIdCookieName, newClientIdCookieValue, Object.assign(Object.assign({}, attributes), { sameSite: 'none' }));
|
|
57
|
+
}),
|
|
58
|
+
location: {
|
|
59
|
+
getSearchParams: () => {
|
|
60
|
+
return request.nextUrl.searchParams.toString();
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Retrieves the client ID from the request cookies.
|
|
67
|
+
* @param {NextRequest} request
|
|
68
|
+
* @returns {string | null} The client ID or null if not found.
|
|
69
|
+
* @internal
|
|
70
|
+
*/
|
|
71
|
+
export const getClientId = (request) => {
|
|
72
|
+
var _a;
|
|
73
|
+
const clientIdCookieName = getAnalyticsPlugin().options.cookies.name;
|
|
74
|
+
return ((_a = request.cookies.get(clientIdCookieName)) === null || _a === void 0 ? void 0 : _a.value) || null;
|
|
75
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
3
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
4
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
5
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
6
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
|
+
});
|
|
9
|
+
};
|
|
10
|
+
import { COOKIE_NAME_PREFIX, getDefaultCookieAttributes, } from '@sitecore-content-sdk/analytics-core/internal';
|
|
11
|
+
import { getAnalyticsPlugin } from '@sitecore-content-sdk/analytics-core/internal';
|
|
12
|
+
import { getCoreContext } from '@sitecore-content-sdk/core';
|
|
13
|
+
import { fetchProfileIdFromEdgeProxy, getPersonalizePlugin, } from '@sitecore-content-sdk/personalize/internal';
|
|
14
|
+
import { getClientId } from './analytics-adapter';
|
|
15
|
+
/**
|
|
16
|
+
* Creates a proxy-based personalize adapter that reads and writes the profile ID
|
|
17
|
+
* using cookies and can resolve a new profile ID from the Edge proxy when needed.
|
|
18
|
+
* The adapter also provides access user agent from the request headers.
|
|
19
|
+
* @param {NextRequest} request - The HTTP request object.
|
|
20
|
+
* @param {NextResponse} response - The HTTP response object.
|
|
21
|
+
* @returns {PersonalizeProxyAdapter} The personalize proxy adapter.
|
|
22
|
+
* @public
|
|
23
|
+
*/
|
|
24
|
+
export function personalizeProxyAdapter(request, response) {
|
|
25
|
+
return {
|
|
26
|
+
type: 'proxy',
|
|
27
|
+
getUserAgent: () => request.headers.get('user-agent') || undefined,
|
|
28
|
+
getProfileId: () => {
|
|
29
|
+
return getProfileId(request);
|
|
30
|
+
},
|
|
31
|
+
setProfileId: () => __awaiter(this, void 0, void 0, function* () {
|
|
32
|
+
var _a;
|
|
33
|
+
const coreConfig = getCoreContext().config;
|
|
34
|
+
const cookieOptions = getAnalyticsPlugin().options.cookies;
|
|
35
|
+
const personalizePlugin = getPersonalizePlugin();
|
|
36
|
+
const profileIdCookieName = personalizePlugin.options.cookies.name;
|
|
37
|
+
const cookieAttributes = getDefaultCookieAttributes(cookieOptions.expiryDays, cookieOptions.domain);
|
|
38
|
+
const legacyProfileIdCookieName = `${COOKIE_NAME_PREFIX}${coreConfig.contextId}_personalize`;
|
|
39
|
+
const legacyProfileIdCookie = (_a = request.cookies.get(legacyProfileIdCookieName)) === null || _a === void 0 ? void 0 : _a.value;
|
|
40
|
+
if (legacyProfileIdCookie) {
|
|
41
|
+
request.cookies.set(profileIdCookieName, legacyProfileIdCookie);
|
|
42
|
+
response.cookies.set(profileIdCookieName, legacyProfileIdCookie, Object.assign(Object.assign({}, cookieAttributes), { sameSite: 'none' }));
|
|
43
|
+
request.cookies.delete(legacyProfileIdCookieName);
|
|
44
|
+
response.cookies.delete(legacyProfileIdCookieName);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
const cookiesValuesFromEdgeServer = getAnalyticsPlugin().options.visitorIds;
|
|
48
|
+
const profileIdCookie = getProfileId(request);
|
|
49
|
+
const clientIdCookie = getClientId(request);
|
|
50
|
+
let newProfileIdCookieValue;
|
|
51
|
+
if (profileIdCookie)
|
|
52
|
+
newProfileIdCookieValue = profileIdCookie;
|
|
53
|
+
else if (cookiesValuesFromEdgeServer === null || cookiesValuesFromEdgeServer === void 0 ? void 0 : cookiesValuesFromEdgeServer.profileId)
|
|
54
|
+
newProfileIdCookieValue = cookiesValuesFromEdgeServer.profileId;
|
|
55
|
+
else if (clientIdCookie) {
|
|
56
|
+
const profileIdCookieValueFromEdgeProxy = yield fetchProfileIdFromEdgeProxy(clientIdCookie, coreConfig.contextId, coreConfig.edgeUrl);
|
|
57
|
+
newProfileIdCookieValue = profileIdCookieValueFromEdgeProxy;
|
|
58
|
+
}
|
|
59
|
+
else
|
|
60
|
+
return;
|
|
61
|
+
if (!profileIdCookie)
|
|
62
|
+
request.cookies.set(profileIdCookieName, newProfileIdCookieValue);
|
|
63
|
+
const attributes = getDefaultCookieAttributes(cookieOptions.expiryDays, cookieOptions.domain);
|
|
64
|
+
response.cookies.set(profileIdCookieName, newProfileIdCookieValue, Object.assign(Object.assign({}, attributes), { sameSite: 'none' }));
|
|
65
|
+
}),
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Retrieves the profile ID from request cookies.
|
|
70
|
+
* @param {NextRequest} request
|
|
71
|
+
* @returns {string | null} The profile ID or null if not found.
|
|
72
|
+
* @internal
|
|
73
|
+
*/
|
|
74
|
+
function getProfileId(request) {
|
|
75
|
+
var _a;
|
|
76
|
+
const profileIdCookieName = getPersonalizePlugin().options.cookies.name;
|
|
77
|
+
return ((_a = request.cookies.get(profileIdCookieName)) === null || _a === void 0 ? void 0 : _a.value) || null;
|
|
78
|
+
}
|
|
@@ -7,7 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
import { constants } from '@sitecore-content-sdk/core';
|
|
10
11
|
import { SiteResolver } from '../site';
|
|
12
|
+
const { ERROR_MESSAGES } = constants;
|
|
11
13
|
/**
|
|
12
14
|
* Middleware for handling robots.txt requests in a Next.js application.
|
|
13
15
|
* @public
|
|
@@ -34,7 +36,7 @@ export class RobotsMiddleware {
|
|
|
34
36
|
res.status(200).send(robotsContent);
|
|
35
37
|
}
|
|
36
38
|
catch (_b) {
|
|
37
|
-
res.status(500).send(
|
|
39
|
+
res.status(500).send(`Internal Server Error. ${ERROR_MESSAGES.CONTACT_SUPPORT}`);
|
|
38
40
|
}
|
|
39
41
|
});
|
|
40
42
|
}
|
|
@@ -7,7 +7,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
7
7
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
|
+
import { constants } from '@sitecore-content-sdk/core';
|
|
10
11
|
import { SiteResolver } from '../site';
|
|
12
|
+
const { ERROR_MESSAGES } = constants;
|
|
11
13
|
/**
|
|
12
14
|
* Middleware for handling sitemap requests in a Next.js application.
|
|
13
15
|
* Encapsulates all HTTP-related logic for sitemap generation and delivery.
|
|
@@ -38,7 +40,7 @@ export class SitemapMiddleware {
|
|
|
38
40
|
res.redirect('/404');
|
|
39
41
|
}
|
|
40
42
|
else {
|
|
41
|
-
res.status(500).send(
|
|
43
|
+
res.status(500).send(`Internal Server Error. ${ERROR_MESSAGES.CONTACT_SUPPORT}`);
|
|
42
44
|
}
|
|
43
45
|
}
|
|
44
46
|
});
|
|
@@ -9,9 +9,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import { PersonalizeService, getPersonalizedRewrite, CdpHelper, DEFAULT_VARIANT, } from '@sitecore-content-sdk/content/personalize';
|
|
11
11
|
import { ProxyBase, REWRITE_HEADER_NAME } from './proxy';
|
|
12
|
-
import {
|
|
13
|
-
import { personalize } from '@sitecore-
|
|
12
|
+
import { initContentSdk } from '@sitecore-content-sdk/core';
|
|
13
|
+
import { personalize } from '@sitecore-content-sdk/personalize';
|
|
14
14
|
import debug from '../debug';
|
|
15
|
+
import { analyticsPlugin } from '@sitecore-content-sdk/analytics-core';
|
|
16
|
+
import { analyticsProxyAdapter } from '../initialization/proxy/analytics-adapter';
|
|
17
|
+
import { personalizeServerPlugin } from '@sitecore-content-sdk/personalize';
|
|
18
|
+
import { personalizeProxyAdapter } from '../initialization/proxy/personalize-adapter';
|
|
15
19
|
/**
|
|
16
20
|
* Proxy / handler to support Sitecore Personalize
|
|
17
21
|
* @public
|
|
@@ -87,7 +91,7 @@ export class PersonalizeProxy extends ProxyBase {
|
|
|
87
91
|
const executions = this.getPersonalizeExecutions(personalizeInfo, language);
|
|
88
92
|
const identifiedVariantIds = [];
|
|
89
93
|
yield Promise.all(executions.map((execution) => this.personalize(Object.assign({ friendlyId: execution.friendlyId, variantIds: execution.variantIds, params,
|
|
90
|
-
language, timeout: cdpTimeout }, (geo && { geo }))
|
|
94
|
+
language, timeout: cdpTimeout }, (geo && { geo }))).then((personalization) => {
|
|
91
95
|
const variantId = personalization.variantId;
|
|
92
96
|
if (variantId) {
|
|
93
97
|
if (!execution.variantIds.includes(variantId)) {
|
|
@@ -171,22 +175,35 @@ export class PersonalizeProxy extends ProxyBase {
|
|
|
171
175
|
}
|
|
172
176
|
initPersonalizeServer(_a) {
|
|
173
177
|
return __awaiter(this, arguments, void 0, function* ({ hostname, siteName, request, response, }) {
|
|
174
|
-
yield
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
178
|
+
yield initContentSdk({
|
|
179
|
+
config: {
|
|
180
|
+
contextId: this.config.contextId,
|
|
181
|
+
edgeUrl: this.config.edgeUrl,
|
|
182
|
+
siteName,
|
|
183
|
+
},
|
|
184
|
+
plugins: [
|
|
185
|
+
analyticsPlugin({
|
|
186
|
+
options: {
|
|
187
|
+
enableCookie: true,
|
|
188
|
+
cookieDomain: hostname,
|
|
189
|
+
},
|
|
190
|
+
adapter: analyticsProxyAdapter(request, response),
|
|
191
|
+
}),
|
|
192
|
+
personalizeServerPlugin({
|
|
193
|
+
options: {
|
|
194
|
+
enablePersonalizeCookie: true,
|
|
195
|
+
},
|
|
196
|
+
adapter: personalizeProxyAdapter(request, response),
|
|
197
|
+
}),
|
|
198
|
+
],
|
|
199
|
+
});
|
|
183
200
|
});
|
|
184
201
|
}
|
|
185
|
-
personalize(_a
|
|
186
|
-
return __awaiter(this, arguments, void 0, function* ({ params, friendlyId, language, timeout, variantIds, geo, }
|
|
202
|
+
personalize(_a) {
|
|
203
|
+
return __awaiter(this, arguments, void 0, function* ({ params, friendlyId, language, timeout, variantIds, geo, }) {
|
|
187
204
|
var _b;
|
|
188
205
|
debug.personalize('executing experience for %s %o', friendlyId, params);
|
|
189
|
-
return (yield personalize(
|
|
206
|
+
return (yield personalize(Object.assign({ channel: this.config.channel || 'WEB', currency: (_b = this.config.currency) !== null && _b !== void 0 ? _b : 'USD', friendlyId,
|
|
190
207
|
params,
|
|
191
208
|
language, pageVariantIds: variantIds }, (geo && { geo })), { timeout }));
|
|
192
209
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-content-sdk/nextjs",
|
|
3
|
-
"version": "2.0.0-canary.
|
|
3
|
+
"version": "2.0.0-canary.13",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"url": "https://github.com/sitecore/content-sdk/issues"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@sitecore-
|
|
36
|
-
"@sitecore-
|
|
35
|
+
"@sitecore-content-sdk/analytics-core": "2.0.0-canary.13",
|
|
36
|
+
"@sitecore-content-sdk/personalize": "2.0.0-canary.13",
|
|
37
37
|
"@stylistic/eslint-plugin": "^5.2.2",
|
|
38
38
|
"@testing-library/dom": "^10.4.0",
|
|
39
39
|
"@testing-library/react": "^16.3.0",
|
|
@@ -76,9 +76,9 @@
|
|
|
76
76
|
"typescript": "~5.8.3"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
|
79
|
-
"@sitecore-
|
|
80
|
-
"@sitecore-
|
|
81
|
-
"@sitecore-
|
|
79
|
+
"@sitecore-content-sdk/analytics-core": "2.0.0-canary.12",
|
|
80
|
+
"@sitecore-content-sdk/events": "2.0.0-canary.12",
|
|
81
|
+
"@sitecore-content-sdk/personalize": "2.0.0-canary.12",
|
|
82
82
|
"next": "^16.1.1",
|
|
83
83
|
"react": "^19.2.1",
|
|
84
84
|
"react-dom": "^19.2.1",
|
|
@@ -91,9 +91,9 @@
|
|
|
91
91
|
},
|
|
92
92
|
"dependencies": {
|
|
93
93
|
"@babel/parser": "^7.27.2",
|
|
94
|
-
"@sitecore-content-sdk/content": "2.0.0-canary.
|
|
95
|
-
"@sitecore-content-sdk/core": "2.0.0-canary.
|
|
96
|
-
"@sitecore-content-sdk/react": "2.0.0-canary.
|
|
94
|
+
"@sitecore-content-sdk/content": "2.0.0-canary.13",
|
|
95
|
+
"@sitecore-content-sdk/core": "2.0.0-canary.13",
|
|
96
|
+
"@sitecore-content-sdk/react": "2.0.0-canary.13",
|
|
97
97
|
"recast": "^0.23.11",
|
|
98
98
|
"regex-parser": "^2.3.1",
|
|
99
99
|
"sync-disk-cache": "^2.1.0"
|
|
@@ -177,7 +177,7 @@
|
|
|
177
177
|
},
|
|
178
178
|
"description": "",
|
|
179
179
|
"types": "types/index.d.ts",
|
|
180
|
-
"gitHead": "
|
|
180
|
+
"gitHead": "414b181508e47177e1818381ad4f555c189b9e4a",
|
|
181
181
|
"files": [
|
|
182
182
|
"dist",
|
|
183
183
|
"types",
|
package/types/index.d.ts
CHANGED
|
@@ -24,4 +24,10 @@ export { FEaaSClientWrapper, FEaaSServerWrapper, BYOCClientWrapper, BYOCServerWr
|
|
|
24
24
|
export { FEaaSWrapper };
|
|
25
25
|
export { BYOCWrapper };
|
|
26
26
|
export { ComponentMap, Image, ImageField, ImageFieldValue, ImageProps, LinkField, LinkFieldValue, Text, TextField, DateField, FEaaSComponent, FEaaSComponentProps, FEaaSComponentParams, fetchFEaaSComponentServerProps, BYOCComponentParams, BYOCComponent, BYOCComponentProps, getDesignLibraryStylesheetLinks, File, FileField, RichTextField, DesignLibrary, DesignLibraryApp, DefaultEmptyFieldEditingComponentImage, DefaultEmptyFieldEditingComponentText, PlaceholderComponentProps, SitecoreProvider, SitecoreProviderState, SitecoreProviderReactContext, withSitecore, useSitecore, withEditorChromes, withAppPlaceholder, withPlaceholder, withDatasourceCheck, ImageSizeParameters, withFieldMetadata, withEmptyFieldEditingComponent, EditingScripts, Form, ClientEditingChromesUpdate, AppPlaceholder, AppPlaceholderProps, renderEmptyPlaceholder, } from '@sitecore-content-sdk/react';
|
|
27
|
+
export { initContentSdk } from '@sitecore-content-sdk/core';
|
|
28
|
+
export type { PersonalizeGeoData } from './proxy/personalize-proxy';
|
|
29
|
+
export type { PersonalizeProxyAdapter } from './initialization/proxy/personalize-adapter';
|
|
30
|
+
export { personalizeProxyAdapter } from './initialization/proxy/personalize-adapter';
|
|
31
|
+
export type { AnalyticsProxyAdapter } from './initialization/proxy/analytics-adapter';
|
|
32
|
+
export { analyticsProxyAdapter } from './initialization/proxy/analytics-adapter';
|
|
27
33
|
//# sourceMappingURL=index.d.ts.map
|
package/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-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xD,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,GAClB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,CAAC;AAEvB,OAAO,EACL,YAAY,EACZ,KAAK,EACL,UAAU,EACV,eAAe,EACf,UAAU,EACV,SAAS,EACT,cAAc,EACd,IAAI,EACJ,SAAS,EACT,SAAS,EACT,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,8BAA8B,EAC9B,mBAAmB,EACnB,aAAa,EACb,kBAAkB,EAClB,+BAA+B,EAC/B,IAAI,EACJ,SAAS,EACT,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,sCAAsC,EACtC,qCAAqC,EACrC,yBAAyB,EACzB,gBAAgB,EAChB,qBAAqB,EACrB,4BAA4B,EAC5B,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,8BAA8B,EAC9B,cAAc,EACd,IAAI,EACJ,0BAA0B,EAC1B,cAAc,EACd,mBAAmB,EACnB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,YAAY,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,YAAY,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,YAAY,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AnalyticsAdapter } from '@sitecore-content-sdk/analytics-core/internal';
|
|
2
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
3
|
+
/**
|
|
4
|
+
* Defines the AnalyticsProxyAdapter.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface AnalyticsProxyAdapter extends AnalyticsAdapter {
|
|
8
|
+
/**
|
|
9
|
+
* The type of the adapter.
|
|
10
|
+
*/
|
|
11
|
+
type: 'proxy';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Creates a proxy-based analytics adapter that reads and writes the visitor ID
|
|
15
|
+
* using cookies and can resolve a new client ID from the Edge proxy when needed.
|
|
16
|
+
* The adapter also provides access to the current URL search parameters.
|
|
17
|
+
* @param {NextRequest} request - The Next.js request object.
|
|
18
|
+
* @param {NextResponse} response - The Next.js response object.
|
|
19
|
+
* @returns {AnalyticsProxyAdapter} The analytics proxy adapter.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare function analyticsProxyAdapter(request: NextRequest, response: NextResponse): AnalyticsProxyAdapter;
|
|
23
|
+
/**
|
|
24
|
+
* Retrieves the client ID from the request cookies.
|
|
25
|
+
* @param {NextRequest} request
|
|
26
|
+
* @returns {string | null} The client ID or null if not found.
|
|
27
|
+
* @internal
|
|
28
|
+
*/
|
|
29
|
+
export declare const getClientId: (request: NextRequest) => string | null;
|
|
30
|
+
//# sourceMappingURL=analytics-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analytics-adapter.d.ts","sourceRoot":"","sources":["../../../src/initialization/proxy/analytics-adapter.ts"],"names":[],"mappings":"AAKA,OAAO,EAEL,gBAAgB,EACjB,MAAM,+CAA+C,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAExD;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACnC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,YAAY,GACrB,qBAAqB,CA2DvB;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,SAAS,WAAW,KAAG,MAAM,GAAG,IAI3D,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { PersonalizeAdapter } from '@sitecore-content-sdk/personalize/internal';
|
|
2
|
+
import { NextRequest, NextResponse } from 'next/server';
|
|
3
|
+
/**
|
|
4
|
+
* Defines the PersonalizeProxyAdapter.
|
|
5
|
+
* @public
|
|
6
|
+
*/
|
|
7
|
+
export interface PersonalizeProxyAdapter extends Required<PersonalizeAdapter> {
|
|
8
|
+
/**
|
|
9
|
+
* The type of the adapter.
|
|
10
|
+
*/
|
|
11
|
+
type: 'proxy';
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Creates a proxy-based personalize adapter that reads and writes the profile ID
|
|
15
|
+
* using cookies and can resolve a new profile ID from the Edge proxy when needed.
|
|
16
|
+
* The adapter also provides access user agent from the request headers.
|
|
17
|
+
* @param {NextRequest} request - The HTTP request object.
|
|
18
|
+
* @param {NextResponse} response - The HTTP response object.
|
|
19
|
+
* @returns {PersonalizeProxyAdapter} The personalize proxy adapter.
|
|
20
|
+
* @public
|
|
21
|
+
*/
|
|
22
|
+
export declare function personalizeProxyAdapter(request: NextRequest, response: NextResponse): PersonalizeProxyAdapter;
|
|
23
|
+
//# sourceMappingURL=personalize-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"personalize-adapter.d.ts","sourceRoot":"","sources":["../../../src/initialization/proxy/personalize-adapter.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGxD;;;GAGG;AACH,MAAM,WAAW,uBAAwB,SAAQ,QAAQ,CAAC,kBAAkB,CAAC;IAC3E;;OAEG;IACH,IAAI,EAAE,OAAO,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,YAAY,GACrB,uBAAuB,CA4DzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"robots-middleware.d.ts","sourceRoot":"","sources":["../../src/middleware/robots-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"robots-middleware.d.ts","sourceRoot":"","sources":["../../src/middleware/robots-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE,OAAO,EAAE,QAAQ,EAAgB,MAAM,SAAS,CAAC;AAIjD;;;GAGG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,YAAY,CAAe;gBAEvB,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE;IAKrD,UAAU,UAIiB,cAAc,OAAO,eAAe,KAAG,OAAO,CAAC,IAAI,CAAC;YAAjE,OAAO;CAiBtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sitemap-middleware.d.ts","sourceRoot":"","sources":["../../src/middleware/sitemap-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,cAAc,EAAqB,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"sitemap-middleware.d.ts","sourceRoot":"","sources":["../../src/middleware/sitemap-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AACvD,OAAO,EAAE,cAAc,EAAqB,MAAM,sCAAsC,CAAC;AAEzF,OAAO,EAAE,QAAQ,EAAgB,MAAM,SAAS,CAAC;AAIjD;;;;GAIG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAiB;IAC/B,OAAO,CAAC,YAAY,CAAe;gBAEvB,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,QAAQ,EAAE;IAKrD,UAAU,UAIiB,cAAc,OAAO,eAAe,KAAG,OAAO,CAAC,IAAI,CAAC;YAAjE,OAAO;CAoBtB"}
|
|
@@ -4,6 +4,7 @@ import { ProxyBase, ProxyBaseConfig } from './proxy';
|
|
|
4
4
|
import { SitecoreConfig } from '../config';
|
|
5
5
|
/**
|
|
6
6
|
* Represents the geolocation data used for personalization
|
|
7
|
+
* @public
|
|
7
8
|
*/
|
|
8
9
|
export type PersonalizeGeoData = {
|
|
9
10
|
city?: string;
|
|
@@ -66,7 +67,7 @@ export declare class PersonalizeProxy extends ProxyBase {
|
|
|
66
67
|
timeout?: number;
|
|
67
68
|
variantIds?: string[];
|
|
68
69
|
geo?: PersonalizeGeoData;
|
|
69
|
-
}
|
|
70
|
+
}): Promise<{
|
|
70
71
|
variantId: string;
|
|
71
72
|
}>;
|
|
72
73
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"personalize-proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/personalize-proxy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACxD,OAAO,EACL,kBAAkB,EAElB,eAAe,EAGhB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,eAAe,EAAuB,MAAM,SAAS,CAAC;AAG1E,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"personalize-proxy.d.ts","sourceRoot":"","sources":["../../src/proxy/personalize-proxy.ts"],"names":[],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