@quintype/framework 7.27.0 → 7.27.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/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [7.27.1](https://github.com/quintype/quintype-node-framework/compare/v7.27.0...v7.27.1) (2024-04-16)
|
|
6
|
+
|
|
5
7
|
## [7.27.0](https://github.com/quintype/quintype-node-framework/compare/v7.26.1...v7.27.0) (2024-04-15)
|
|
6
8
|
|
|
7
9
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@quintype/framework",
|
|
3
|
-
"version": "7.27.
|
|
3
|
+
"version": "7.27.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": "./bin-dev-scripts/standard-version-release.sh",
|
|
11
|
+
"prepublishOnly": "npm test && ./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",
|
|
@@ -13,11 +13,10 @@ 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;
|
|
17
16
|
|
|
18
17
|
sourceUrlArray.some((sourceUrl) => {
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
try {
|
|
19
|
+
if (urls[sourceUrl]) {
|
|
21
20
|
const destinationPath = urls[sourceUrl].destinationUrl;
|
|
22
21
|
const extractedSourceUrl = match(sourceUrl, {
|
|
23
22
|
decode: decodeURIComponent,
|
|
@@ -52,9 +51,9 @@ function processRedirects(req, res, next, sourceUrlArray, urls) {
|
|
|
52
51
|
return true;
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
|
-
} catch (err) {
|
|
56
|
-
console.log(`Redirection error on host: '${req.host}' url: '${sourceUrl}'`, err);
|
|
57
54
|
}
|
|
55
|
+
} catch (err) {
|
|
56
|
+
console.log(`Redirection error on ${req.host}-----`, err);
|
|
58
57
|
}
|
|
59
58
|
});
|
|
60
59
|
}
|