@eso-status/forum-message 2.0.0-dev.1 → 2.0.0-dev.11

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/README.md CHANGED
@@ -43,110 +43,114 @@ const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData(Foru
43
43
  ### Return exemple
44
44
  ```text
45
45
  [
46
- {
47
- source: 'https://forums.elderscrollsonline.com',
48
- raw: '• PC/Mac: NA and EU megaservers for patch maintenance – September 3, 4:00AM EDT (8:00 UTC) – 9:00AM EDT (13:00 UTC)',
49
- slug: 'server_pc_eu',
50
- type: 'server',
51
- support: 'pc',
52
- zone: 'eu',
53
- status: 'planned',
54
- rawSlug: 'PC/Mac: NA and EU megaservers for'
55
- },
56
- {
57
- source: 'https://forums.elderscrollsonline.com',
58
- raw: '• PC/Mac: NA and EU megaservers for patch maintenance – September 3, 4:00AM EDT (8:00 UTC) – 9:00AM EDT (13:00 UTC)',
59
- slug: 'server_pc_na',
60
- type: 'server',
61
- support: 'pc',
62
- zone: 'na',
63
- status: 'planned',
64
- rawSlug: 'PC/Mac: NA and EU megaservers for'
65
- },
66
- {
67
- source: 'https://forums.elderscrollsonline.com',
68
- raw: '• Xbox: NA and EU megaservers for patch maintenance – September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
69
- slug: 'server_xbox_eu',
70
- type: 'server',
71
- support: 'xbox',
72
- zone: 'eu',
73
- status: 'planned',
74
- rawSlug: 'Xbox: NA and EU megaservers for',
75
- rawDate: 'September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
76
- dates: [ Moment<2024-09-04T10:00:00Z>, Moment<2024-09-04T16:00:00Z> ]
77
- },
78
- {
79
- source: 'https://forums.elderscrollsonline.com',
80
- raw: '• Xbox: NA and EU megaservers for patch maintenance – September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
81
- slug: 'server_xbox_na',
82
- type: 'server',
83
- support: 'xbox',
84
- zone: 'na',
85
- status: 'planned',
86
- rawSlug: 'Xbox: NA and EU megaservers for',
87
- rawDate: 'September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
88
- dates: [ Moment<2024-09-04T10:00:00Z>, Moment<2024-09-04T16:00:00Z> ]
89
- },
90
- {
91
- source: 'https://forums.elderscrollsonline.com',
92
- raw: '• PlayStation®: NA and EU megaservers for patch maintenance – September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
93
- slug: 'server_ps_eu',
94
- type: 'server',
95
- support: 'ps',
96
- zone: 'eu',
97
- status: 'planned',
98
- rawSlug: 'PlayStation®: NA and EU megaservers for',
99
- rawDate: 'September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
100
- dates: [ Moment<2024-09-04T10:00:00Z>, Moment<2024-09-04T16:00:00Z> ]
101
- },
102
- {
103
- source: 'https://forums.elderscrollsonline.com',
104
- raw: '• PlayStation®: NA and EU megaservers for patch maintenance – September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
105
- slug: 'server_ps_na',
106
- type: 'server',
107
- support: 'ps',
108
- zone: 'na',
109
- status: 'planned',
110
- rawSlug: 'PlayStation®: NA and EU megaservers for',
111
- rawDate: 'September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
112
- dates: [ Moment<2024-09-04T10:00:00Z>, Moment<2024-09-04T16:00:00Z> ]
113
- },
114
- {
115
- source: 'https://forums.elderscrollsonline.com',
116
- raw: '• ESO Store and Account System for maintenance – September 4, 10:00AM EDT (14:00 UTC) - 12:00PM EDT (16:00 UTC)',
117
- slug: 'service_store_eso',
118
- type: 'service',
119
- support: 'store',
120
- zone: 'eso',
121
- status: 'planned',
122
- rawSlug: 'ESO Store and Account System for',
123
- rawDate: 'September 4, 10:00AM EDT (14:00 UTC) - 12:00PM EDT (16:00 UTC)',
124
- dates: [ Moment<2024-09-04T14:00:00Z>, Moment<2024-09-04T16:00:00Z> ]
125
- },
126
- {
127
- source: 'https://forums.elderscrollsonline.com',
128
- raw: '• ESO Store and Account System for maintenance – September 4, 10:00AM EDT (14:00 UTC) - 12:00PM EDT (16:00 UTC)',
129
- slug: 'service_system_account',
130
- type: 'service',
131
- support: 'system',
132
- zone: 'account',
133
- status: 'planned',
134
- rawSlug: 'ESO Store and Account System for',
135
- rawDate: 'September 4, 10:00AM EDT (14:00 UTC) - 12:00PM EDT (16:00 UTC)',
136
- dates: [ Moment<2024-09-04T14:00:00Z>, Moment<2024-09-04T16:00:00Z> ]
137
- },
138
- {
139
- source: 'https://forums.elderscrollsonline.com/en/categories/pts',
140
- raw: 'We will be performing maintenance on the PTS on Thursday at 9:00AM EDT (13:00 UTC).',
141
- slug: 'server_pc_pts',
142
- type: 'server',
143
- support: 'pc',
144
- zone: 'pts',
145
- status: 'planned',
146
- rawSlug: 'PTS',
147
- rawDate: 'Thursday at 9:00AM EDT (13:00 UTC). ',
148
- dates: [ Moment<2024-09-05T13:00:00Z> ],
149
- rawStatus: 'We will be performing maintenance'
150
- }
46
+ {
47
+ source: 'https://forums.elderscrollsonline.com',
48
+ raw: '• PC/Mac: NA and EU megaservers for patch maintenance – September 3, 4:00AM EDT (8:00 UTC) – 9:00AM EDT (13:00 UTC)',
49
+ slug: 'server_pc_eu',
50
+ type: 'server',
51
+ support: 'pc',
52
+ zone: 'eu',
53
+ status: 'planned',
54
+ rawSlug: 'PC/Mac: NA and EU megaservers for',
55
+ rawDate: 'September 3, 4:00AM EDT (8:00 UTC) – 9:00AM EDT (13:00 UTC)',
56
+ dates: [ '2024-09-03T08:00:00Z', '2024-09-03T13:00:00Z' ]
57
+ },
58
+ {
59
+ source: 'https://forums.elderscrollsonline.com',
60
+ raw: '• PC/Mac: NA and EU megaservers for patch maintenance – September 3, 4:00AM EDT (8:00 UTC) – 9:00AM EDT (13:00 UTC)',
61
+ slug: 'server_pc_na',
62
+ type: 'server',
63
+ support: 'pc',
64
+ zone: 'na',
65
+ status: 'planned',
66
+ rawSlug: 'PC/Mac: NA and EU megaservers for',
67
+ rawDate: 'September 3, 4:00AM EDT (8:00 UTC) – 9:00AM EDT (13:00 UTC)',
68
+ dates: [ '2024-09-03T08:00:00Z', '2024-09-03T13:00:00Z' ]
69
+ },
70
+ {
71
+ source: 'https://forums.elderscrollsonline.com',
72
+ raw: '• Xbox: NA and EU megaservers for patch maintenance – September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
73
+ slug: 'server_xbox_eu',
74
+ type: 'server',
75
+ support: 'xbox',
76
+ zone: 'eu',
77
+ status: 'planned',
78
+ rawSlug: 'Xbox: NA and EU megaservers for',
79
+ rawDate: 'September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
80
+ dates: [ '2024-09-04T10:00:00Z', '2024-09-04T16:00:00Z' ]
81
+ },
82
+ {
83
+ source: 'https://forums.elderscrollsonline.com',
84
+ raw: '• Xbox: NA and EU megaservers for patch maintenance – September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
85
+ slug: 'server_xbox_na',
86
+ type: 'server',
87
+ support: 'xbox',
88
+ zone: 'na',
89
+ status: 'planned',
90
+ rawSlug: 'Xbox: NA and EU megaservers for',
91
+ rawDate: 'September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
92
+ dates: [ '2024-09-04T10:00:00Z', '2024-09-04T16:00:00Z' ]
93
+ },
94
+ {
95
+ source: 'https://forums.elderscrollsonline.com',
96
+ raw: '• PlayStation®: NA and EU megaservers for patch maintenance – September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
97
+ slug: 'server_ps_eu',
98
+ type: 'server',
99
+ support: 'ps',
100
+ zone: 'eu',
101
+ status: 'planned',
102
+ rawSlug: 'PlayStation®: NA and EU megaservers for',
103
+ rawDate: 'September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
104
+ dates: [ '2024-09-04T10:00:00Z', '2024-09-04T16:00:00Z' ]
105
+ },
106
+ {
107
+ source: 'https://forums.elderscrollsonline.com',
108
+ raw: '• PlayStation®: NA and EU megaservers for patch maintenance – September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
109
+ slug: 'server_ps_na',
110
+ type: 'server',
111
+ support: 'ps',
112
+ zone: 'na',
113
+ status: 'planned',
114
+ rawSlug: 'PlayStation®: NA and EU megaservers for',
115
+ rawDate: 'September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
116
+ dates: [ '2024-09-04T10:00:00Z', '2024-09-04T16:00:00Z' ]
117
+ },
118
+ {
119
+ source: 'https://forums.elderscrollsonline.com',
120
+ raw: '• ESO Store and Account System for maintenance – September 4, 10:00AM EDT (14:00 UTC) - 12:00PM EDT (16:00 UTC)',
121
+ slug: 'service_store_eso',
122
+ type: 'service',
123
+ support: 'store',
124
+ zone: 'eso',
125
+ status: 'planned',
126
+ rawSlug: 'ESO Store and Account System for',
127
+ rawDate: 'September 4, 10:00AM EDT (14:00 UTC) - 12:00PM EDT (16:00 UTC)',
128
+ dates: [ '2024-09-04T14:00:00Z', '2024-09-04T16:00:00Z' ]
129
+ },
130
+ {
131
+ source: 'https://forums.elderscrollsonline.com',
132
+ raw: '• ESO Store and Account System for maintenance – September 4, 10:00AM EDT (14:00 UTC) - 12:00PM EDT (16:00 UTC)',
133
+ slug: 'service_system_account',
134
+ type: 'service',
135
+ support: 'system',
136
+ zone: 'account',
137
+ status: 'planned',
138
+ rawSlug: 'ESO Store and Account System for',
139
+ rawDate: 'September 4, 10:00AM EDT (14:00 UTC) - 12:00PM EDT (16:00 UTC)',
140
+ dates: [ '2024-09-04T14:00:00Z', '2024-09-04T16:00:00Z' ]
141
+ },
142
+ {
143
+ source: 'https://forums.elderscrollsonline.com/en/categories/pts',
144
+ raw: 'We will be performing maintenance on the PTS on Thursday at 9:00AM EDT (13:00 UTC).',
145
+ slug: 'server_pc_pts',
146
+ type: 'server',
147
+ support: 'pc',
148
+ zone: 'pts',
149
+ status: 'planned',
150
+ rawSlug: 'PTS',
151
+ rawDate: 'Thursday at 9:00AM EDT (13:00 UTC)',
152
+ rawStatus: 'We will be performing maintenance',
153
+ dates: [ '2024-09-05T13:00:00Z' ]
154
+ }
151
155
  ]
152
156
  ```
@@ -60,9 +60,9 @@ export default class Connector {
60
60
  */
61
61
  private fetch;
62
62
  /**
63
- * Method for retrieving the information contained in an announcement
64
- * @param raw Raw data of the announcement
63
+ * Method to create the return list with all the data contained in the announcements, sorted by importance while avoiding duplicates
64
+ * @param matches List of all the data contained in the announcements
65
65
  * @private
66
66
  */
67
- private fetchEach;
67
+ private fetchAll;
68
68
  }
package/lib/connector.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const axios_1 = require("axios");
4
+ const types_1 = require("@eso-status/types");
4
5
  const raw_1 = require("./raw");
5
6
  /**
6
7
  * Class for retrieving information from announcements
@@ -50,7 +51,7 @@ class Connector {
50
51
  * @private
51
52
  */
52
53
  getMessages() {
53
- ['WarningMessage', 'AlertMessage'].forEach((type) => this.getMessagesByType(type));
54
+ ['AlertMessage', 'WarningMessage'].forEach((type) => this.getMessagesByType(type));
54
55
  }
55
56
  /**
56
57
  * Method for retrieving raw announcements based on the announcement level
@@ -71,9 +72,23 @@ class Connector {
71
72
  * @private
72
73
  */
73
74
  replace() {
74
- this.raw = this.raw.map((raw) => {
75
+ const list = [];
76
+ this.raw.forEach((raw) => {
77
+ list.push(...raw.split('<br/>'));
78
+ });
79
+ this.raw = list.map((raw) => {
75
80
  let initialRaw = raw;
81
+ initialRaw = initialRaw.replace(' 。', '');
82
+ initialRaw = initialRaw.replace(/\n/g, '');
76
83
  initialRaw = initialRaw.replace(/<br\/>\n/g, '<br>');
84
+ initialRaw = initialRaw.replace('. <br>', '.<br>');
85
+ initialRaw = initialRaw.replace(' Thank you for your patience.', '');
86
+ if (initialRaw.includes('. Please check here for status updates: <a href')) {
87
+ return initialRaw.split(' Please check here for status updates: <a href')[0];
88
+ }
89
+ if (initialRaw.includes(' <a href')) {
90
+ return initialRaw.split(' <a href')[0];
91
+ }
77
92
  return initialRaw.replace('. ', '.');
78
93
  });
79
94
  }
@@ -96,7 +111,9 @@ class Connector {
96
111
  filter() {
97
112
  this.raw = this.raw.filter((raw) => {
98
113
  return (!raw.includes('Maintenance for the week of ') &&
114
+ !raw.includes('Mantenimiento de la semana del ') &&
99
115
  !raw.includes('• PC/Mac: No maintenance – ') &&
116
+ !raw.includes('hora peninsular') &&
100
117
  raw !== '');
101
118
  });
102
119
  }
@@ -105,16 +122,34 @@ class Connector {
105
122
  * @private
106
123
  */
107
124
  fetch() {
108
- this.raw.forEach((raw) => this.fetchEach(raw));
125
+ const matches = [];
126
+ this.raw.forEach((raw) => {
127
+ new raw_1.default(this.url, raw).matches.forEach((match) => {
128
+ matches.push(match);
129
+ });
130
+ });
131
+ this.fetchAll(matches);
109
132
  }
110
133
  /**
111
- * Method for retrieving the information contained in an announcement
112
- * @param raw Raw data of the announcement
134
+ * Method to create the return list with all the data contained in the announcements, sorted by importance while avoiding duplicates
135
+ * @param matches List of all the data contained in the announcements
113
136
  * @private
114
137
  */
115
- fetchEach(raw) {
116
- new raw_1.default(this.url, raw).matches.forEach((match) => {
117
- this.rawEsoStatus.push(match);
138
+ fetchAll(matches) {
139
+ matches.forEach((match) => {
140
+ const alreadyInList = this.rawEsoStatus.filter((esoStatusRawData) => esoStatusRawData.slug === match.slug).length !== 0;
141
+ const alone = matches.filter((esoStatusRawData) => esoStatusRawData.slug === match.slug).length === 1;
142
+ const slugIsIssues = matches.filter((esoStatusRawData) => esoStatusRawData.status === types_1.IssuesStatus &&
143
+ esoStatusRawData.slug === match.slug).length !== 0;
144
+ const slugIsUp = matches.filter((esoStatusRawData) => esoStatusRawData.status === types_1.UpStatus &&
145
+ esoStatusRawData.slug === match.slug).length !== 0;
146
+ if (!alreadyInList) {
147
+ if (alone ||
148
+ (match.status === types_1.IssuesStatus && slugIsIssues) ||
149
+ (match.status === types_1.UpStatus && slugIsUp)) {
150
+ this.rawEsoStatus.push(match);
151
+ }
152
+ }
118
153
  });
119
154
  }
120
155
  }
@@ -1,4 +1,3 @@
1
- import { Moment } from 'moment';
2
1
  /**
3
2
  * Class for identifying and formatting the date contained in an announcement
4
3
  */
@@ -9,9 +8,9 @@ export default class DateFormatter {
9
8
  */
10
9
  rawDate: string;
11
10
  /**
12
- * List of dates formatted correctly contained in the announcement
11
+ * List of dates formatted correctly contained in the announcement (ISO 8601)
13
12
  */
14
- dates: Moment[];
13
+ dates: string[];
15
14
  /**
16
15
  * @param raw Raw data of the announcement
17
16
  */
@@ -34,7 +33,7 @@ export default class DateFormatter {
34
33
  */
35
34
  private getRawSpecialDate;
36
35
  /**
37
- * Method for generating the list of correctly formatted dates for case #1
36
+ * Method for generating the list of correctly formatted dates for case #1 (ISO 8601)
38
37
  * @private
39
38
  */
40
39
  private formatClassic;
@@ -69,7 +68,7 @@ export default class DateFormatter {
69
68
  */
70
69
  private getRawClassicMinute2;
71
70
  /**
72
- * Method for generating the correctly formatted date in case #2
71
+ * Method for generating the correctly formatted date in case #2 (ISO 8601)
73
72
  * @private
74
73
  */
75
74
  private formatSpecial;
@@ -85,7 +84,7 @@ export default class DateFormatter {
85
84
  */
86
85
  private getRawSpecialMinute;
87
86
  /**
88
- * Method for formatting a date correctly
87
+ * Method for formatting a date correctly (ISO 8601)
89
88
  * @param year
90
89
  * @param month
91
90
  * @param day
@@ -93,5 +92,5 @@ export default class DateFormatter {
93
92
  * @param minute
94
93
  * @private
95
94
  */
96
- private static generateMoment;
95
+ private static generateDate;
97
96
  }
@@ -48,16 +48,16 @@ class DateFormatter {
48
48
  */
49
49
  getRawSpecialDate() {
50
50
  const split = this.raw.split('on the PTS on ');
51
- return split.length === 2 ? split[1] : '';
51
+ return split.length === 2 ? split[1].split('.')[0] : '';
52
52
  }
53
53
  /**
54
- * Method for generating the list of correctly formatted dates for case #1
54
+ * Method for generating the list of correctly formatted dates for case #1 (ISO 8601)
55
55
  * @private
56
56
  */
57
57
  formatClassic() {
58
58
  return [
59
- DateFormatter.generateMoment(moment().get('years'), moment().month(this.getRawClassicMouth()).get('months'), this.getRawClassicDay(), this.getRawHour(), this.getRawClassicMinute1()),
60
- DateFormatter.generateMoment(moment().get('years'), moment().month(this.getRawClassicMouth()).get('months'), this.getRawClassicDay(), this.getRawClassicHour2(), this.getRawClassicMinute2()),
59
+ DateFormatter.generateDate(moment().get('years'), moment().month(this.getRawClassicMouth()).get('months'), this.getRawClassicDay(), this.getRawHour(), this.getRawClassicMinute1()),
60
+ DateFormatter.generateDate(moment().get('years'), moment().month(this.getRawClassicMouth()).get('months'), this.getRawClassicDay(), this.getRawClassicHour2(), this.getRawClassicMinute2()),
61
61
  ];
62
62
  }
63
63
  /**
@@ -79,37 +79,47 @@ class DateFormatter {
79
79
  * @private
80
80
  */
81
81
  getRawHour() {
82
- return Number(this.rawDate.split('(')[1].split(':')[0]);
82
+ return Number(this.rawDate
83
+ .split(' UTC')[0]
84
+ .split(' ')
85
+ .pop()
86
+ .split(':')[0]
87
+ .replace('(', ''));
83
88
  }
84
89
  /**
85
90
  * Method for retrieving the minute number of the start time for case #1
86
91
  * @private
87
92
  */
88
93
  getRawClassicMinute1() {
89
- return Number(this.rawDate.split('(')[1].split(':')[1].split(' ')[0]);
94
+ return Number(this.rawDate.split(' UTC')[0].split(':').pop());
90
95
  }
91
96
  /**
92
97
  * Method for retrieving the end hour number in case #1
93
98
  * @private
94
99
  */
95
100
  getRawClassicHour2() {
96
- return Number(this.rawDate.split('(')[2].split(':')[0]);
101
+ return Number(this.rawDate
102
+ .split(' UTC')[1]
103
+ .split(' ')
104
+ .pop()
105
+ .split(':')[0]
106
+ .replace('(', ''));
97
107
  }
98
108
  /**
99
109
  * Method for retrieving the minute number of the end time in case #1
100
110
  * @private
101
111
  */
102
112
  getRawClassicMinute2() {
103
- return Number(this.rawDate.split('(')[2].split(':')[1].split(' ')[0]);
113
+ return Number(this.rawDate.split(' UTC')[1].split(':').pop());
104
114
  }
105
115
  /**
106
- * Method for generating the correctly formatted date in case #2
116
+ * Method for generating the correctly formatted date in case #2 (ISO 8601)
107
117
  * @private
108
118
  */
109
119
  formatSpecial() {
110
120
  const date = this.getSpecialDate();
111
121
  return [
112
- DateFormatter.generateMoment(date.get('years'), date.get('months'), date.get('dates'), this.getRawHour(), this.getRawSpecialMinute()),
122
+ DateFormatter.generateDate(date.get('years'), date.get('months'), date.get('dates'), this.getRawHour(), this.getRawSpecialMinute()),
113
123
  ];
114
124
  }
115
125
  /**
@@ -136,7 +146,7 @@ class DateFormatter {
136
146
  return Number(this.rawDate.split(':')[2].split(' ')[0]);
137
147
  }
138
148
  /**
139
- * Method for formatting a date correctly
149
+ * Method for formatting a date correctly (ISO 8601)
140
150
  * @param year
141
151
  * @param month
142
152
  * @param day
@@ -144,7 +154,7 @@ class DateFormatter {
144
154
  * @param minute
145
155
  * @private
146
156
  */
147
- static generateMoment(year, month, day, hour, minute) {
157
+ static generateDate(year, month, day, hour, minute) {
148
158
  return moment()
149
159
  .utc()
150
160
  .set('years', year)
@@ -154,7 +164,8 @@ class DateFormatter {
154
164
  .set('minutes', minute)
155
165
  .set('seconds', 0)
156
166
  .set('milliseconds', 0)
157
- .utcOffset(0);
167
+ .utcOffset(0)
168
+ .toISOString();
158
169
  }
159
170
  }
160
171
  exports.default = DateFormatter;
@@ -54,6 +54,7 @@ class SlugIdentifier {
54
54
  */
55
55
  this.ServerPsEuMatchesList = [
56
56
  'PlayStation®: NA and EU megaservers for',
57
+ 'The PlayStation™ Network',
57
58
  ];
58
59
  /**
59
60
  * List of indicators proving that the announcement pertains to the slug server_ps_na
@@ -61,6 +62,7 @@ class SlugIdentifier {
61
62
  */
62
63
  this.ServerPsNaMatchesList = [
63
64
  'PlayStation®: NA and EU megaservers for',
65
+ 'The PlayStation™ Network',
64
66
  ];
65
67
  /**
66
68
  * List of indicators proving that the announcement pertains to the slug server_xbox_eu
@@ -68,6 +70,7 @@ class SlugIdentifier {
68
70
  */
69
71
  this.ServerXboxEuMatchesList = [
70
72
  'Xbox: NA and EU megaservers for',
73
+ 'Xbox: EU megaserver for',
71
74
  ];
72
75
  /**
73
76
  * List of indicators proving that the announcement pertains to the slug server_xbox_na
@@ -33,6 +33,11 @@ export default class StatusIdentifier {
33
33
  * @private
34
34
  */
35
35
  private readonly plannedMatchesList;
36
+ /**
37
+ * List of indicators proving that the announcement pertains to the status issues
38
+ * @private
39
+ */
40
+ private readonly issuesMatchesList;
36
41
  /**
37
42
  * @param raw Raw data of the announcement
38
43
  */
@@ -14,7 +14,12 @@ class StatusIdentifier {
14
14
  * List of statuses to check for presence in the announcement
15
15
  * @private
16
16
  */
17
- this.statusList = [types_1.UpStatus, types_1.DownStatus, types_1.PlannedStatus];
17
+ this.statusList = [
18
+ types_1.UpStatus,
19
+ types_1.DownStatus,
20
+ types_1.PlannedStatus,
21
+ types_1.IssuesStatus,
22
+ ];
18
23
  /**
19
24
  * List of indicators proving that the announcement pertains to the status up
20
25
  * @private
@@ -23,6 +28,7 @@ class StatusIdentifier {
23
28
  '[COMPLETE]',
24
29
  'now available',
25
30
  'complete',
31
+ 'been resolved',
26
32
  ];
27
33
  /**
28
34
  * List of indicators proving that the announcement pertains to the status down
@@ -40,6 +46,13 @@ class StatusIdentifier {
40
46
  this.plannedMatchesList = [
41
47
  'We will be performing maintenance',
42
48
  ];
49
+ /**
50
+ * List of indicators proving that the announcement pertains to the status issues
51
+ * @private
52
+ */
53
+ this.issuesMatchesList = [
54
+ 'is currently experiencing a service interruption',
55
+ ];
43
56
  this.statusList.forEach((status) => this.identify(status));
44
57
  this.default();
45
58
  }
package/lib/raw.d.ts CHANGED
@@ -4,8 +4,8 @@ import { EsoStatusRawData } from './interface/esoStatusRawData.interface';
4
4
  * Class containing announcement information
5
5
  */
6
6
  export default class Raw {
7
- private url;
8
- private raw;
7
+ private readonly url;
8
+ private readonly raw;
9
9
  /**
10
10
  * Status identification class
11
11
  * @private
@@ -20,7 +20,7 @@ export default class Raw {
20
20
  * Class for identifying the list of slugs
21
21
  * @private
22
22
  */
23
- private slugsIdentifier;
23
+ private readonly slugsIdentifier;
24
24
  /**
25
25
  * List of information about slugs found in the announcement
26
26
  */
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different statuses of announcements indicating that the announcement refers to a service/server that is not functioning properly
3
+ */
4
+ export type RemoteIssuesRawStatus = 'is currently experiencing a service interruption';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteIssuesRawStatus.type.js.map
@@ -5,7 +5,8 @@ import { RemoteServerPsEuRawSlug } from './remoteServerPsEuRawSlug.type';
5
5
  import { RemoteServerXboxEuRawSlug } from './remoteServerXboxEuRawSlug.type';
6
6
  import { RemoteServiceStoreEsoRawSlug } from './remoteServiceStoreEsoRawSlug.type';
7
7
  import { RemoteServiceWebSiteRawSlug } from './remoteServiceWebSiteRawSlug.type';
8
+ import { RemoteServerXboxNaRawSlug } from './remoteServerXboxNaRawSlug.type';
8
9
  /**
9
10
  * Different slugs of announcements
10
11
  */
11
- export type RemoteRawSlug = RemoteServerPcEuRawSlug | RemoteServerPcNaRawSlug | RemoteServerPcPtsRawSlug | RemoteServerPsEuRawSlug | RemoteServerXboxEuRawSlug | RemoteServiceStoreEsoRawSlug | RemoteServiceWebSiteRawSlug;
12
+ export type RemoteRawSlug = RemoteServerPcEuRawSlug | RemoteServerPcNaRawSlug | RemoteServerPcPtsRawSlug | RemoteServerPsEuRawSlug | RemoteServerXboxEuRawSlug | RemoteServerXboxNaRawSlug | RemoteServiceStoreEsoRawSlug | RemoteServiceWebSiteRawSlug;
@@ -1,7 +1,8 @@
1
1
  import { RemoteUpRawStatus } from './remoteUpRawStatus.type';
2
2
  import { RemoteDownRawStatus } from './remoteDownRawStatus.type';
3
3
  import { RemotePlannedRawStatus } from './remotePlannedRawStatus.type';
4
+ import { RemoteIssuesRawStatus } from './remoteIssuesRawStatus.type';
4
5
  /**
5
6
  * Different statuses of announcements
6
7
  */
7
- export type RemoteRawStatus = RemoteUpRawStatus | RemoteDownRawStatus | RemotePlannedRawStatus;
8
+ export type RemoteRawStatus = RemoteUpRawStatus | RemoteDownRawStatus | RemotePlannedRawStatus | RemoteIssuesRawStatus;
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Different slugs of announcements concerning the European PlayStation® Megaserver
3
3
  */
4
- export type RemoteServerPsEuRawSlug = 'PlayStation®: NA and EU megaservers for';
4
+ export type RemoteServerPsEuRawSlug = 'PlayStation®: NA and EU megaservers for' | 'The PlayStation™ Network';
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Different slugs of announcements concerning the North American PlayStation® Megaserver
3
3
  */
4
- export type RemoteServerPsNaRawSlug = 'PlayStation®: NA and EU megaservers for';
4
+ export type RemoteServerPsNaRawSlug = 'PlayStation®: NA and EU megaservers for' | 'The PlayStation™ Network';
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Different slugs of announcements concerning the European Xbox Megaserver
3
3
  */
4
- export type RemoteServerXboxEuRawSlug = 'Xbox: NA and EU megaservers for';
4
+ export type RemoteServerXboxEuRawSlug = 'Xbox: NA and EU megaservers for' | 'Xbox: EU megaserver for';
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Different statuses of announcements indicating that the announcement refers to an accessible service/server
3
3
  */
4
- export type RemoteUpRawStatus = '[COMPLETE]' | 'now available' | 'complete';
4
+ export type RemoteUpRawStatus = '[COMPLETE]' | 'now available' | 'complete' | 'been resolved';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eso-status/forum-message",
3
- "version": "2.0.0-dev.1",
3
+ "version": "2.0.0-dev.11",
4
4
  "description": "Library for retrieving and formatting data, available at https://forums.elderscrollsonline.com or https://forums.elderscrollsonline.com/en/categories/pts",
5
5
  "author": "@dov118 <contact@dov118.dev> (https://dov118.dev)",
6
6
  "main": "lib/index.js",
@@ -19,6 +19,8 @@
19
19
  "lib/type/messageType.type.js",
20
20
  "lib/type/remoteDownRawStatus.type.d.ts",
21
21
  "lib/type/remoteDownRawStatus.type.js",
22
+ "lib/type/remoteIssuesRawStatus.type.d.ts",
23
+ "lib/type/remoteIssuesRawStatus.type.js",
22
24
  "lib/type/remotePlannedRawStatus.type.d.ts",
23
25
  "lib/type/remotePlannedRawStatus.type.js",
24
26
  "lib/type/remoteRawSlug.type.d.ts",
@@ -86,23 +88,23 @@
86
88
  "prepare": "husky"
87
89
  },
88
90
  "dependencies": {
89
- "@eso-status/types": "2.0.0-dev.11",
91
+ "@eso-status/types": "2.0.0-dev.13",
90
92
  "axios": "1.7.7",
91
93
  "moment": "2.30.1"
92
94
  },
93
95
  "devDependencies": {
94
- "@types/jest": "29.5.12",
95
- "eslint": "8.57.0",
96
+ "@types/jest": "29.5.13",
97
+ "eslint": "8.57.1",
96
98
  "eslint-config-airbnb-base": "15.0.0",
97
99
  "eslint-config-airbnb-typescript": "18.0.0",
98
100
  "eslint-config-prettier": "9.1.0",
99
101
  "eslint-plugin-jest": "28.8.3",
100
102
  "eslint-plugin-prettier": "5.2.1",
101
- "eslint-plugin-sonarjs": "2.0.2",
102
- "eslint-plugin-unused-imports": "4.1.3",
103
- "husky": "9.1.5",
103
+ "eslint-plugin-sonarjs": "2.0.3",
104
+ "eslint-plugin-unused-imports": "4.1.4",
105
+ "husky": "9.1.6",
104
106
  "jest": "29.7.0",
105
- "nodemon": "3.1.4",
107
+ "nodemon": "3.1.7",
106
108
  "prettier": "3.3.3",
107
109
  "ts-jest": "29.2.5",
108
110
  "typescript": "5.5.4"