@sitecore-content-sdk/content 2.2.0 → 2.2.1-canary.20260707071213
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.
|
@@ -29,16 +29,7 @@ function isCustomEdgeUrl(url) {
|
|
|
29
29
|
* Matches both http:// and https:// protocols.
|
|
30
30
|
* @internal
|
|
31
31
|
*/
|
|
32
|
-
const EDGE_HOST_PATTERN = new RegExp(`https?://${escapeRegExp(DEFAULT_EDGE_HOSTNAME)}`, 'gi');
|
|
33
|
-
/**
|
|
34
|
-
* Escapes a string so it can be safely embedded in a RegExp as a literal.
|
|
35
|
-
* @param {string} input - The string to escape
|
|
36
|
-
* @returns {string} The escaped string safe for RegExp construction
|
|
37
|
-
* @internal
|
|
38
|
-
*/
|
|
39
|
-
function escapeRegExp(input) {
|
|
40
|
-
return input.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
41
|
-
}
|
|
32
|
+
const EDGE_HOST_PATTERN = new RegExp(`https?://${(0, tools_1.escapeRegExp)(DEFAULT_EDGE_HOSTNAME)}`, 'gi');
|
|
42
33
|
/**
|
|
43
34
|
* Rewrites Experience Edge hostnames in a response object to use the custom hostname.
|
|
44
35
|
* This function performs a deep traversal of the object and replaces any string values
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { constants } from '@sitecore-content-sdk/core';
|
|
2
|
-
import { normalizeUrl } from '@sitecore-content-sdk/core/tools';
|
|
2
|
+
import { normalizeUrl, escapeRegExp } from '@sitecore-content-sdk/core/tools';
|
|
3
3
|
/** Default Edge hostname derived from the default Edge URL (edge.sitecorecloud.io). @internal */
|
|
4
4
|
const DEFAULT_EDGE_HOSTNAME = new URL(constants.SITECORE_EXPERIENCE_EDGE_URL_DEFAULT).hostname;
|
|
5
5
|
/**
|
|
@@ -24,15 +24,6 @@ function isCustomEdgeUrl(url) {
|
|
|
24
24
|
* @internal
|
|
25
25
|
*/
|
|
26
26
|
const EDGE_HOST_PATTERN = new RegExp(`https?://${escapeRegExp(DEFAULT_EDGE_HOSTNAME)}`, 'gi');
|
|
27
|
-
/**
|
|
28
|
-
* Escapes a string so it can be safely embedded in a RegExp as a literal.
|
|
29
|
-
* @param {string} input - The string to escape
|
|
30
|
-
* @returns {string} The escaped string safe for RegExp construction
|
|
31
|
-
* @internal
|
|
32
|
-
*/
|
|
33
|
-
function escapeRegExp(input) {
|
|
34
|
-
return input.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
35
|
-
}
|
|
36
27
|
/**
|
|
37
28
|
* Rewrites Experience Edge hostnames in a response object to use the custom hostname.
|
|
38
29
|
* This function performs a deep traversal of the object and replaces any string values
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sitecore-content-sdk/content",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1-canary.20260707071213",
|
|
4
4
|
"main": "dist/cjs/index.js",
|
|
5
5
|
"module": "dist/esm/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"url": "https://github.com/sitecore/content-sdk/issues"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@sitecore-content-sdk/events": "
|
|
39
|
+
"@sitecore-content-sdk/events": "2.1.1-canary.20260707071213",
|
|
40
40
|
"@stylistic/eslint-plugin": "^5.2.2",
|
|
41
41
|
"@types/chai": "^5.2.2",
|
|
42
42
|
"@types/chai-spies": "^1.0.6",
|
|
@@ -73,10 +73,10 @@
|
|
|
73
73
|
"typescript": "~5.8.3"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@sitecore-content-sdk/events": "
|
|
76
|
+
"@sitecore-content-sdk/events": "2.1.1-canary.20260707071213"
|
|
77
77
|
},
|
|
78
78
|
"dependencies": {
|
|
79
|
-
"@sitecore-content-sdk/core": "
|
|
79
|
+
"@sitecore-content-sdk/core": "2.1.2-canary.20260707071213",
|
|
80
80
|
"chalk": "^4.1.2",
|
|
81
81
|
"debug": "^4.4.0",
|
|
82
82
|
"glob": "^13.0.0",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rewrite-edge-host.d.ts","sourceRoot":"","sources":["../../src/layout/rewrite-edge-host.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"rewrite-edge-host.d.ts","sourceRoot":"","sources":["../../src/layout/rewrite-edge-host.ts"],"names":[],"mappings":"AAgCA;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,OAAO,EAAE,MAAM,GAAG,CAAC,CAM5E;AAuDD;;;;;GAKG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAMxF;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,GAAG,CAAC,CAqBrF;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAE5D"}
|