@sitecore-jss/sitecore-jss-nextjs 22.9.0-canary.4 → 22.10.0-canary.1
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/components/ComponentPropsContext.js +2 -2
- package/dist/cjs/editing/editing-data.js +1 -2
- package/dist/cjs/editing/feaas-render-middleware.js +2 -2
- package/dist/cjs/middleware/redirects-middleware.js +1 -1
- package/dist/cjs/services/base-graphql-sitemap-service.js +14 -88
- package/dist/cjs/services/graphql-sitemap-service.js +2 -2
- package/dist/esm/editing/feaas-render-middleware.js +2 -2
- package/dist/esm/middleware/redirects-middleware.js +1 -1
- package/dist/esm/services/base-graphql-sitemap-service.js +12 -86
- package/package.json +25 -25
- package/types/components/ComponentPropsContext.d.ts +0 -1
- package/types/components/Link.d.ts +0 -1
- package/types/components/NextImage.d.ts +0 -1
- package/types/components/Placeholder.d.ts +0 -1
- package/types/editing/editing-render-middleware.d.ts +2 -2
- package/types/editing/render-middleware.d.ts +0 -1
- package/types/services/base-graphql-sitemap-service.d.ts +0 -6
- package/types/sharedTypes/module-factory.d.ts +0 -1
|
@@ -23,7 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.ComponentPropsContext = exports.
|
|
26
|
+
exports.ComponentPropsContext = exports.ComponentPropsReactContext = void 0;
|
|
27
|
+
exports.useComponentProps = useComponentProps;
|
|
27
28
|
const react_1 = __importStar(require("react"));
|
|
28
29
|
/**
|
|
29
30
|
* Component props context which we are using in order to store data fetched on components level (getStaticProps/getServerSideProps)
|
|
@@ -42,6 +43,5 @@ function useComponentProps(componentUid) {
|
|
|
42
43
|
const data = (0, react_1.useContext)(exports.ComponentPropsReactContext);
|
|
43
44
|
return data[componentUid];
|
|
44
45
|
}
|
|
45
|
-
exports.useComponentProps = useComponentProps;
|
|
46
46
|
const ComponentPropsContext = ({ children, value, }) => (react_1.default.createElement(exports.ComponentPropsReactContext.Provider, { value: value }, children));
|
|
47
47
|
exports.ComponentPropsContext = ComponentPropsContext;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.isEditingData =
|
|
3
|
+
exports.isEditingData = isEditingData;
|
|
4
4
|
/**
|
|
5
5
|
* @param {EditingData} data
|
|
6
6
|
*/
|
|
@@ -10,4 +10,3 @@ function isEditingData(data) {
|
|
|
10
10
|
data.layoutData !== undefined &&
|
|
11
11
|
data.dictionary !== undefined);
|
|
12
12
|
}
|
|
13
|
-
exports.isEditingData = isEditingData;
|
|
@@ -29,7 +29,7 @@ class FEAASRenderMiddleware extends render_middleware_1.RenderMiddlewareBase {
|
|
|
29
29
|
this.config = config;
|
|
30
30
|
this.defaultPageUrl = '/feaas/render';
|
|
31
31
|
this.handler = (req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
32
|
-
var
|
|
32
|
+
var _a;
|
|
33
33
|
const { method, query, headers } = req;
|
|
34
34
|
const startTimestamp = Date.now();
|
|
35
35
|
sitecore_jss_1.debug.editing('feaas render middleware start: %o', {
|
|
@@ -41,7 +41,7 @@ class FEAASRenderMiddleware extends render_middleware_1.RenderMiddlewareBase {
|
|
|
41
41
|
sitecore_jss_1.debug.editing('invalid origin host - set allowed origins in JSS_ALLOWED_ORIGINS environment variable');
|
|
42
42
|
return res
|
|
43
43
|
.status(401)
|
|
44
|
-
.send(`<html><body>Requests from origin ${(
|
|
44
|
+
.send(`<html><body>Requests from origin ${(_a = req.headers) === null || _a === void 0 ? void 0 : _a.origin} are not allowed</body></html>`);
|
|
45
45
|
}
|
|
46
46
|
if (!method || !['GET', 'OPTIONS'].includes(method)) {
|
|
47
47
|
sitecore_jss_1.debug.editing('invalid method - sent %s expected GET,OPTIONS', method);
|
|
@@ -102,7 +102,7 @@ class RedirectsMiddleware extends middleware_1.MiddlewareBase {
|
|
|
102
102
|
.replace(/\$\/gi$/g, '')}[\/]?$/i`; // Ensures the pattern allows an optional trailing slash
|
|
103
103
|
// Redirect pattern matches the full incoming URL with query string present
|
|
104
104
|
matchedQueryString = [
|
|
105
|
-
(0, regex_parser_1.default)(redirect.pattern).test(
|
|
105
|
+
(0, regex_parser_1.default)(redirect.pattern).test(`/${localePath}${incomingQS}`),
|
|
106
106
|
(0, regex_parser_1.default)(redirect.pattern).test(`${normalizedPath}${incomingQS}`),
|
|
107
107
|
].some(Boolean)
|
|
108
108
|
? incomingQS
|
|
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.BaseGraphQLSitemapService = exports.
|
|
12
|
+
exports.BaseGraphQLSitemapService = exports.siteError = exports.languageError = void 0;
|
|
13
|
+
exports.getSiteEmptyError = getSiteEmptyError;
|
|
13
14
|
const sitecore_jss_1 = require("@sitecore-jss/sitecore-jss");
|
|
14
15
|
const personalize_1 = require("@sitecore-jss/sitecore-jss/personalize");
|
|
15
16
|
/** @private */
|
|
@@ -22,7 +23,6 @@ exports.siteError = 'The service needs a site name';
|
|
|
22
23
|
function getSiteEmptyError(siteName) {
|
|
23
24
|
return `Site "${siteName}" does not exist or site item tree is missing`;
|
|
24
25
|
}
|
|
25
|
-
exports.getSiteEmptyError = getSiteEmptyError;
|
|
26
26
|
const languageEmptyError = 'The language must be a non-empty string';
|
|
27
27
|
/**
|
|
28
28
|
* GQL query made dynamic based on schema differences between SXP and XM Cloud
|
|
@@ -54,9 +54,6 @@ query ${usesPersonalize ? 'PersonalizeSitemapQuery' : 'DefaultSitemapQuery'}(
|
|
|
54
54
|
}
|
|
55
55
|
results {
|
|
56
56
|
path: routePath
|
|
57
|
-
route {
|
|
58
|
-
displayName
|
|
59
|
-
}
|
|
60
57
|
${usesPersonalize
|
|
61
58
|
? `
|
|
62
59
|
route {
|
|
@@ -83,10 +80,8 @@ class BaseGraphQLSitemapService {
|
|
|
83
80
|
* @param {GraphQLSitemapServiceConfig} options instance
|
|
84
81
|
*/
|
|
85
82
|
constructor(options) {
|
|
86
|
-
var _a;
|
|
87
83
|
this.options = options;
|
|
88
84
|
this._graphQLClient = this.getGraphQLClient();
|
|
89
|
-
this._enableDisplayNameRouting = (_a = options.enableDisplayNameRouting) !== null && _a !== void 0 ? _a : false;
|
|
90
85
|
}
|
|
91
86
|
/**
|
|
92
87
|
* GraphQL client accessible by descendant classes when needed
|
|
@@ -150,90 +145,21 @@ class BaseGraphQLSitemapService {
|
|
|
150
145
|
}
|
|
151
146
|
transformLanguageSitePaths(sitePaths, formatStaticPath, language) {
|
|
152
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
-
|
|
148
|
+
const toSegments = (p) => decodeURI(p)
|
|
149
|
+
.replace(/^\/|\/$/g, '')
|
|
150
|
+
.split('/');
|
|
154
151
|
const aggregatedPaths = [];
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
if (!item || typeof item.path !== 'string')
|
|
163
|
-
continue;
|
|
164
|
-
const segments = item.path.replace(/^\/|\/$/g, '').split('/');
|
|
165
|
-
const lastSegment = segments[segments.length - 1];
|
|
166
|
-
const displayName = (_a = item.route) === null || _a === void 0 ? void 0 : _a.displayName;
|
|
167
|
-
if (displayName) {
|
|
168
|
-
displayNameMap.set(lastSegment, encodeURIComponent(displayName));
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Recursively generate all path combinations using either:
|
|
174
|
-
* - The item name segment (default)
|
|
175
|
-
* - Or the display name (if available in the map)
|
|
176
|
-
*
|
|
177
|
-
* For example: if path is ['about', 'team'] and displayName for 'team' is 'Team-Page',
|
|
178
|
-
* it will generate:
|
|
179
|
-
* - ['about', 'team']
|
|
180
|
-
* - ['about', 'Team-Page']
|
|
181
|
-
* @param {string[]} segments
|
|
182
|
-
*/
|
|
183
|
-
const generateCombinations = (segments) => {
|
|
184
|
-
if (!this._enableDisplayNameRouting) {
|
|
185
|
-
return [segments];
|
|
186
|
-
}
|
|
187
|
-
const results = [];
|
|
188
|
-
const helper = (index, current) => {
|
|
189
|
-
if (index === segments.length) {
|
|
190
|
-
results.push([...current]);
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
const segment = segments[index];
|
|
194
|
-
const display = displayNameMap.get(segment);
|
|
195
|
-
// Item name segment
|
|
196
|
-
current.push(segment);
|
|
197
|
-
helper(index + 1, current);
|
|
198
|
-
current.pop();
|
|
199
|
-
// Display name segment (if available and different)
|
|
200
|
-
if (display && display !== segment) {
|
|
201
|
-
current.push(display);
|
|
202
|
-
helper(index + 1, current);
|
|
203
|
-
current.pop();
|
|
204
|
-
}
|
|
205
|
-
};
|
|
206
|
-
helper(0, []);
|
|
207
|
-
return results;
|
|
208
|
-
};
|
|
209
|
-
/**
|
|
210
|
-
* Process each route in the result set to:
|
|
211
|
-
* - Add itemName-based and displayName-based paths
|
|
212
|
-
* - Add personalized variants (if applicable) for each of those paths
|
|
213
|
-
*/
|
|
214
|
-
for (const item of sitePaths) {
|
|
215
|
-
if (!item || typeof item.path !== 'string')
|
|
216
|
-
continue;
|
|
217
|
-
const itemPath = item.path.replace(/^\/|\/$/g, '');
|
|
218
|
-
const segments = itemPath ? itemPath.split('/') : [];
|
|
219
|
-
// Generate all display/item name path combinations
|
|
220
|
-
const allCombinations = generateCombinations(segments);
|
|
221
|
-
// Add plain paths to the aggregated paths list
|
|
222
|
-
for (const combo of allCombinations) {
|
|
223
|
-
aggregatedPaths.push(formatStaticPath(combo, language));
|
|
224
|
-
}
|
|
225
|
-
// Check for personalization variants
|
|
226
|
-
const variantIds = (_d = (_c = (_b = item.route) === null || _b === void 0 ? void 0 : _b.personalization) === null || _c === void 0 ? void 0 : _c.variantIds) === null || _d === void 0 ? void 0 : _d.filter((variantId) => !variantId.includes('_'));
|
|
152
|
+
sitePaths.forEach((item) => {
|
|
153
|
+
var _a, _b, _c;
|
|
154
|
+
if (!item)
|
|
155
|
+
return;
|
|
156
|
+
aggregatedPaths.push(formatStaticPath(toSegments(item.path), language));
|
|
157
|
+
const variantIds = (_c = (_b = (_a = item.route) === null || _a === void 0 ? void 0 : _a.personalization) === null || _b === void 0 ? void 0 : _b.variantIds) === null || _c === void 0 ? void 0 : _c.filter((variantId) => !variantId.includes('_') // exclude component A/B test
|
|
158
|
+
);
|
|
227
159
|
if (variantIds === null || variantIds === void 0 ? void 0 : variantIds.length) {
|
|
228
|
-
|
|
229
|
-
for (const combo of allCombinations) {
|
|
230
|
-
const rewritePath = (0, personalize_1.getPersonalizedRewrite)('/' + combo.join('/'), [variantId]);
|
|
231
|
-
const variantSegments = rewritePath.replace(/^\/|\/$/g, '').split('/');
|
|
232
|
-
aggregatedPaths.push(formatStaticPath(variantSegments, language));
|
|
233
|
-
}
|
|
234
|
-
}
|
|
160
|
+
aggregatedPaths.push(...variantIds.map((varId) => formatStaticPath(toSegments((0, personalize_1.getPersonalizedRewrite)(item.path, [varId])), language)));
|
|
235
161
|
}
|
|
236
|
-
}
|
|
162
|
+
});
|
|
237
163
|
return aggregatedPaths;
|
|
238
164
|
});
|
|
239
165
|
}
|
|
@@ -9,7 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.GraphQLSitemapService = exports.
|
|
12
|
+
exports.GraphQLSitemapService = exports.siteError = exports.languageError = void 0;
|
|
13
|
+
exports.getSiteEmptyError = getSiteEmptyError;
|
|
13
14
|
const base_graphql_sitemap_service_1 = require("./base-graphql-sitemap-service");
|
|
14
15
|
/** @private */
|
|
15
16
|
exports.languageError = 'The list of languages cannot be empty';
|
|
@@ -21,7 +22,6 @@ exports.siteError = 'The service needs a site name';
|
|
|
21
22
|
function getSiteEmptyError(siteName) {
|
|
22
23
|
return `Site "${siteName}" does not exist or site item tree is missing`;
|
|
23
24
|
}
|
|
24
|
-
exports.getSiteEmptyError = getSiteEmptyError;
|
|
25
25
|
/**
|
|
26
26
|
* Service that fetches the list of site pages using Sitecore's GraphQL API.
|
|
27
27
|
* Used to handle a single site
|
|
@@ -26,7 +26,7 @@ export class FEAASRenderMiddleware extends RenderMiddlewareBase {
|
|
|
26
26
|
this.config = config;
|
|
27
27
|
this.defaultPageUrl = '/feaas/render';
|
|
28
28
|
this.handler = (req, res) => __awaiter(this, void 0, void 0, function* () {
|
|
29
|
-
var
|
|
29
|
+
var _a;
|
|
30
30
|
const { method, query, headers } = req;
|
|
31
31
|
const startTimestamp = Date.now();
|
|
32
32
|
debug.editing('feaas render middleware start: %o', {
|
|
@@ -38,7 +38,7 @@ export class FEAASRenderMiddleware extends RenderMiddlewareBase {
|
|
|
38
38
|
debug.editing('invalid origin host - set allowed origins in JSS_ALLOWED_ORIGINS environment variable');
|
|
39
39
|
return res
|
|
40
40
|
.status(401)
|
|
41
|
-
.send(`<html><body>Requests from origin ${(
|
|
41
|
+
.send(`<html><body>Requests from origin ${(_a = req.headers) === null || _a === void 0 ? void 0 : _a.origin} are not allowed</body></html>`);
|
|
42
42
|
}
|
|
43
43
|
if (!method || !['GET', 'OPTIONS'].includes(method)) {
|
|
44
44
|
debug.editing('invalid method - sent %s expected GET,OPTIONS', method);
|
|
@@ -96,7 +96,7 @@ export class RedirectsMiddleware extends MiddlewareBase {
|
|
|
96
96
|
.replace(/\$\/gi$/g, '')}[\/]?$/i`; // Ensures the pattern allows an optional trailing slash
|
|
97
97
|
// Redirect pattern matches the full incoming URL with query string present
|
|
98
98
|
matchedQueryString = [
|
|
99
|
-
regexParser(redirect.pattern).test(
|
|
99
|
+
regexParser(redirect.pattern).test(`/${localePath}${incomingQS}`),
|
|
100
100
|
regexParser(redirect.pattern).test(`${normalizedPath}${incomingQS}`),
|
|
101
101
|
].some(Boolean)
|
|
102
102
|
? incomingQS
|
|
@@ -50,9 +50,6 @@ query ${usesPersonalize ? 'PersonalizeSitemapQuery' : 'DefaultSitemapQuery'}(
|
|
|
50
50
|
}
|
|
51
51
|
results {
|
|
52
52
|
path: routePath
|
|
53
|
-
route {
|
|
54
|
-
displayName
|
|
55
|
-
}
|
|
56
53
|
${usesPersonalize
|
|
57
54
|
? `
|
|
58
55
|
route {
|
|
@@ -79,10 +76,8 @@ export class BaseGraphQLSitemapService {
|
|
|
79
76
|
* @param {GraphQLSitemapServiceConfig} options instance
|
|
80
77
|
*/
|
|
81
78
|
constructor(options) {
|
|
82
|
-
var _a;
|
|
83
79
|
this.options = options;
|
|
84
80
|
this._graphQLClient = this.getGraphQLClient();
|
|
85
|
-
this._enableDisplayNameRouting = (_a = options.enableDisplayNameRouting) !== null && _a !== void 0 ? _a : false;
|
|
86
81
|
}
|
|
87
82
|
/**
|
|
88
83
|
* GraphQL client accessible by descendant classes when needed
|
|
@@ -146,90 +141,21 @@ export class BaseGraphQLSitemapService {
|
|
|
146
141
|
}
|
|
147
142
|
transformLanguageSitePaths(sitePaths, formatStaticPath, language) {
|
|
148
143
|
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
-
|
|
144
|
+
const toSegments = (p) => decodeURI(p)
|
|
145
|
+
.replace(/^\/|\/$/g, '')
|
|
146
|
+
.split('/');
|
|
150
147
|
const aggregatedPaths = [];
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
if (!item || typeof item.path !== 'string')
|
|
159
|
-
continue;
|
|
160
|
-
const segments = item.path.replace(/^\/|\/$/g, '').split('/');
|
|
161
|
-
const lastSegment = segments[segments.length - 1];
|
|
162
|
-
const displayName = (_a = item.route) === null || _a === void 0 ? void 0 : _a.displayName;
|
|
163
|
-
if (displayName) {
|
|
164
|
-
displayNameMap.set(lastSegment, encodeURIComponent(displayName));
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
/**
|
|
169
|
-
* Recursively generate all path combinations using either:
|
|
170
|
-
* - The item name segment (default)
|
|
171
|
-
* - Or the display name (if available in the map)
|
|
172
|
-
*
|
|
173
|
-
* For example: if path is ['about', 'team'] and displayName for 'team' is 'Team-Page',
|
|
174
|
-
* it will generate:
|
|
175
|
-
* - ['about', 'team']
|
|
176
|
-
* - ['about', 'Team-Page']
|
|
177
|
-
* @param {string[]} segments
|
|
178
|
-
*/
|
|
179
|
-
const generateCombinations = (segments) => {
|
|
180
|
-
if (!this._enableDisplayNameRouting) {
|
|
181
|
-
return [segments];
|
|
182
|
-
}
|
|
183
|
-
const results = [];
|
|
184
|
-
const helper = (index, current) => {
|
|
185
|
-
if (index === segments.length) {
|
|
186
|
-
results.push([...current]);
|
|
187
|
-
return;
|
|
188
|
-
}
|
|
189
|
-
const segment = segments[index];
|
|
190
|
-
const display = displayNameMap.get(segment);
|
|
191
|
-
// Item name segment
|
|
192
|
-
current.push(segment);
|
|
193
|
-
helper(index + 1, current);
|
|
194
|
-
current.pop();
|
|
195
|
-
// Display name segment (if available and different)
|
|
196
|
-
if (display && display !== segment) {
|
|
197
|
-
current.push(display);
|
|
198
|
-
helper(index + 1, current);
|
|
199
|
-
current.pop();
|
|
200
|
-
}
|
|
201
|
-
};
|
|
202
|
-
helper(0, []);
|
|
203
|
-
return results;
|
|
204
|
-
};
|
|
205
|
-
/**
|
|
206
|
-
* Process each route in the result set to:
|
|
207
|
-
* - Add itemName-based and displayName-based paths
|
|
208
|
-
* - Add personalized variants (if applicable) for each of those paths
|
|
209
|
-
*/
|
|
210
|
-
for (const item of sitePaths) {
|
|
211
|
-
if (!item || typeof item.path !== 'string')
|
|
212
|
-
continue;
|
|
213
|
-
const itemPath = item.path.replace(/^\/|\/$/g, '');
|
|
214
|
-
const segments = itemPath ? itemPath.split('/') : [];
|
|
215
|
-
// Generate all display/item name path combinations
|
|
216
|
-
const allCombinations = generateCombinations(segments);
|
|
217
|
-
// Add plain paths to the aggregated paths list
|
|
218
|
-
for (const combo of allCombinations) {
|
|
219
|
-
aggregatedPaths.push(formatStaticPath(combo, language));
|
|
220
|
-
}
|
|
221
|
-
// Check for personalization variants
|
|
222
|
-
const variantIds = (_d = (_c = (_b = item.route) === null || _b === void 0 ? void 0 : _b.personalization) === null || _c === void 0 ? void 0 : _c.variantIds) === null || _d === void 0 ? void 0 : _d.filter((variantId) => !variantId.includes('_'));
|
|
148
|
+
sitePaths.forEach((item) => {
|
|
149
|
+
var _a, _b, _c;
|
|
150
|
+
if (!item)
|
|
151
|
+
return;
|
|
152
|
+
aggregatedPaths.push(formatStaticPath(toSegments(item.path), language));
|
|
153
|
+
const variantIds = (_c = (_b = (_a = item.route) === null || _a === void 0 ? void 0 : _a.personalization) === null || _b === void 0 ? void 0 : _b.variantIds) === null || _c === void 0 ? void 0 : _c.filter((variantId) => !variantId.includes('_') // exclude component A/B test
|
|
154
|
+
);
|
|
223
155
|
if (variantIds === null || variantIds === void 0 ? void 0 : variantIds.length) {
|
|
224
|
-
|
|
225
|
-
for (const combo of allCombinations) {
|
|
226
|
-
const rewritePath = getPersonalizedRewrite('/' + combo.join('/'), [variantId]);
|
|
227
|
-
const variantSegments = rewritePath.replace(/^\/|\/$/g, '').split('/');
|
|
228
|
-
aggregatedPaths.push(formatStaticPath(variantSegments, language));
|
|
229
|
-
}
|
|
230
|
-
}
|
|
156
|
+
aggregatedPaths.push(...variantIds.map((varId) => formatStaticPath(toSegments(getPersonalizedRewrite(item.path, [varId])), language)));
|
|
231
157
|
}
|
|
232
|
-
}
|
|
158
|
+
});
|
|
233
159
|
return aggregatedPaths;
|
|
234
160
|
});
|
|
235
161
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-jss/sitecore-jss-nextjs",
|
|
3
|
-
"version": "22.
|
|
3
|
+
"version": "22.10.0-canary.1",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -32,56 +32,56 @@
|
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@sitecore-cloudsdk/core": "^0.5.1",
|
|
34
34
|
"@sitecore-cloudsdk/personalize": "^0.5.1",
|
|
35
|
-
"@testing-library/dom": "^10.4.
|
|
35
|
+
"@testing-library/dom": "^10.4.1",
|
|
36
36
|
"@testing-library/react": "^16.3.0",
|
|
37
|
-
"@types/chai": "^
|
|
38
|
-
"@types/chai-as-promised": "^
|
|
39
|
-
"@types/chai-string": "^1.4.
|
|
40
|
-
"@types/mocha": "^10.0.
|
|
37
|
+
"@types/chai": "^5.2.2",
|
|
38
|
+
"@types/chai-as-promised": "^8.0.2",
|
|
39
|
+
"@types/chai-string": "^1.4.5",
|
|
40
|
+
"@types/mocha": "^10.0.10",
|
|
41
41
|
"@types/node": "~22.9.0",
|
|
42
|
-
"@types/react": "^19.1.
|
|
43
|
-
"@types/react-dom": "^19.1.
|
|
44
|
-
"@types/sinon": "^
|
|
45
|
-
"@types/sinon-chai": "^
|
|
42
|
+
"@types/react": "^19.1.7",
|
|
43
|
+
"@types/react-dom": "^19.1.7",
|
|
44
|
+
"@types/sinon": "^17.0.4",
|
|
45
|
+
"@types/sinon-chai": "^4.0.0",
|
|
46
46
|
"chai": "^4.3.7",
|
|
47
47
|
"chai-as-promised": "^7.1.1",
|
|
48
|
-
"chai-string": "^1.
|
|
48
|
+
"chai-string": "^1.6.0",
|
|
49
49
|
"chalk": "^4.1.2",
|
|
50
50
|
"cross-fetch": "^3.1.5",
|
|
51
51
|
"del-cli": "^5.0.0",
|
|
52
52
|
"eslint": "^8.56.0",
|
|
53
53
|
"eslint-plugin-react": "^7.37.5",
|
|
54
|
-
"jsdom": "^
|
|
55
|
-
"mocha": "^
|
|
56
|
-
"next": "^15.
|
|
54
|
+
"jsdom": "^26.1.0",
|
|
55
|
+
"mocha": "^11.7.0",
|
|
56
|
+
"next": "^15.4.6",
|
|
57
57
|
"nock": "^13.3.0",
|
|
58
|
-
"nyc": "^
|
|
58
|
+
"nyc": "^17.1.0",
|
|
59
59
|
"react": "^19.1.0",
|
|
60
60
|
"react-dom": "^19.1.0",
|
|
61
|
-
"sinon": "^
|
|
61
|
+
"sinon": "^20.0.0",
|
|
62
62
|
"sinon-chai": "^3.7.0",
|
|
63
63
|
"ts-node": "^10.9.1",
|
|
64
|
-
"typescript": "~5.
|
|
64
|
+
"typescript": "~5.6.3"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
|
-
"@sitecore-cloudsdk/core": "^0.5.
|
|
68
|
-
"@sitecore-cloudsdk/events": "^0.5.
|
|
69
|
-
"@sitecore-cloudsdk/personalize": "^0.5.
|
|
70
|
-
"next": "^15.
|
|
67
|
+
"@sitecore-cloudsdk/core": "^0.5.2",
|
|
68
|
+
"@sitecore-cloudsdk/events": "^0.5.2",
|
|
69
|
+
"@sitecore-cloudsdk/personalize": "^0.5.2",
|
|
70
|
+
"next": "^15.4.6",
|
|
71
71
|
"react": "^19.1.0",
|
|
72
72
|
"react-dom": "^19.1.0"
|
|
73
73
|
},
|
|
74
74
|
"dependencies": {
|
|
75
|
-
"@sitecore-jss/sitecore-jss": "22.
|
|
76
|
-
"@sitecore-jss/sitecore-jss-dev-tools": "22.
|
|
77
|
-
"@sitecore-jss/sitecore-jss-react": "22.
|
|
75
|
+
"@sitecore-jss/sitecore-jss": "22.10.0-canary.1",
|
|
76
|
+
"@sitecore-jss/sitecore-jss-dev-tools": "22.10.0-canary.1",
|
|
77
|
+
"@sitecore-jss/sitecore-jss-react": "22.10.0-canary.1",
|
|
78
78
|
"@vercel/kv": "^0.2.1",
|
|
79
79
|
"regex-parser": "^2.2.11",
|
|
80
80
|
"sync-disk-cache": "^2.1.0"
|
|
81
81
|
},
|
|
82
82
|
"description": "",
|
|
83
83
|
"types": "types/index.d.ts",
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "fdb771841e9cfec52c003ef4a9e88c8ac9017bd0",
|
|
85
85
|
"files": [
|
|
86
86
|
"dist",
|
|
87
87
|
"types",
|
|
@@ -64,12 +64,12 @@ export type EditingRenderMiddlewareChromesConfig = EditingRenderMiddlewareConfig
|
|
|
64
64
|
* This handler is responsible for rendering the page and returning the HTML content that is provided via request.
|
|
65
65
|
*/
|
|
66
66
|
export declare class ChromesHandler extends RenderMiddlewareBase {
|
|
67
|
-
config?:
|
|
67
|
+
config?: EditingRenderMiddlewareChromesConfig | undefined;
|
|
68
68
|
private editingDataService;
|
|
69
69
|
private dataFetcher;
|
|
70
70
|
private resolvePageUrl;
|
|
71
71
|
private resolveServerUrl;
|
|
72
|
-
constructor(config?:
|
|
72
|
+
constructor(config?: EditingRenderMiddlewareChromesConfig | undefined);
|
|
73
73
|
render(req: NextApiRequest, res: NextApiResponse): Promise<void>;
|
|
74
74
|
/**
|
|
75
75
|
* Default page URL resolution.
|
|
@@ -58,7 +58,6 @@ export interface SiteRouteQueryResult<T> {
|
|
|
58
58
|
export type RouteListQueryResult = {
|
|
59
59
|
path: string;
|
|
60
60
|
route?: {
|
|
61
|
-
displayName: string;
|
|
62
61
|
personalization?: {
|
|
63
62
|
variantIds: string[];
|
|
64
63
|
};
|
|
@@ -74,10 +73,6 @@ export interface BaseGraphQLSitemapServiceConfig extends Omit<SiteRouteQueryVari
|
|
|
74
73
|
* Turned off by default.
|
|
75
74
|
*/
|
|
76
75
|
includePersonalizedRoutes?: boolean;
|
|
77
|
-
/**
|
|
78
|
-
* Gets a flag indicating whether display name routing is enabled.
|
|
79
|
-
*/
|
|
80
|
-
enableDisplayNameRouting?: boolean;
|
|
81
76
|
/**
|
|
82
77
|
* A GraphQL Request Client Factory is a function that accepts configuration and returns an instance of a GraphQLRequestClient.
|
|
83
78
|
* This factory function is used to create and configure GraphQL clients for making GraphQL API requests.
|
|
@@ -102,7 +97,6 @@ export type StaticPath = {
|
|
|
102
97
|
export declare abstract class BaseGraphQLSitemapService {
|
|
103
98
|
options: BaseGraphQLSitemapServiceConfig;
|
|
104
99
|
private _graphQLClient;
|
|
105
|
-
private _enableDisplayNameRouting;
|
|
106
100
|
/**
|
|
107
101
|
* Creates an instance of graphQL sitemap service with the provided options
|
|
108
102
|
* @param {GraphQLSitemapServiceConfig} options instance
|