@prezly/theme-kit-nextjs 5.4.2 → 5.4.4
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.
|
@@ -5,12 +5,17 @@ const data_fetching_1 = require("../../../data-fetching");
|
|
|
5
5
|
const createPaths_1 = require("./createPaths");
|
|
6
6
|
const SitemapBuilder_1 = require("./SitemapBuilder");
|
|
7
7
|
function normalizeBaseUrl(baseUrl, protocol = 'https') {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
// This regex pattern matches if the `baseUrl`
|
|
9
|
+
// equals `/`, starts with `localhost`, or starts with `http://` or `https://`.
|
|
10
|
+
if (/^(\/|localhost|https?:\/\/)/.test(baseUrl)) {
|
|
11
11
|
return baseUrl;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
// If it's explicitly defined to be `http` only
|
|
14
|
+
if (protocol.toLowerCase() === 'http') {
|
|
15
|
+
return `http://${baseUrl}`;
|
|
16
|
+
}
|
|
17
|
+
// Prefer https if protocol is `https,http` or `https` or any other unknown value
|
|
18
|
+
return `https://${baseUrl}`;
|
|
14
19
|
}
|
|
15
20
|
function getSitemapServerSideProps(options = {}) {
|
|
16
21
|
return async function getServerSideProps(ctx) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getServerSideProps.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/sitemap/getServerSideProps.ts"],"names":[],"mappings":";;;AAEA,0DAA0D;AAE1D,+CAA4C;AAC5C,qDAAkD;AAElD,SAAS,gBAAgB,CAAC,OAAe,EAAE,QAAQ,GAAG,OAAO;IACzD,
|
|
1
|
+
{"version":3,"file":"getServerSideProps.js","sourceRoot":"","sources":["../../../../src/adapter-nextjs/page-props/sitemap/getServerSideProps.ts"],"names":[],"mappings":";;;AAEA,0DAA0D;AAE1D,+CAA4C;AAC5C,qDAAkD;AAElD,SAAS,gBAAgB,CAAC,OAAe,EAAE,QAAQ,GAAG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AC;QAErD,OAAO,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;QAExE,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,UAAU,CAAC,CAAC;QAC1C,GAAG,CAAC,KAAK,CAAC,cAAc,CAAC,SAAS,EAAE,CAAC,CAAC;QACtC,GAAG,CAAC,GAAG,EAAE,CAAC;QAEV,OAAO;YACH,KAAK,EAAE,EAAE;SACZ,CAAC;IACN,CAAC,CAAC;AACN,CAAC;AAxCD,8DAwCC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prezly/theme-kit-nextjs",
|
|
3
|
-
"version": "5.4.
|
|
3
|
+
"version": "5.4.4",
|
|
4
4
|
"description": "Data layer and utility library for developing Prezly themes with NextJS",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
}
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@prezly/theme-kit-core": "^5.4.
|
|
74
|
+
"@prezly/theme-kit-core": "^5.4.4",
|
|
75
75
|
"next-seo": "^5.4.0"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"access": "public"
|
|
82
82
|
},
|
|
83
83
|
"sideEffects": false,
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "47882f30e43e6abc9e059a96bcb9146fd3eb9661"
|
|
85
85
|
}
|