@sitecore-content-sdk/nextjs 2.1.0-canary.12 → 2.1.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.
@@ -1,8 +1,20 @@
1
1
  "use strict";
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
2
13
  Object.defineProperty(exports, "__esModule", { value: true });
3
14
  exports.SitecoreNextjsClient = void 0;
4
15
  const client_1 = require("@sitecore-content-sdk/content/client");
5
16
  const component_props_service_1 = require("../services/component-props-service");
17
+ const constants_1 = require("../editing/constants");
6
18
  const site_1 = require("@sitecore-content-sdk/content/site");
7
19
  const personalize_1 = require("@sitecore-content-sdk/content/personalize");
8
20
  /**
@@ -54,7 +66,8 @@ class SitecoreNextjsClient extends client_1.SitecoreClient {
54
66
  * @returns {Page} preview page for Design Library
55
67
  */
56
68
  async getDesignLibraryData(designLibData, fetchOptions) {
57
- return super.getDesignLibraryData(designLibData, fetchOptions);
69
+ const merged = this.mergePreviewAuthorization(designLibData, fetchOptions);
70
+ return super.getDesignLibraryData(merged.previewData, merged.fetchOptions);
58
71
  }
59
72
  /**
60
73
  * Retrieves preview page and layout details
@@ -62,7 +75,31 @@ class SitecoreNextjsClient extends client_1.SitecoreClient {
62
75
  * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests (like retries and fetch)
63
76
  */
64
77
  async getPreview(previewData, fetchOptions) {
65
- return super.getPreview(previewData, fetchOptions);
78
+ const merged = this.mergePreviewAuthorization(previewData, fetchOptions);
79
+ return super.getPreview(merged.previewData, merged.fetchOptions);
80
+ }
81
+ /**
82
+ * **NOTE**: App Router only.
83
+ *
84
+ * Builds the inputs for the Preview mode based on incoming request headers.
85
+ *
86
+ * - Reads editing preview data from the `x-sitecore-editing-params` header.
87
+ * - Reads the `authorization` header from the request and merges it as
88
+ * `Authorization` into `fetchOptions.headers`. The request value takes
89
+ * precedence over any `Authorization` (case-insensitive) supplied via
90
+ * `extra.headers`; existing case-variant keys are removed so the result
91
+ * never contains duplicates. An empty `Authorization` is never emitted.
92
+ *
93
+ * Other headers present on the input are ignored. Non-`headers` fields of
94
+ * `extra` are preserved as-is. Extra headers are merged into `fetchOptions.headers`.
95
+ * @param {Headers} headers - The headers from the incoming request.
96
+ * @param {FetchOptions} [extra] - Optional base fetch options to merge with.
97
+ * @returns The `previewData` and `fetchOptions` to forward
98
+ */
99
+ getPreviewInputs(headers, extra) {
100
+ const previewData = this.parsePreviewDataFromHeader(headers);
101
+ const fetchOptions = this.mergeAuthorizationHeader(headers, extra);
102
+ return { previewData, fetchOptions };
66
103
  }
