@eso-status/forum-message 2.0.0-dev.15 → 2.0.0-dev.17

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/connector.js CHANGED
@@ -73,16 +73,29 @@ class Connector {
73
73
  replace() {
74
74
  const list = [];
75
75
  this.raw.forEach((raw) => {
76
- list.push(...raw.split('<br/>'));
76
+ raw.split('<br').forEach((line) => {
77
+ const split = line.split('/>');
78
+ list.push(split.join(''));
79
+ });
77
80
  });
78
81
  this.raw = list.map((raw) => {
79
82
  let initialRaw = raw;
80
83
  initialRaw = initialRaw.replace(' 。', '');
81
84
  initialRaw = initialRaw.replace(/\n/g, '');
82
85
  initialRaw = initialRaw.replace(/<br\/>\n/g, '<br>');
86
+ initialRaw = initialRaw.replace(' Thank you for your patience!', '');
83
87
  initialRaw = initialRaw.replace(' Thank you for your patience.', '');
84
88
  initialRaw = initialRaw.replace(' We will update as new information becomes available.', '');
85
89
  initialRaw = initialRaw.replace(' If you continue to experience difficulties at login, please restart your client. Thank you for your patience!', '');
90
+ if (initialRaw.includes('\t')) {
91
+ const split = initialRaw.split('\t');
92
+ if (split[0] === ' ') {
93
+ return split[1];
94
+ }
95
+ if (split[0].includes('•')) {
96
+ return `• ${split[1]}`;
97
+ }
98
+ }
86
99
  if (initialRaw.endsWith(' ')) {
87
100
  initialRaw = initialRaw.substring(0, initialRaw.length - 1);
88
101
  }
@@ -72,6 +72,7 @@ class SlugIdentifier {
72
72
  'The PlayStation™ Network',
73
73
  '] NA megaservers for',
74
74
  '• NA megaservers for',
75
+ 'North American PlayStation® megaserver',
75
76
  ];
76
77
  /**
77
78
  * List of indicators proving that the announcement pertains to the slug server_xbox_eu
@@ -45,6 +45,7 @@ class StatusIdentifier {
45
45
  */
46
46
  this.plannedMatchesList = [
47
47
  'We will be performing maintenance',
48
+ 'will be taken offline for maintenance',
48
49
  ];
49
50
  /**
50
51
  * List of indicators proving that the announcement pertains to the status issues
@@ -52,7 +53,7 @@ class StatusIdentifier {
52
53
  */
53
54
  this.issuesMatchesList = [
54
55
  'is currently experiencing a service interruption',
55
- 'currently investigating connection issues',
56
+ 'currently investigating',
56
57
  ];
57
58
  this.statusList.forEach((status) => this.identify(status));
58
59
  this.default();
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Different statuses of announcements indicating that the announcement refers to a service/server that is not functioning properly
3
3
  */
4
- export type RemoteIssuesRawStatus = 'is currently experiencing a service interruption' | 'currently investigating connection issues';
4
+ export type RemoteIssuesRawStatus = 'is currently experiencing a service interruption' | 'currently investigating';
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Different statuses of announcements indicating that the announcement refers to a service/server that will be undergoing maintenance soon
3
3
  */
4
- export type RemotePlannedRawStatus = 'We will be performing maintenance';
4
+ export type RemotePlannedRawStatus = 'We will be performing maintenance' | 'will be taken offline for maintenance';
@@ -6,7 +6,8 @@ import { RemoteServerXboxEuRawSlug } from './remoteServerXboxEuRawSlug.type';
6
6
  import { RemoteServiceStoreEsoRawSlug } from './remoteServiceStoreEsoRawSlug.type';
7
7
  import { RemoteServiceWebSiteRawSlug } from './remoteServiceWebSiteRawSlug.type';
8
8
  import { RemoteServerXboxNaRawSlug } from './remoteServerXboxNaRawSlug.type';
9
+ import { RemoteServerPsNaRawSlug } from './remoteServerPsNaRawSlug.type';
9
10
  /**
10
11
  * Different slugs of announcements
11
12
  */
12
- export type RemoteRawSlug = RemoteServerPcEuRawSlug | RemoteServerPcNaRawSlug | RemoteServerPcPtsRawSlug | RemoteServerPsEuRawSlug | RemoteServerXboxEuRawSlug | RemoteServerXboxNaRawSlug | RemoteServiceStoreEsoRawSlug | RemoteServiceWebSiteRawSlug;
13
+ export type RemoteRawSlug = RemoteServerPcEuRawSlug | RemoteServerPcNaRawSlug | RemoteServerPcPtsRawSlug | RemoteServerPsEuRawSlug | RemoteServerPsNaRawSlug | RemoteServerXboxEuRawSlug | RemoteServerXboxNaRawSlug | RemoteServiceStoreEsoRawSlug | RemoteServiceWebSiteRawSlug;
@@ -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' | '] NA megaservers for' | '• NA megaservers for';
4
+ export type RemoteServerPsNaRawSlug = 'PlayStation®: NA and EU megaservers for' | 'The PlayStation™ Network' | '] NA megaservers for' | '• NA megaservers for' | 'North American PlayStation® megaserver';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eso-status/forum-message",
3
- "version": "2.0.0-dev.15",
3
+ "version": "2.0.0-dev.17",
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",
@@ -93,7 +93,7 @@
93
93
  "moment": "2.30.1"
94
94
  },
95
95
  "devDependencies": {
96
- "@types/jest": "29.5.13",
96
+ "@types/jest": "29.5.14",
97
97
  "eslint": "8.57.1",
98
98
  "eslint-config-airbnb-base": "15.0.0",
99
99
  "eslint-config-airbnb-typescript": "18.0.0",