@quintype/framework 7.26.1 → 7.26.2-jsembed-playerid-issue.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quintype/framework",
|
|
3
|
-
"version": "7.26.1",
|
|
3
|
+
"version": "7.26.2-jsembed-playerid-issue.1",
|
|
4
4
|
"description": "Libraries to help build Quintype Node.js apps",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"engines": {
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"npm": "^8.5.0"
|
|
9
9
|
},
|
|
10
10
|
"scripts": {
|
|
11
|
-
"prepublishOnly": "
|
|
11
|
+
"prepublishOnly": "./bin-dev-scripts/standard-version-release.sh",
|
|
12
12
|
"test": "NODE_ENV=test npx mocha --recursive --require ./test/babel",
|
|
13
13
|
"watch-test": "NODE_ENV=test npx mocha --recursive --watch --require ./test/babel",
|
|
14
14
|
"coverage": "nyc --all npm test",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"@ampproject/toolbox-optimizer": "2.8.3",
|
|
34
34
|
"@quintype/amp": "^2.17.13",
|
|
35
35
|
"@quintype/backend": "^2.4.0",
|
|
36
|
-
"@quintype/components": "
|
|
36
|
+
"@quintype/components": "3.5.1-jsembed-playerid-issue.1",
|
|
37
37
|
"@quintype/prerender-node": "^3.2.26",
|
|
38
38
|
"@quintype/seo": "^1.45.0",
|
|
39
39
|
"atob": "^2.1.2",
|
|
@@ -13,10 +13,11 @@ function isUrl(url) {
|
|
|
13
13
|
function processRedirects(req, res, next, sourceUrlArray, urls) {
|
|
14
14
|
const query = url.parse(req.url, true) || {};
|
|
15
15
|
const search = query.search || "";
|
|
16
|
+
if (!urls || !sourceUrlArray || !Array.isArray(urls) || !Array.isArray(sourceUrlArray)) return;
|
|
16
17
|
|
|
17
18
|
sourceUrlArray.some((sourceUrl) => {
|
|
18
|
-
|
|
19
|
-
|
|
19
|
+
if (urls[sourceUrl]) {
|
|
20
|
+
try {
|
|
20
21
|
const destinationPath = urls[sourceUrl].destinationUrl;
|
|
21
22
|
const extractedSourceUrl = match(sourceUrl, {
|
|
22
23
|
decode: decodeURIComponent,
|
|
@@ -51,9 +52,9 @@ function processRedirects(req, res, next, sourceUrlArray, urls) {
|
|
|
51
52
|
return true;
|
|
52
53
|
}
|
|
53
54
|
}
|
|
55
|
+
} catch (err) {
|
|
56
|
+
console.log(`Redirection error on host: '${req.host}' url: '${sourceUrl}'`, err);
|
|
54
57
|
}
|
|
55
|
-
} catch (err) {
|
|
56
|
-
console.log(`Redirection error on ${req.host}-----`, err);
|
|
57
58
|
}
|
|
58
59
|
});
|
|
59
60
|
}
|