67
104
  /**
68
105
  * Generates static params for the Next.js App Router from Sitecore routes.
@@ -145,5 +182,84 @@ class SitecoreNextjsClient extends client_1.SitecoreClient {
145
182
  getComponentPropsService() {
146
183
  return new component_props_service_1.ComponentPropsService();
147
184
  }
185
+ /**
186
+ * **NOTE**: Pages Router only.
187
+ *
188
+ * Merges the authorization header from the preview data into the fetch options.
189
+ * The `authorization` field is always stripped from the returned preview data
190
+ * to avoid leaking it back into request payloads.
191
+ *
192
+ * The value stashed in preview data takes precedence over any caller-supplied
193
+ * `Authorization` header. Existing `Authorization` keys are removed
194
+ * case-insensitively before the merged value is set, so the result never
195
+ * contains duplicate keys.
196
+ * @param {PreviewData} previewData - The preview data to merge the authorization header from.
197
+ * @param {FetchOptions} [fetchOptions] - The fetch options to merge the authorization header into.
198
+ * @returns The preview data and fetch options with the authorization header merged.
199
+ */
200
+ mergePreviewAuthorization(previewData, fetchOptions) {
201
+ if (!previewData || typeof previewData !== 'object') {
202
+ return { previewData: previewData, fetchOptions };
203
+ }
204
+ const _a = previewData, { authorization } = _a, rest = __rest(_a, ["authorization"]);
205
+ if (!authorization) {
206
+ return { previewData: rest, fetchOptions };
207
+ }
208
+ const mergedHeaders = this.applyAuthorizationHeader(fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.headers, authorization);
209
+ return { previewData: rest, fetchOptions: Object.assign(Object.assign({}, fetchOptions), { headers: mergedHeaders }) };
210
+ }
211
+ /**
212
+ * Reads and JSON-parses the editing preview data propagated via
213
+ * `EDITING_PARAMS_HEADER`. Returns an empty object when the header is
214
+ * missing or its value is not valid JSON.
215
+ * @param {Headers} headers - The incoming request headers.
216
+ * @returns {PreviewData} The parsed preview data, or an empty object.
217
+ */
218
+ parsePreviewDataFromHeader(headers) {
219
+ const packed = headers.get(constants_1.EDITING_PARAMS_HEADER);
220
+ if (!packed)
221
+ return {};
222
+ try {
223
+ return JSON.parse(packed);
224
+ }
225
+ catch (_a) {
226
+ return {};
227
+ }
228
+ }
229
+ /**
230
+ * Builds `FetchOptions` by merging the `Authorization` header from the
231
+ * incoming request headers into `extra`. The request value takes precedence
232
+ * over any caller-supplied `Authorization` header (case-insensitive). An
233
+ * empty `Authorization` is never emitted.
234
+ * @param {Headers} headers - The incoming request headers.
235
+ * @param {FetchOptions} [extra] - Optional base fetch options to merge with.
236
+ * @returns {FetchOptions} The merged fetch options.
237
+ */
238
+ mergeAuthorizationHeader(headers, extra) {
239
+ const authorization = headers.get('authorization');
240
+ const mergedHeaders = this.applyAuthorizationHeader(extra === null || extra === void 0 ? void 0 : extra.headers, authorization);
241
+ return Object.assign(Object.assign({}, extra), { headers: mergedHeaders });
242
+ }
243
+ /**
244
+ * Returns a shallow-cloned headers record with `Authorization` set to
245
+ * `authorization` (when truthy). Any pre-existing `Authorization` key is
246
+ * removed case-insensitively to avoid emitting both `authorization` and
247
+ * `Authorization` in the same record.
248
+ * @param {Record<string, string> | undefined} headers - Existing headers, if any.
249
+ * @param {string | null | undefined} authorization - The authorization value to apply, or null/undefined to leave headers unchanged.
250
+ * @returns {Record<string, string>} The merged headers.
251
+ */
252
+ applyAuthorizationHeader(headers, authorization) {
253
+ const merged = Object.assign({}, (headers !== null && headers !== void 0 ? headers : {}));
254
+ if (!authorization)
255
+ return merged;
256
+ for (const key of Object.keys(merged)) {
257
+ if (key.toLowerCase() === 'authorization') {
258
+ delete merged[key];
259
+ }
260
+ }
261
+ merged.Authorization = authorization;
262
+ return merged;
263
+ }
148
264
  }
149
265
  exports.SitecoreNextjsClient = SitecoreNextjsClient;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.EDITING_PASS_THROUGH_HEADERS = exports.QUERY_PARAM_VERCEL_SET_BYPASS_COOKIE = exports.QUERY_PARAM_VERCEL_PROTECTION_BYPASS = void 0;
3
+ exports.EDITING_PARAMS_HEADER = exports.EDITING_PASS_THROUGH_HEADERS = exports.QUERY_PARAM_VERCEL_SET_BYPASS_COOKIE = exports.QUERY_PARAM_VERCEL_PROTECTION_BYPASS = void 0;
4
4
  exports.QUERY_PARAM_VERCEL_PROTECTION_BYPASS = 'x-vercel-protection-bypass';
5
5
  exports.QUERY_PARAM_VERCEL_SET_BYPASS_COOKIE = 'x-vercel-set-bypass-cookie';
6
6
  /**
@@ -8,3 +8,8 @@ exports.QUERY_PARAM_VERCEL_SET_BYPASS_COOKIE = 'x-vercel-set-bypass-cookie';
8
8
  * Note these are in lowercase format to match expected `IncomingHttpHeaders`.
9
9
  */
10
10
  exports.EDITING_PASS_THROUGH_HEADERS = ['authorization', 'cookie'];
11
+ /**
12
+ * Header used to propagate editing preview parameters from the editing render
13
+ * route handler to the Next.js page when running in App Router.
14
+ */
15
+ exports.EDITING_PARAMS_HEADER = 'x-sitecore-editing-params';
@@ -87,7 +87,7 @@ class EditingRenderMiddleware extends render_middleware_1.RenderMiddlewareBase {
87
87
  });
88
88
  }
89
89
  const previewDataParams = (0, utils_2.mapEditingParams)(query);
