@eso-status/forum-message 1.0.9 → 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eso-status/forum-message",
3
- "version": "1.0.9",
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": {