@azteam/express 1.2.397 → 1.2.399
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/lib/Server.js
CHANGED
|
@@ -13,6 +13,7 @@ var _helmet = _interopRequireDefault(require("helmet"));
|
|
|
13
13
|
var _methodOverride = _interopRequireDefault(require("method-override"));
|
|
14
14
|
var _bodyParser = _interopRequireDefault(require("body-parser"));
|
|
15
15
|
var _cookieParser = _interopRequireDefault(require("cookie-parser"));
|
|
16
|
+
var _uaParserJs = _interopRequireDefault(require("ua-parser-js"));
|
|
16
17
|
var _morgan = _interopRequireDefault(require("morgan"));
|
|
17
18
|
var _cors = _interopRequireDefault(require("cors"));
|
|
18
19
|
var _psl = _interopRequireDefault(require("psl"));
|
|
@@ -81,7 +81,8 @@ var SitemapController = /*#__PURE__*/function (_Controller) {
|
|
|
81
81
|
if (item.slug !== 'home') {
|
|
82
82
|
return {
|
|
83
83
|
path: _this2.customPath(item, pattern),
|
|
84
|
-
modified_at: item.modified_at
|
|
84
|
+
modified_at: item.modified_at,
|
|
85
|
+
thumb: item.thumb
|
|
85
86
|
};
|
|
86
87
|
}
|
|
87
88
|
return null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@azteam/express",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.399",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": "toda <sp.azsolution.net@gmail.com>",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"morgan": "1.10.0",
|
|
36
36
|
"pluralize": "8.0.0",
|
|
37
37
|
"psl": "1.8.0",
|
|
38
|
-
"socket.io": "4.4.1"
|
|
38
|
+
"socket.io": "4.4.1",
|
|
39
|
+
"ua-parser-js": "1.0.32"
|
|
39
40
|
}
|
|
40
41
|
}
|
package/src/Server.js
CHANGED
|
@@ -7,6 +7,7 @@ import helmet from 'helmet';
|
|
|
7
7
|
import methodOverride from 'method-override';
|
|
8
8
|
import bodyParser from 'body-parser';
|
|
9
9
|
import cookieParser from 'cookie-parser';
|
|
10
|
+
import UAParser from 'ua-parser-js';
|
|
10
11
|
import morgan from 'morgan';
|
|
11
12
|
import cors from 'cors';
|
|
12
13
|
import psl from 'psl';
|
|
@@ -1,15 +1,22 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
2
|
+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
3
|
+
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
|
|
3
4
|
<% data.forEach(function (item) { %>
|
|
4
5
|
<% if (item) { %>
|
|
5
6
|
<url>
|
|
6
|
-
<loc><%=
|
|
7
|
+
<loc><%= "https://" + domain + item.path; %></loc>
|
|
8
|
+
<% if (item.thumb) { %>
|
|
9
|
+
<image:image>
|
|
10
|
+
<image:loc><%= item.thumb %></image:loc>
|
|
11
|
+
</image:image>
|
|
12
|
+
<% } %>
|
|
13
|
+
|
|
7
14
|
<% if (item.modified_at) { %>
|
|
8
15
|
<lastmod><%= new Date(item.modified_at * 1000).toISOString().split('T')[0]; %></lastmod>
|
|
9
|
-
<%} else{%>
|
|
16
|
+
<% } else { %>
|
|
10
17
|
<lastmod><%= new Date().toISOString().split('T')[0]; %></lastmod>
|
|
11
|
-
<%}%>
|
|
18
|
+
<% } %>
|
|
12
19
|
</url>
|
|
13
|
-
<%}%>
|
|
20
|
+
<% } %>
|
|
14
21
|
<% }); %>
|
|
15
22
|
</urlset>
|