@azteam/express 1.2.404 → 1.2.405
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 +0 -1
- package/package.json +1 -1
- package/src/Server.js +1 -2
- package/template/sitemap/count.ejs +0 -9
- package/template/sitemap/home.ejs +0 -7
- package/template/sitemap/index.ejs +0 -13
- package/template/sitemap/list.ejs +0 -22
package/lib/Server.js
CHANGED
|
@@ -13,7 +13,6 @@ 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"));
|
|
17
16
|
var _morgan = _interopRequireDefault(require("morgan"));
|
|
18
17
|
var _cors = _interopRequireDefault(require("cors"));
|
|
19
18
|
var _psl = _interopRequireDefault(require("psl"));
|
package/package.json
CHANGED
package/src/Server.js
CHANGED
|
@@ -7,7 +7,6 @@ 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';
|
|
11
10
|
import morgan from 'morgan';
|
|
12
11
|
import cors from 'cors';
|
|
13
12
|
import psl from 'psl';
|
|
@@ -15,7 +14,7 @@ import ejs from 'ejs';
|
|
|
15
14
|
import compression from 'compression';
|
|
16
15
|
import 'express-async-errors';
|
|
17
16
|
import {CORS, errorCatch, ErrorException, NOT_FOUND, UNKNOWN} from '@azteam/error';
|
|
18
|
-
import {
|
|
17
|
+
import {omitArrayItem, omitItem} from '@azteam/util';
|
|
19
18
|
|
|
20
19
|
const RES_TYPE = {
|
|
21
20
|
ARRAY: 'ARRAY',
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
3
|
-
<% for(var i = 0; i < total; i++) { %>
|
|
4
|
-
<sitemap>
|
|
5
|
-
<loc><%= 'https://' + domain + '/sitemap-' + name + '-' + (i + 1) + '.xml'; %></loc>
|
|
6
|
-
<lastmod><%= new Date().toISOString().split('T')[0]; %></lastmod>
|
|
7
|
-
</sitemap>
|
|
8
|
-
<% } %>
|
|
9
|
-
</sitemapindex>
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
3
|
-
<sitemap>
|
|
4
|
-
<loc><%= 'https://' + domain + '/sitemap-home.xml'; %></loc>
|
|
5
|
-
</sitemap>
|
|
6
|
-
|
|
7
|
-
<% listIndex.forEach(function (item) { %>
|
|
8
|
-
<sitemap>
|
|
9
|
-
<loc><%= 'https://' + domain + '/sitemap-' + item + '.xml'; %></loc>
|
|
10
|
-
<lastmod><%= new Date().toISOString().split('T')[0]; %></lastmod>
|
|
11
|
-
</sitemap>
|
|
12
|
-
<% }); %>
|
|
13
|
-
</sitemapindex>
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
|
|
3
|
-
xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
|
|
4
|
-
<% data.forEach(function (item) { %>
|
|
5
|
-
<% if (item) { %>
|
|
6
|
-
<url>
|
|
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
|
-
|
|
14
|
-
<% if (item.modified_at) { %>
|
|
15
|
-
<lastmod><%= new Date(item.modified_at * 1000).toISOString().split('T')[0]; %></lastmod>
|
|
16
|
-
<% } else { %>
|
|
17
|
-
<lastmod><%= new Date().toISOString().split('T')[0]; %></lastmod>
|
|
18
|
-
<% } %>
|
|
19
|
-
</url>
|
|
20
|
-
<% } %>
|
|
21
|
-
<% }); %>
|
|
22
|
-
</urlset>
|