90
- res.setPreviewData(Object.assign(Object.assign(Object.assign({}, previewDataParams), allowedQueryParams), { variantIds: (_c = previewDataParams.variantIds) === null || _c === void 0 ? void 0 : _c.split(',') }), {
90
+ res.setPreviewData(Object.assign(Object.assign(Object.assign({}, previewDataParams), allowedQueryParams), { variantIds: (_c = previewDataParams.variantIds) === null || _c === void 0 ? void 0 : _c.split(','), authorization: headers.authorization }), {
91
91
  maxAge: 3,
92
92
  });
93
93
  // Set Preview mode identifier cookie, if the page is rendered in Sitecore Preview mode
@@ -12,6 +12,7 @@ const layout_1 = require("@sitecore-content-sdk/content/layout");
12
12
  const utils_1 = require("../utils/utils");
13
13
  const headers_1 = require("next/headers");
14
14
  const utils_2 = require("../editing/utils");
15
+ const constants_1 = require("../editing/constants");
15
16
  const site_1 = require("@sitecore-content-sdk/content/site");
16
17
  const debug_1 = __importDefault(require("../debug"));
17
18
  /**
@@ -150,11 +151,17 @@ const createEditingRenderRouteHandlers = (options) => {
150
151
  const convertedCookies = cookieStore.getAll().map((c) => `${c.name}=${c.value}`);
151
152
  try {
152
153
  debug_1.default.editing('fetching page route for %s', query.route);
153
- // Get query string parameters to propagate on subsequent requests (e.g. for deployment protection bypass)
154
- // Additionally ,in app router preview data is passed through query string instead of preview data cookie
155
- const propagatedQsParams = Object.assign(Object.assign(Object.assign({}, (0, utils_2.getQueryParamsForPropagation)(query)), (0, utils_2.mapEditingParams)(query)), allowedQueryParams);
156
- // Get headers to propagate on subsequent requests
157
- const propagatedHeaders = (0, utils_2.getHeadersForPropagation)(headers);
154
+ // Editing preview data, mapped from the incoming `sc_*` query parameters
155
+ // into the typed shape consumed by preview methods.
156
+ const editingPreviewData = Object.assign(Object.assign({}, (0, utils_2.mapEditingParams)(query)), allowedQueryParams);
157
+ // Query string parameters required by the runtime/platform itself
158
+ // (e.g. Vercel deployment protection bypass tokens). Editing preview
159
+ // data is also appended here for backward compatibility with apps that
160
+ // still read `searchParams` in the page; new code should consume the
161
+ // `EDITING_PARAMS_HEADER` instead via `client.getPreviewInputs`.
162
+ // TODO: Remove preview data from qs before next major release.
163
+ const propagatedQsParams = Object.assign(Object.assign({}, (0, utils_2.getQueryParamsForPropagation)(query)), editingPreviewData);
164
+ const propagatedHeaders = Object.assign(Object.assign({}, (0, utils_2.getHeadersForPropagation)(headers)), { [constants_1.EDITING_PARAMS_HEADER]: JSON.stringify(editingPreviewData) });
158
165
  const html = await (0, utils_2.getEditingRequestHtml)(requestUrl, propagatedQsParams, propagatedHeaders, convertedCookies, dataFetcher);
159
166
  // remove nextjs preview cookies to not leak them to the browser
160
167
  const filteredCookies = (0, utils_2.cleanupNextPreviewCookies)(convertedCookies);
@@ -211,7 +218,11 @@ const createEditingRenderRouteHandlers = (options) => {
211
218
  req.nextUrl.searchParams.forEach((value, key) => {
212
219
  query[key] = value;
213
220
  });
214
- const propagatedQsParams = Object.assign(Object.assign(Object.assign({}, (0, utils_2.getQueryParamsForPropagation)(query)), (0, utils_2.mapEditingParams)(query)), (0, utils_2.getAllowedQueryParams)(query, options.allowedQueryParams).allowedQueryParams);
221
+ const editingPreviewData = Object.assign(Object.assign({}, (0, utils_2.mapEditingParams)(query)), (0, utils_2.getAllowedQueryParams)(query, options.allowedQueryParams).allowedQueryParams);
222
+ /**
223
+ * TODO: Remove preview data from qs before next major release.
224
+ */
225
+ const propagatedQsParams = Object.assign(Object.assign({}, (0, utils_2.getQueryParamsForPropagation)(query)), editingPreviewData);
215
226
  const base = (0, utils_2.resolveServerUrl)(req);
216
227
  const targetUrl = new URL('/', base);
217
228
  for (const key in propagatedQsParams) {
@@ -232,6 +243,7 @@ const createEditingRenderRouteHandlers = (options) => {
232
243
  : prerenderBypassCookie;
233
244
  const forwardHeaders = new Headers(req.headers);
234
245
  forwardHeaders.set('cookie', forwardCookie);
246
+ forwardHeaders.set(constants_1.EDITING_PARAMS_HEADER, JSON.stringify(editingPreviewData));
235
247
  const forwardedResponse = await dataFetcher.fetch(targetUrl.toString(), {
236
248
  method: req.method,
237
249
  headers: forwardHeaders,
@@ -1,5 +1,17 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { SitecoreClient, } from '@sitecore-content-sdk/content/client';
2
13
  import { ComponentPropsService } from '../services/component-props-service';
14
+ import { EDITING_PARAMS_HEADER } from '../editing/constants';
3
15
  import { getSiteRewriteData, normalizeSiteRewrite } from '@sitecore-content-sdk/content/site';
4
16
  import { getPersonalizedRewriteData, normalizePersonalizedRewrite, } from '@sitecore-content-sdk/content/personalize';
5
17
  /**
@@ -51,7 +63,8 @@ export class SitecoreNextjsClient extends SitecoreClient {
51
63
  * @returns {Page} preview page for Design Library
52
64
  */
53
65
  async getDesignLibraryData(designLibData, fetchOptions) {
54
- return super.getDesignLibraryData(designLibData, fetchOptions);
66
+ const merged = this.mergePreviewAuthorization(designLibData, fetchOptions);
67
+ return super.getDesignLibraryData(merged.previewData, merged.fetchOptions);
55
68
  }
56
69
  /**
57
70
  * Retrieves preview page and layout details
@@ -59,7 +72,31 @@ export class SitecoreNextjsClient extends SitecoreClient {
59
72
  * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests (like retries and fetch)
60
73
  */
61
74
  async getPreview(previewData, fetchOptions) {
62
- return super.getPreview(previewData, fetchOptions);
75
+ const merged = this.mergePreviewAuthorization(previewData, fetchOptions);
76
+ return super.getPreview(merged.previewData, merged.fetchOptions);
77
+ }
78
+ /**
79
+ * **NOTE**: App Router only.
80
+ *
81
+ * Builds the inputs for the Preview mode based on incoming request headers.
82
+ *
83
+ * - Reads editing preview data from the `x-sitecore-editing-params` header.
84
+ * - Reads the `authorization` header from the request and merges it as
85
+ * `Authorization` into `fetchOptions.headers`. The request value takes
86
+ * precedence over any `Authorization` (case-insensitive) supplied via
87
+ * `extra.headers`; existing case-variant keys are removed so the result
88
+ * never contains duplicates. An empty `Authorization` is never emitted.
89
+ *
90
+ * Other headers present on the input are ignored. Non-`headers` fields of
91
+ * `extra` are preserved as-is. Extra headers are merged into `fetchOptions.headers`.
92
+ * @param {Headers} headers - The headers from the incoming request.
93
+ * @param {FetchOptions} [extra] - Optional base fetch options to merge with.
94
+ * @returns The `previewData` and `fetchOptions` to forward
95
+ */
96
+ getPreviewInputs(headers, extra) {
97
+ const previewData = this.parsePreviewDataFromHeader(headers);
98
+ const fetchOptions = this.mergeAuthorizationHeader(headers, extra);
99
+ return { previewData, fetchOptions };
63
100
  }
64
101
  /**
65
102
  * Generates static params for the Next.js App Router from Sitecore routes.
@@ -142,4 +179,83 @@ export class SitecoreNextjsClient extends SitecoreClient {
142
179
  getComponentPropsService() {
143
180
  return new ComponentPropsService();
144
181
  }
182
+ /**
183
+ * **NOTE**: Pages Router only.
184
+ *
185
+ * Merges the authorization header from the preview data into the fetch options.
186
+ * The `authorization` field is always stripped from the returned preview data
187
+ * to avoid leaking it back into request payloads.
188
+ *
189
+ * The value stashed in preview data takes precedence over any caller-supplied
190
+ * `Authorization` header. Existing `Authorization` keys are removed
191
+ * case-insensitively before the merged value is set, so the result never
192
+ * contains duplicate keys.
193
+ * @param {PreviewData} previewData - The preview data to merge the authorization header from.
194
+ * @param {FetchOptions} [fetchOptions] - The fetch options to merge the authorization header into.
195
+ * @returns The preview data and fetch options with the authorization header merged.
196
+ */
197
+ mergePreviewAuthorization(previewData, fetchOptions) {
198
+ if (!previewData || typeof previewData !== 'object') {
199
+ return { previewData: previewData, fetchOptions };
200
+ }
201
+ const _a = previewData, { authorization } = _a, rest = __rest(_a, ["authorization"]);
202
+ if (!authorization) {
203
+ return { previewData: rest, fetchOptions };
204
+ }
205
+ const mergedHeaders = this.applyAuthorizationHeader(fetchOptions === null || fetchOptions === void 0 ? void 0 : fetchOptions.headers, authorization);
206
+ return { previewData: rest, fetchOptions: Object.assign(Object.assign({}, fetchOptions), { headers: mergedHeaders }) };
207
+ }
208
+ /**
209
+ * Reads and JSON-parses the editing preview data propagated via
210
+ * `EDITING_PARAMS_HEADER`. Returns an empty object when the header is
211
+ * missing or its value is not valid JSON.
212
+ * @param {Headers} headers - The incoming request headers.
213
+ * @returns {PreviewData} The parsed preview data, or an empty object.
214
+ */
215
+ parsePreviewDataFromHeader(headers) {
216
+ const packed = headers.get(EDITING_PARAMS_HEADER);
217
+ if (!packed)
218
+ return {};
219
+ try {
220
+ return JSON.parse(packed);
221
+ }
222
+ catch (_a) {
223
+ return {};
224
+ }
225
+ }
226
+ /**
227
+ * Builds `FetchOptions` by merging the `Authorization` header from the
228
+ * incoming request headers into `extra`. The request value takes precedence
229
+ * over any caller-supplied `Authorization` header (case-insensitive). An
230
+ * empty `Authorization` is never emitted.
231
+ * @param {Headers} headers - The incoming request headers.
232
+ * @param {FetchOptions} [extra] - Optional base fetch options to merge with.
233
+ * @returns {FetchOptions} The merged fetch options.
234
+ */
235
+ mergeAuthorizationHeader(headers, extra) {
236
+ const authorization = headers.get('authorization');
237
+ const mergedHeaders = this.applyAuthorizationHeader(extra === null || extra === void 0 ? void 0 : extra.headers, authorization);
238
+ return Object.assign(Object.assign({}, extra), { headers: mergedHeaders });
239
+ }
240
+ /**
241
+ * Returns a shallow-cloned headers record with `Authorization` set to
242
+ * `authorization` (when truthy). Any pre-existing `Authorization` key is
243
+ * removed case-insensitively to avoid emitting both `authorization` and
244
+ * `Authorization` in the same record.
245
+ * @param {Record<string, string> | undefined} headers - Existing headers, if any.
246
+ * @param {string | null | undefined} authorization - The authorization value to apply, or null/undefined to leave headers unchanged.
247
+ * @returns {Record<string, string>} The merged headers.
248
+ */
249
+ applyAuthorizationHeader(headers, authorization) {
250
+ const merged = Object.assign({}, (headers !== null && headers !== void 0 ? headers : {}));
251
+ if (!authorization)
252
+ return merged;
253
+ for (const key of Object.keys(merged)) {
254
+ if (key.toLowerCase() === 'authorization') {
255
+ delete merged[key];
256
+ }
257
+ }
258
+ merged.Authorization = authorization;
259
+ return merged;
260
+ }
145
261
  }
@@ -5,3 +5,8 @@ export const QUERY_PARAM_VERCEL_SET_BYPASS_COOKIE = 'x-vercel-set-bypass-cookie'
5
5
  * Note these are in lowercase format to match expected `IncomingHttpHeaders`.
6
6
  */
7
7
  export const EDITING_PASS_THROUGH_HEADERS = ['authorization', 'cookie'];
8
+ /**
9
+ * Header used to propagate editing preview parameters from the editing render
10
+ * route handler to the Next.js page when running in App Router.
11
+ */
12
+ export const EDITING_PARAMS_HEADER = 'x-sitecore-editing-params';
@@ -81,7 +81,7 @@ export class EditingRenderMiddleware extends RenderMiddlewareBase {
81
81
  });
82
82
  }
83
83
  const previewDataParams = mapEditingParams(query);
84
- res.setPreviewData(Object.assign(Object.assign(Object.assign({}, previewDataParams), allowedQueryParams), { variantIds: (_c = previewDataParams.variantIds) === null || _c === void 0 ? void 0 : _c.split(',') }), {
84
+ res.setPreviewData(Object.assign(Object.assign(Object.assign({}, previewDataParams), allowedQueryParams), { variantIds: (_c = previewDataParams.variantIds) === null || _c === void 0 ? void 0 : _c.split(','), authorization: headers.authorization }), {
85
85
  maxAge: 3,
86
86
  });
87
87
  // Set Preview mode identifier cookie, if the page is rendered in Sitecore Preview mode
@@ -5,6 +5,7 @@ import { LayoutServicePageState } from '@sitecore-content-sdk/content/layout';
5
5
  import { getEditingSecret } from '../utils/utils';
6
6
  import { draftMode, cookies as nextCokies } from 'next/headers';
7
7
  import { mapEditingParams, getEditingRequestHtml, cleanupNextPreviewCookies, getHeadersForPropagation, getQueryParamsForPropagation, getRequiredEditingParamsList, getCSPHeader, resolveServerUrl, getAllowedQueryParams, } from '../editing/utils';
8
+ import { EDITING_PARAMS_HEADER } from '../editing/constants';
8
9
  import { SITE_KEY } from '@sitecore-content-sdk/content/site';
9
10
  import debug from '../debug';
10
11
  /**
@@ -143,11 +144,17 @@ export const createEditingRenderRouteHandlers = (options) => {
143
144
  const convertedCookies = cookieStore.getAll().map((c) => `${c.name}=${c.value}`);
144
145
  try {
145
146
  debug.editing('fetching page route for %s', query.route);
146
- // Get query string parameters to propagate on subsequent requests (e.g. for deployment protection bypass)
147
- // Additionally ,in app router preview data is passed through query string instead of preview data cookie
148
- const propagatedQsParams = Object.assign(Object.assign(Object.assign({}, getQueryParamsForPropagation(query)), mapEditingParams(query)), allowedQueryParams);
149
- // Get headers to propagate on subsequent requests
150
- const propagatedHeaders = getHeadersForPropagation(headers);
147
+ // Editing preview data, mapped from the incoming `sc_*` query parameters
148
+ // into the typed shape consumed by preview methods.
149
+ const editingPreviewData = Object.assign(Object.assign({}, mapEditingParams(query)), allowedQueryParams);
150
+ // Query string parameters required by the runtime/platform itself
151
+ // (e.g. Vercel deployment protection bypass tokens). Editing preview
152
+ // data is also appended here for backward compatibility with apps that
153
+ // still read `searchParams` in the page; new code should consume the
154
+ // `EDITING_PARAMS_HEADER` instead via `client.getPreviewInputs`.
155
+ // TODO: Remove preview data from qs before next major release.
156
+ const propagatedQsParams = Object.assign(Object.assign({}, getQueryParamsForPropagation(query)), editingPreviewData);
157
+ const propagatedHeaders = Object.assign(Object.assign({}, getHeadersForPropagation(headers)), { [EDITING_PARAMS_HEADER]: JSON.stringify(editingPreviewData) });
151
158
  const html = await getEditingRequestHtml(requestUrl, propagatedQsParams, propagatedHeaders, convertedCookies, dataFetcher);
152
159
  // remove nextjs preview cookies to not leak them to the browser
153
160
  const filteredCookies = cleanupNextPreviewCookies(convertedCookies);
@@ -204,7 +211,11 @@ export const createEditingRenderRouteHandlers = (options) => {
204
211
  req.nextUrl.searchParams.forEach((value, key) => {
205
212
  query[key] = value;
206
213
  });
207
- const propagatedQsParams = Object.assign(Object.assign(Object.assign({}, getQueryParamsForPropagation(query)), mapEditingParams(query)), getAllowedQueryParams(query, options.allowedQueryParams).allowedQueryParams);
214
+ const editingPreviewData = Object.assign(Object.assign({}, mapEditingParams(query)), getAllowedQueryParams(query, options.allowedQueryParams).allowedQueryParams);
215
+ /**
216
+ * TODO: Remove preview data from qs before next major release.
217
+ */
218
+ const propagatedQsParams = Object.assign(Object.assign({}, getQueryParamsForPropagation(query)), editingPreviewData);
208
219
  const base = resolveServerUrl(req);
209
220
  const targetUrl = new URL('/', base);
210
221
  for (const key in propagatedQsParams) {
@@ -225,6 +236,7 @@ export const createEditingRenderRouteHandlers = (options) => {
225
236
  : prerenderBypassCookie;
226
237
  const forwardHeaders = new Headers(req.headers);
227
238
  forwardHeaders.set('cookie', forwardCookie);
239
+ forwardHeaders.set(EDITING_PARAMS_HEADER, JSON.stringify(editingPreviewData));
228
240
  const forwardedResponse = await dataFetcher.fetch(targetUrl.toString(), {
229
241
  method: req.method,
230
242
  headers: forwardHeaders,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sitecore-content-sdk/nextjs",
3
- "version": "2.1.0-canary.12",
3
+ "version": "2.1.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-content-sdk/analytics-core": "2.1.0-canary.12",
36
- "@sitecore-content-sdk/personalize": "2.1.0-canary.12",
35
+ "@sitecore-content-sdk/analytics-core": "2.1.0-canary.13",
36
+ "@sitecore-content-sdk/personalize": "2.1.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",
@@ -91,10 +91,10 @@
91
91
  },
92
92
  "dependencies": {
93
93
  "@babel/parser": "^7.27.2",
94
- "@sitecore-content-sdk/content": "2.1.0-canary.12",
95
- "@sitecore-content-sdk/core": "2.1.0-canary.12",
96
- "@sitecore-content-sdk/events": "2.1.0-canary.12",
97
- "@sitecore-content-sdk/react": "2.1.0-canary.12",
94
+ "@sitecore-content-sdk/content": "2.1.0-canary.13",
95
+ "@sitecore-content-sdk/core": "2.1.0-canary.13",
96
+ "@sitecore-content-sdk/events": "2.1.0-canary.13",
97
+ "@sitecore-content-sdk/react": "2.1.0-canary.13",
98
98
  "recast": "^0.23.11",
99
99
  "regex-parser": "^2.3.1",
100
100
  "sync-disk-cache": "^2.1.0"
@@ -178,7 +178,7 @@
178
178
  },
179
179
  "description": "",
180
180
  "types": "types/index.d.ts",
181
- "gitHead": "608209f0b31dffb40d22f154843fbfe21fcd5f92",
181
+ "gitHead": "3bb3656cf04e432ead4005db696643c4b409b7a3",
182
182
  "files": [
183
183
  "dist",
184
184
  "types",
@@ -46,6 +46,28 @@ export declare class SitecoreNextjsClient extends SitecoreClient {
46
46
  * @param {FetchOptions} [fetchOptions] Additional fetch fetch options to override GraphQL requests (like retries and fetch)
47
47
  */
48
48
  getPreview(previewData: PreviewData, fetchOptions?: FetchOptions): Promise<Page | null>;
49
+ /**
50
+ * **NOTE**: App Router only.
51
+ *
52
+ * Builds the inputs for the Preview mode based on incoming request headers.
53
+ *
54
+ * - Reads editing preview data from the `x-sitecore-editing-params` header.
55
+ * - Reads the `authorization` header from the request and merges it as
56
+ * `Authorization` into `fetchOptions.headers`. The request value takes
57
+ * precedence over any `Authorization` (case-insensitive) supplied via
58
+ * `extra.headers`; existing case-variant keys are removed so the result
59
+ * never contains duplicates. An empty `Authorization` is never emitted.
60
+ *
61
+ * Other headers present on the input are ignored. Non-`headers` fields of
62
+ * `extra` are preserved as-is. Extra headers are merged into `fetchOptions.headers`.
63
+ * @param {Headers} headers - The headers from the incoming request.
64
+ * @param {FetchOptions} [extra] - Optional base fetch options to merge with.
65
+ * @returns The `previewData` and `fetchOptions` to forward
66
+ */
67
+ getPreviewInputs(headers: Headers, extra?: FetchOptions): {
68
+ previewData: PreviewData;
69
+ fetchOptions: FetchOptions;
70
+ };
49
71
  /**
50
72
  * Generates static params for the Next.js App Router from Sitecore routes.
51
73
  *
@@ -79,5 +101,49 @@ export declare class SitecoreNextjsClient extends SitecoreClient {
79
101
  */
80
102
  getComponentData(layoutData: LayoutServiceData, context: GetServerSidePropsContext | GetStaticPropsContext, components: ComponentMap<NextjsContentSdkComponent>): Promise<ComponentPropsCollection>;
81
103
  protected getComponentPropsService(): ComponentPropsService;
104
+ /**
105
+ * **NOTE**: Pages Router only.
106
+ *
107
+ * Merges the authorization header from the preview data into the fetch options.
108
+ * The `authorization` field is always stripped from the returned preview data
109
+ * to avoid leaking it back into request payloads.
110
+ *
111
+ * The value stashed in preview data takes precedence over any caller-supplied
112
+ * `Authorization` header. Existing `Authorization` keys are removed
113
+ * case-insensitively before the merged value is set, so the result never
114
+ * contains duplicate keys.
115
+ * @param {PreviewData} previewData - The preview data to merge the authorization header from.
116
+ * @param {FetchOptions} [fetchOptions] - The fetch options to merge the authorization header into.
117
+ * @returns The preview data and fetch options with the authorization header merged.
118
+ */
119
+ private mergePreviewAuthorization;
120
+ /**
121
+ * Reads and JSON-parses the editing preview data propagated via
122
+ * `EDITING_PARAMS_HEADER`. Returns an empty object when the header is
123
+ * missing or its value is not valid JSON.
124
+ * @param {Headers} headers - The incoming request headers.
125
+ * @returns {PreviewData} The parsed preview data, or an empty object.
126
+ */
127
+ private parsePreviewDataFromHeader;
128
+ /**
129
+ * Builds `FetchOptions` by merging the `Authorization` header from the
130
+ * incoming request headers into `extra`. The request value takes precedence
131
+ * over any caller-supplied `Authorization` header (case-insensitive). An
132
+ * empty `Authorization` is never emitted.
133
+ * @param {Headers} headers - The incoming request headers.
134
+ * @param {FetchOptions} [extra] - Optional base fetch options to merge with.
135
+ * @returns {FetchOptions} The merged fetch options.
136
+ */
137
+ private mergeAuthorizationHeader;
138
+ /**
139
+ * Returns a shallow-cloned headers record with `Authorization` set to
140
+ * `authorization` (when truthy). Any pre-existing `Authorization` key is
141
+ * removed case-insensitively to avoid emitting both `authorization` and
142
+ * `Authorization` in the same record.
143
+ * @param {Record<string, string> | undefined} headers - Existing headers, if any.
144
+ * @param {string | null | undefined} authorization - The authorization value to apply, or null/undefined to leave headers unchanged.
145
+ * @returns {Record<string, string>} The merged headers.
146
+ */
147
+ private applyAuthorizationHeader;
82
148
  }
83
149
  //# sourceMappingURL=sitecore-nextjs-client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sitecore-nextjs-client.d.ts","sourceRoot":"","sources":["../../src/client/sitecore-nextjs-client.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAC3D,OAAO,EACL,YAAY,EACZ,IAAI,EACJ,WAAW,EACX,cAAc,EACd,kBAAkB,EACnB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,wBAAwB,EAExB,yBAAyB,EAC1B,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,WAAW,EAAE,MAAM,MAAM,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAU5E,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,GAAG,IAAI,CAAC,cAAc,EAAE,WAAW,CAAC,CAAC;AAE9F;;;GAGG;AACH,qBAAa,oBAAqB,SAAQ,cAAc;IAE1C,SAAS,CAAC,WAAW,EAAE,wBAAwB;IAD3D,SAAS,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;gBACjC,WAAW,EAAE,wBAAwB;IAK3D;;;;OAIG;IACH,mBAAmB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AAC,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CAAC;IAM7F;;;;;;;;;;;;;;;;;OAiBG;IACH,gBAAgB,CACd,OAAO,EAAE,OAAO,EAChB,KAAK,CAAC,EAAE,YAAY,GACnB;QAAE,WAAW,EAAE,WAAW,CAAC;QAAC,YAAY,EAAE,YAAY,CAAA;KAAE;IAO3D;;;;;;;;;;;;;OAaG;IACG,wBAAwB,CAC5B,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,YAAY,EAAE,CAAC;IAmB1B;;;;;;OAMG;IACG,YAAY,CAChB,KAAK,EAAE,MAAM,EAAE,EACf,SAAS,CAAC,EAAE,MAAM,EAAE,EACpB,YAAY,CAAC,EAAE,YAAY,GAC1B,OAAO,CAAC,UAAU,EAAE,CAAC;IAaxB;;;;;;;OAOG;IACG,gBAAgB,CACpB,UAAU,EAAE,iBAAiB,EAC7B,OAAO,EAAE,yBAAyB,GAAG,qBAAqB,EAC1D,UAAU,EAAE,YAAY,CAAC,yBAAyB,CAAC,GAClD,OAAO,CAAC,wBAAwB,CAAC;IA2BpC,SAAS,CAAC,wBAAwB,IAAI,qBAAqB;IAI3D;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,yBAAyB;IAmBjC;;;;;;OAMG;IACH,OAAO,CAAC,0BAA0B;IAUlC;;;;;;;;OAQG;IACH,OAAO,CAAC,wBAAwB;IAOhC;;;;;;;;OAQG;IACH,OAAO,CAAC,wBAAwB;CAiBjC"}
@@ -5,4 +5,9 @@ export declare const QUERY_PARAM_VERCEL_SET_BYPASS_COOKIE = "x-vercel-set-bypass
5
5
  * Note these are in lowercase format to match expected `IncomingHttpHeaders`.
6
6
  */
7
7
  export declare const EDITING_PASS_THROUGH_HEADERS: string[];
8
+ /**
9
+ * Header used to propagate editing preview parameters from the editing render
10
+ * route handler to the Next.js page when running in App Router.
11
+ */
12
+ export declare const EDITING_PARAMS_HEADER = "x-sitecore-editing-params";
8
13
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/editing/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,+BAA+B,CAAC;AACjF,eAAO,MAAM,oCAAoC,+BAA+B,CAAC;AAEjF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,UAA8B,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/editing/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oCAAoC,+BAA+B,CAAC;AACjF,eAAO,MAAM,oCAAoC,+BAA+B,CAAC;AAEjF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,UAA8B,CAAC;AAExE;;;GAGG;AACH,eAAO,MAAM,qBAAqB,8BAA8B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"editing-render-middleware.d.ts","sourceRoot":"","sources":["../../src/editing/editing-render-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,MAAM,CAAC;AAEvD,OAAO,EAIL,wBAAwB,EACzB,MAAM,uCAAuC,CAAC;AAG/C,OAAO,EAAE,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAe3D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAElD;;;GAGG;AACH,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C;;OAEG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,cAAc,GAAG;IACnD,KAAK,EAAE,wBAAwB,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AqB,EAAE,GAAG,EAAE,eAAe,KAAK,OAAO,CAAC,IAAI,CAAC;IAIxF,OAAO,CAAC,OAAO,CA+Jb;CACH"}
@@ -1 +1 @@
1
- {"version":3,"file":"editing-render-route-handler.d.ts","sourceRoot":"","sources":["../../src/route-handler/editing-render-route-handler.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAiB1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;;GAGG;AACH,wBAAsB,cAAc,iBAMnC;AAED,KAAK,qBAAqB,GAAG;IAC3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C;;OAEG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAAI,SAAS,qBAAqB;eAwDrD,WAAW;gBAiKV,WAAW;mBAnLd,WAAW;CAgSlC,CAAC"}
1
+ {"version":3,"file":"editing-render-route-handler.d.ts","sourceRoot":"","sources":["../../src/route-handler/editing-render-route-handler.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAkB1C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAE3D;;;GAGG;AACH,wBAAsB,cAAc,iBAMnC;AAED,KAAK,qBAAqB,GAAG;IAC3B;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAC9C;;OAEG;IACH,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;CACzC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,GAAI,SAAS,qBAAqB;eAwDrD,WAAW;gBA4KV,WAAW;mBA9Ld,WAAW;CAmTlC,CAAC"}