@eso-status/forum-message 2.0.0-dev.10 → 2.0.0-dev.12

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
@@ -53,7 +53,7 @@ const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData(Foru
53
53
  status: 'planned',
54
54
  rawSlug: 'PC/Mac: NA and EU megaservers for',
55
55
  rawDate: 'September 3, 4:00AM EDT (8:00 UTC) – 9:00AM EDT (13:00 UTC)',
56
- dates: [ Moment<2024-09-03T08:00:00Z>, Moment<2024-09-03T13:00:00Z> ]
56
+ dates: [ '2024-09-03T08:00:00Z', '2024-09-03T13:00:00Z' ]
57
57
  },
58
58
  {
59
59
  source: 'https://forums.elderscrollsonline.com',
@@ -65,7 +65,7 @@ const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData(Foru
65
65
  status: 'planned',
66
66
  rawSlug: 'PC/Mac: NA and EU megaservers for',
67
67
  rawDate: 'September 3, 4:00AM EDT (8:00 UTC) – 9:00AM EDT (13:00 UTC)',
68
- dates: [ Moment<2024-09-03T08:00:00Z>, Moment<2024-09-03T13:00:00Z> ]
68
+ dates: [ '2024-09-03T08:00:00Z', '2024-09-03T13:00:00Z' ]
69
69
  },
70
70
  {
71
71
  source: 'https://forums.elderscrollsonline.com',
@@ -77,7 +77,7 @@ const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData(Foru
77
77
  status: 'planned',
78
78
  rawSlug: 'Xbox: NA and EU megaservers for',
79
79
  rawDate: 'September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
80
- dates: [ Moment<2024-09-04T10:00:00Z>, Moment<2024-09-04T16:00:00Z> ]
80
+ dates: [ '2024-09-04T10:00:00Z', '2024-09-04T16:00:00Z' ]
81
81
  },
82
82
  {
83
83
  source: 'https://forums.elderscrollsonline.com',
@@ -89,7 +89,7 @@ const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData(Foru
89
89
  status: 'planned',
90
90
  rawSlug: 'Xbox: NA and EU megaservers for',
91
91
  rawDate: 'September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
92
- dates: [ Moment<2024-09-04T10:00:00Z>, Moment<2024-09-04T16:00:00Z> ]
92
+ dates: [ '2024-09-04T10:00:00Z', '2024-09-04T16:00:00Z' ]
93
93
  },
94
94
  {
95
95
  source: 'https://forums.elderscrollsonline.com',
@@ -101,7 +101,7 @@ const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData(Foru
101
101
  status: 'planned',
102
102
  rawSlug: 'PlayStation®: NA and EU megaservers for',
103
103
  rawDate: 'September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
104
- dates: [ Moment<2024-09-04T10:00:00Z>, Moment<2024-09-04T16:00:00Z> ]
104
+ dates: [ '2024-09-04T10:00:00Z', '2024-09-04T16:00:00Z' ]
105
105
  },
106
106
  {
107
107
  source: 'https://forums.elderscrollsonline.com',
@@ -113,7 +113,7 @@ const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData(Foru
113
113
  status: 'planned',
114
114
  rawSlug: 'PlayStation®: NA and EU megaservers for',
115
115
  rawDate: 'September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
116
- dates: [ Moment<2024-09-04T10:00:00Z>, Moment<2024-09-04T16:00:00Z> ]
116
+ dates: [ '2024-09-04T10:00:00Z', '2024-09-04T16:00:00Z' ]
117
117
  },
118
118
  {
119
119
  source: 'https://forums.elderscrollsonline.com',
@@ -125,7 +125,7 @@ const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData(Foru
125
125
  status: 'planned',
126
126
  rawSlug: 'ESO Store and Account System for',
127
127
  rawDate: 'September 4, 10:00AM EDT (14:00 UTC) - 12:00PM EDT (16:00 UTC)',
128
- dates: [ Moment<2024-09-04T14:00:00Z>, Moment<2024-09-04T16:00:00Z> ]
128
+ dates: [ '2024-09-04T14:00:00Z', '2024-09-04T16:00:00Z' ]
129
129
  },
130
130
  {
131
131
  source: 'https://forums.elderscrollsonline.com',
@@ -137,7 +137,7 @@ const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData(Foru
137
137
  status: 'planned',
138
138
  rawSlug: 'ESO Store and Account System for',
139
139
  rawDate: 'September 4, 10:00AM EDT (14:00 UTC) - 12:00PM EDT (16:00 UTC)',
140
- dates: [ Moment<2024-09-04T14:00:00Z>, Moment<2024-09-04T16:00:00Z> ]
140
+ dates: [ '2024-09-04T14:00:00Z', '2024-09-04T16:00:00Z' ]
141
141
  },
142
142
  {
143
143
  source: 'https://forums.elderscrollsonline.com/en/categories/pts',
@@ -150,7 +150,7 @@ const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData(Foru
150
150
  rawSlug: 'PTS',
151
151
  rawDate: 'Thursday at 9:00AM EDT (13:00 UTC)',
152
152
  rawStatus: 'We will be performing maintenance',
153
- dates: [ Moment<2024-09-05T13:00:00Z> ]
153
+ dates: [ '2024-09-05T13:00:00Z' ]
154
154
  }
155
155
  ]
156
156
  ```
package/lib/connector.js CHANGED
@@ -72,19 +72,26 @@ class Connector {
72
72
  * @private
73
73
  */
74
74
  replace() {
75
- 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) => {
76
80
  let initialRaw = raw;
77
81
  initialRaw = initialRaw.replace(' 。', '');
82
+ initialRaw = initialRaw.replace(/\n/g, '');
78
83
  initialRaw = initialRaw.replace(/<br\/>\n/g, '<br>');
79
- initialRaw = initialRaw.replace('. <br>', '.<br>');
80
84
  initialRaw = initialRaw.replace(' Thank you for your patience.', '');
85
+ if (initialRaw.endsWith(' ')) {
86
+ initialRaw = initialRaw.substring(0, initialRaw.length - 1);
87
+ }
81
88
  if (initialRaw.includes('. Please check here for status updates: <a href')) {
82
89
  return initialRaw.split(' Please check here for status updates: <a href')[0];
83
90
  }
84
- if (initialRaw.includes('. <a href')) {
91
+ if (initialRaw.includes(' <a href')) {
85
92
  return initialRaw.split(' <a href')[0];
86
93
  }
87
- return initialRaw.replace('. ', '.');
94
+ return initialRaw;
88
95
  });
89
96
  }
90
97
  /**
@@ -106,8 +113,12 @@ class Connector {
106
113
  filter() {
107
114
  this.raw = this.raw.filter((raw) => {
108
115
  return (!raw.includes('Maintenance for the week of ') &&
116
+ !raw.includes('Mantenimiento de la semana del ') &&
109
117
  !raw.includes('• PC/Mac: No maintenance – ') &&
110
- raw !== '');
118
+ !raw.includes('hora peninsular') &&
119
+ raw !== '' &&
120
+ !raw.startsWith('<') &&
121
+ !raw.endsWith('>'));
111
122
  });
112
123
  }
113
124
  /**
@@ -34,6 +34,7 @@ class SlugIdentifier {
34
34
  this.ServerPcEuMatchesList = [
35
35
  'PC/Mac: EU megaserver for',
36
36
  'PC/Mac: NA and EU megaservers for',
37
+ '] EU megaservers for',
37
38
  ];
38
39
  /**
39
40
  * List of indicators proving that the announcement pertains to the slug server_pc_na
@@ -42,6 +43,7 @@ class SlugIdentifier {
42
43
  this.ServerPcNaMatchesList = [
43
44
  'PC/Mac: NA megaserver for',
44
45
  'PC/Mac: NA and EU megaservers for',
46
+ '] NA megaservers for',
45
47
  ];
46
48
  /**
47
49
  * List of indicators proving that the announcement pertains to the slug server_pc_pts
@@ -55,6 +57,7 @@ class SlugIdentifier {
55
57
  this.ServerPsEuMatchesList = [
56
58
  'PlayStation®: NA and EU megaservers for',
57
59
  'The PlayStation™ Network',
60
+ '] EU megaservers for',
58
61
  ];
59
62
  /**
60
63
  * List of indicators proving that the announcement pertains to the slug server_ps_na
@@ -63,6 +66,7 @@ class SlugIdentifier {
63
66
  this.ServerPsNaMatchesList = [
64
67
  'PlayStation®: NA and EU megaservers for',
65
68
  'The PlayStation™ Network',
69
+ '] NA megaservers for',
66
70
  ];
67
71
  /**
68
72
  * List of indicators proving that the announcement pertains to the slug server_xbox_eu
@@ -71,6 +75,7 @@ class SlugIdentifier {
71
75
  this.ServerXboxEuMatchesList = [
72
76
  'Xbox: NA and EU megaservers for',
73
77
  'Xbox: EU megaserver for',
78
+ '] EU megaservers for',
74
79
  ];
75
80
  /**
76
81
  * List of indicators proving that the announcement pertains to the slug server_xbox_na
@@ -78,6 +83,7 @@ class SlugIdentifier {
78
83
  */
79
84
  this.ServerXboxNaMatchesList = [
80
85
  'Xbox: NA and EU megaservers for',
86
+ '] NA megaservers for',
81
87
  ];
82
88
  /**
83
89
  * List of indicators proving that the announcement pertains to the slug service_store_eso
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Different slugs of announcements concerning the European PC/Mac Megaserver
3
3
  */
4
- export type RemoteServerPcEuRawSlug = 'PC/Mac: EU megaserver for' | 'PC/Mac: NA and EU megaservers for';
4
+ export type RemoteServerPcEuRawSlug = 'PC/Mac: EU megaserver for' | 'PC/Mac: NA and EU megaservers for' | '] EU megaservers for';
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Different slugs of announcements concerning the North American PC/Mac Megaserver
3
3
  */
4
- export type RemoteServerPcNaRawSlug = 'PC/Mac: NA megaserver for' | 'PC/Mac: NA and EU megaservers for';
4
+ export type RemoteServerPcNaRawSlug = 'PC/Mac: NA megaserver for' | 'PC/Mac: NA and EU megaservers for' | '] NA megaservers for';
@@ -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' | 'The PlayStation™ Network';
4
+ export type RemoteServerPsEuRawSlug = 'PlayStation®: NA and EU megaservers for' | 'The PlayStation™ Network' | '] EU megaservers for';
@@ -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' | 'The PlayStation™ Network';
4
+ export type RemoteServerPsNaRawSlug = 'PlayStation®: NA and EU megaservers for' | 'The PlayStation™ Network' | '] NA megaservers for';
@@ -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' | 'Xbox: EU megaserver for';
4
+ export type RemoteServerXboxEuRawSlug = 'Xbox: NA and EU megaservers for' | 'Xbox: EU megaserver for' | '] EU megaservers for';
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Different slugs of announcements concerning the North American Xbox Megaserver
3
3
  */
4
- export type RemoteServerXboxNaRawSlug = 'Xbox: NA and EU megaservers for';
4
+ export type RemoteServerXboxNaRawSlug = 'Xbox: NA and EU megaservers for' | '] NA megaservers for';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eso-status/forum-message",
3
- "version": "2.0.0-dev.10",
3
+ "version": "2.0.0-dev.12",
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",