@eso-status/forum-message 1.0.8 → 1.0.10
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.
|
@@ -93,6 +93,8 @@ var ForumMessageElement = /** @class */ (function () {
|
|
|
93
93
|
ForumMessageElement.isType = function (type, rawData) {
|
|
94
94
|
if (type === 'server') {
|
|
95
95
|
return rawData.includes('megaserver')
|
|
96
|
+
|| rawData.includes('NA megaservers')
|
|
97
|
+
|| rawData.includes('EU megaservers')
|
|
96
98
|
|| rawData.includes('the megaservers')
|
|
97
99
|
|| rawData.includes('PTS')
|
|
98
100
|
|| rawData.includes('PlayStation')
|
|
@@ -119,15 +121,21 @@ var ForumMessageElement = /** @class */ (function () {
|
|
|
119
121
|
ForumMessageElement.isSupport = function (support, rawData) {
|
|
120
122
|
if (support === 'xbox') { // OK
|
|
121
123
|
return rawData.includes('Xbox')
|
|
124
|
+
|| rawData.includes('· NA megaservers')
|
|
125
|
+
|| rawData.includes('· EU megaservers')
|
|
122
126
|
|| rawData.includes('the megaservers');
|
|
123
127
|
}
|
|
124
128
|
if (support === 'ps') { // OK
|
|
125
129
|
return rawData.includes('PlayStation')
|
|
130
|
+
|| rawData.includes('· NA megaservers')
|
|
131
|
+
|| rawData.includes('· EU megaservers')
|
|
126
132
|
|| rawData.includes('the megaservers');
|
|
127
133
|
}
|
|
128
134
|
if (support === 'pc') { // OK
|
|
129
135
|
return rawData.includes('PC/Mac')
|
|
130
136
|
|| rawData.includes('PTS')
|
|
137
|
+
|| rawData.includes('· NA megaservers')
|
|
138
|
+
|| rawData.includes('· EU megaservers')
|
|
131
139
|
|| rawData.includes('the megaservers');
|
|
132
140
|
}
|
|
133
141
|
if (support === 'web') {
|
|
@@ -263,6 +271,9 @@ var ForumMessageElement = /** @class */ (function () {
|
|
|
263
271
|
}
|
|
264
272
|
else {
|
|
265
273
|
var dateTime = /([a-zA-Z]{3,9}) ([0-9]{1,2})[ ]?, [0-9]{1,2}:[0-9]{1,2}[a-zA-Z]{1,2} E[D|S]T \(([0-9]{1,2}):([0-9]{1,2}) UTC\) [–|-] [0-9]{1,2}:[0-9]{1,2}[a-zA-Z]{1,2} E[D|S]T \(([0-9]{1,2}):([0-9]{1,2}) UTC\)/.exec(rawDate);
|
|
274
|
+
if (rawDate.includes('UTC (')) {
|
|
275
|
+
dateTime = /([a-zA-Z]{3,9}) ([0-9]{1,2})[ ]?, ([0-9]{1,2}):([0-9]{1,2}) UTC \([0-9]{1,2}:[0-9]{1,2}[a-zA-Z]{1,2} EDT\) [–|-] ([0-9]{1,2}):([0-9]{1,2}) UTC \([0-9]{1,2}:[0-9]{1,2}[a-zA-Z]{1,2} EDT\)/.exec(rawDate);
|
|
276
|
+
}
|
|
266
277
|
var month = Number(moment().month(dateTime && dateTime.length >= 1 ? String(dateTime[1]) : '').format('M')) - 1;
|
|
267
278
|
var day = dateTime && dateTime.length >= 1 ? Number(dateTime[2]) : 0;
|
|
268
279
|
// getDateWithDayNumber
|
|
@@ -195,7 +195,7 @@ var ForumMessageConnector = /** @class */ (function () {
|
|
|
195
195
|
ForumMessageConnector.splitRawMessage = function (mergedRawMessage) {
|
|
196
196
|
var list = [];
|
|
197
197
|
mergedRawMessage.split('<br />').forEach(function (item) {
|
|
198
|
-
list.push.apply(list, item.split('<br
|
|
198
|
+
list.push.apply(list, item.split('<br/>'));
|
|
199
199
|
});
|
|
200
200
|
return list;
|
|
201
201
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eso-status/forum-message",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Library used to get servers status of The elders scrolls Online game with https://forums.elderscrollsonline.com/ and https://forums.elderscrollsonline.com/en/categories/pts",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"build": "rm -R -f lib/* && tsc",
|
|
11
11
|
"test": "jest",
|
|
12
12
|
"start": "node .",
|
|
13
|
-
"dev": "npm run
|
|
13
|
+
"dev": "npm run build && npm run start",
|
|
14
14
|
"dev:test": "npm run lint && npm run build && npm run test",
|
|
15
15
|
"watch": "nodemon --exec npm run dev",
|
|
16
16
|
"watch:test": "nodemon --exec npm run dev:test"
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
61
|
"axios": "1.6.8",
|
|
62
|
+
"fs": "^0.0.1-security",
|
|
62
63
|
"moment": "2.30.1"
|
|
63
64
|
}
|
|
64
65
|
}
|