@eso-status/forum-message 2.0.0-dev.13 → 2.0.0-dev.15
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.d.ts +3 -3
- package/lib/connector.js +8 -31
- package/lib/identifier/slug.identifier.js +1 -0
- package/lib/identifier/status.identifier.js +1 -0
- package/lib/type/remoteIssuesRawStatus.type.d.ts +1 -1
- package/lib/type/remoteServerPcNaRawSlug.type.d.ts +1 -1
- package/package.json +1 -1
package/lib/connector.d.ts
CHANGED
|
@@ -60,9 +60,9 @@ export default class Connector {
|
|
|
60
60
|
*/
|
|
61
61
|
private fetch;
|
|
62
62
|
/**
|
|
63
|
-
* Method
|
|
64
|
-
* @param
|
|
63
|
+
* Method for retrieving the information contained in an announcement
|
|
64
|
+
* @param raw Raw data of the announcement
|
|
65
65
|
* @private
|
|
66
66
|
*/
|
|
67
|
-
private
|
|
67
|
+
private fetchEach;
|
|
68
68
|
}
|
package/lib/connector.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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");
|
|
5
4
|
const raw_1 = require("./raw");
|
|
6
5
|
/**
|
|
7
6
|
* Class for retrieving information from announcements
|
|
@@ -82,6 +81,8 @@ class Connector {
|
|
|
82
81
|
initialRaw = initialRaw.replace(/\n/g, '');
|
|
83
82
|
initialRaw = initialRaw.replace(/<br\/>\n/g, '<br>');
|
|
84
83
|
initialRaw = initialRaw.replace(' Thank you for your patience.', '');
|
|
84
|
+
initialRaw = initialRaw.replace(' We will update as new information becomes available.', '');
|
|
85
|
+
initialRaw = initialRaw.replace(' If you continue to experience difficulties at login, please restart your client. Thank you for your patience!', '');
|
|
85
86
|
if (initialRaw.endsWith(' ')) {
|
|
86
87
|
initialRaw = initialRaw.substring(0, initialRaw.length - 1);
|
|
87
88
|
}
|
|
@@ -126,40 +127,16 @@ class Connector {
|
|
|
126
127
|
* @private
|
|
127
128
|
*/
|
|
128
129
|
fetch() {
|
|
129
|
-
|
|
130
|
-
this.raw.forEach((raw) => {
|
|
131
|
-
new raw_1.default(this.url, raw).matches.forEach((match) => {
|
|
132
|
-
matches.push(match);
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
this.fetchAll(matches);
|
|
130
|
+
this.raw.forEach((raw) => this.fetchEach(raw));
|
|
136
131
|
}
|
|
137
132
|
/**
|
|
138
|
-
* Method
|
|
139
|
-
* @param
|
|
133
|
+
* Method for retrieving the information contained in an announcement
|
|
134
|
+
* @param raw Raw data of the announcement
|
|
140
135
|
* @private
|
|
141
136
|
*/
|
|
142
|
-
|
|
143
|
-
matches.forEach((match) => {
|
|
144
|
-
|
|
145
|
-
const alone = matches.filter((esoStatusRawData) => esoStatusRawData.slug === match.slug).length === 1;
|
|
146
|
-
const slugIsIssues = matches.filter((esoStatusRawData) => esoStatusRawData.status === types_1.IssuesStatus &&
|
|
147
|
-
esoStatusRawData.slug === match.slug).length !== 0;
|
|
148
|
-
const slugIsUp = matches.filter((esoStatusRawData) => esoStatusRawData.status === types_1.UpStatus &&
|
|
149
|
-
esoStatusRawData.slug === match.slug).length !== 0;
|
|
150
|
-
const slugIsDown = matches.filter((esoStatusRawData) => esoStatusRawData.status === types_1.DownStatus &&
|
|
151
|
-
esoStatusRawData.slug === match.slug).length !== 0;
|
|
152
|
-
const countSlugMaintenance = matches.filter((esoStatusRawData) => esoStatusRawData.status === types_1.PlannedStatus &&
|
|
153
|
-
esoStatusRawData.slug === match.slug).length;
|
|
154
|
-
if (!alreadyInList) {
|
|
155
|
-
if (alone ||
|
|
156
|
-
countSlugMaintenance >= 2 ||
|
|
157
|
-
(match.status === types_1.IssuesStatus && slugIsIssues) ||
|
|
158
|
-
(match.status === types_1.UpStatus && slugIsUp) ||
|
|
159
|
-
(match.status === types_1.DownStatus && slugIsDown)) {
|
|
160
|
-
this.rawEsoStatus.push(match);
|
|
161
|
-
}
|
|
162
|
-
}
|
|
137
|
+
fetchEach(raw) {
|
|
138
|
+
new raw_1.default(this.url, raw).matches.forEach((match) => {
|
|
139
|
+
this.rawEsoStatus.push(match);
|
|
163
140
|
});
|
|
164
141
|
}
|
|
165
142
|
}
|
|
@@ -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';
|
|
4
|
+
export type RemoteIssuesRawStatus = 'is currently experiencing a service interruption' | 'currently investigating connection issues';
|
|
@@ -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' | '] NA megaservers for' | '• NA megaservers for';
|
|
4
|
+
export type RemoteServerPcNaRawSlug = 'PC/Mac: NA megaserver for' | 'PC/Mac: NA and EU megaservers for' | '] NA megaservers for' | '• NA megaservers for' | 'North American PC/Mac megaserver';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eso-status/forum-message",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
3
|
+
"version": "2.0.0-dev.15",
|
|
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",
|