@eso-status/forum-message 2.0.0-dev.12 → 2.0.0-dev.14
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 +6 -25
- package/lib/identifier/slug.identifier.js +6 -0
- package/lib/type/remoteServerPcEuRawSlug.type.d.ts +1 -1
- package/lib/type/remoteServerPcNaRawSlug.type.d.ts +1 -1
- package/lib/type/remoteServerPsEuRawSlug.type.d.ts +1 -1
- package/lib/type/remoteServerPsNaRawSlug.type.d.ts +1 -1
- package/lib/type/remoteServerXboxEuRawSlug.type.d.ts +1 -1
- package/lib/type/remoteServerXboxNaRawSlug.type.d.ts +1 -1
- package/package.json +2 -2
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
|
|
@@ -126,34 +125,16 @@ class Connector {
|
|
|
126
125
|
* @private
|
|
127
126
|
*/
|
|
128
127
|
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);
|
|
128
|
+
this.raw.forEach((raw) => this.fetchEach(raw));
|
|
136
129
|
}
|
|
137
130
|
/**
|
|
138
|
-
* Method
|
|
139
|
-
* @param
|
|
131
|
+
* Method for retrieving the information contained in an announcement
|
|
132
|
+
* @param raw Raw data of the announcement
|
|
140
133
|
* @private
|
|
141
134
|
*/
|
|
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
|
-
if (!alreadyInList) {
|
|
151
|
-
if (alone ||
|
|
152
|
-
(match.status === types_1.IssuesStatus && slugIsIssues) ||
|
|
153
|
-
(match.status === types_1.UpStatus && slugIsUp)) {
|
|
154
|
-
this.rawEsoStatus.push(match);
|
|
155
|
-
}
|
|
156
|
-
}
|
|
135
|
+
fetchEach(raw) {
|
|
136
|
+
new raw_1.default(this.url, raw).matches.forEach((match) => {
|
|
137
|
+
this.rawEsoStatus.push(match);
|
|
157
138
|
});
|
|
158
139
|
}
|
|
159
140
|
}
|
|
@@ -35,6 +35,7 @@ class SlugIdentifier {
|
|
|
35
35
|
'PC/Mac: EU megaserver for',
|
|
36
36
|
'PC/Mac: NA and EU megaservers for',
|
|
37
37
|
'] EU megaservers for',
|
|
38
|
+
'• EU megaservers for',
|
|
38
39
|
];
|
|
39
40
|
/**
|
|
40
41
|
* List of indicators proving that the announcement pertains to the slug server_pc_na
|
|
@@ -44,6 +45,7 @@ class SlugIdentifier {
|
|
|
44
45
|
'PC/Mac: NA megaserver for',
|
|
45
46
|
'PC/Mac: NA and EU megaservers for',
|
|
46
47
|
'] NA megaservers for',
|
|
48
|
+
'• NA megaservers for',
|
|
47
49
|
];
|
|
48
50
|
/**
|
|
49
51
|
* List of indicators proving that the announcement pertains to the slug server_pc_pts
|
|
@@ -58,6 +60,7 @@ class SlugIdentifier {
|
|
|
58
60
|
'PlayStation®: NA and EU megaservers for',
|
|
59
61
|
'The PlayStation™ Network',
|
|
60
62
|
'] EU megaservers for',
|
|
63
|
+
'• EU megaservers for',
|
|
61
64
|
];
|
|
62
65
|
/**
|
|
63
66
|
* List of indicators proving that the announcement pertains to the slug server_ps_na
|
|
@@ -67,6 +70,7 @@ class SlugIdentifier {
|
|
|
67
70
|
'PlayStation®: NA and EU megaservers for',
|
|
68
71
|
'The PlayStation™ Network',
|
|
69
72
|
'] NA megaservers for',
|
|
73
|
+
'• NA megaservers for',
|
|
70
74
|
];
|
|
71
75
|
/**
|
|
72
76
|
* List of indicators proving that the announcement pertains to the slug server_xbox_eu
|
|
@@ -76,6 +80,7 @@ class SlugIdentifier {
|
|
|
76
80
|
'Xbox: NA and EU megaservers for',
|
|
77
81
|
'Xbox: EU megaserver for',
|
|
78
82
|
'] EU megaservers for',
|
|
83
|
+
'• EU megaservers for',
|
|
79
84
|
];
|
|
80
85
|
/**
|
|
81
86
|
* List of indicators proving that the announcement pertains to the slug server_xbox_na
|
|
@@ -84,6 +89,7 @@ class SlugIdentifier {
|
|
|
84
89
|
this.ServerXboxNaMatchesList = [
|
|
85
90
|
'Xbox: NA and EU megaservers for',
|
|
86
91
|
'] NA megaservers for',
|
|
92
|
+
'• NA megaservers for',
|
|
87
93
|
];
|
|
88
94
|
/**
|
|
89
95
|
* 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' | '] EU megaservers for';
|
|
4
|
+
export type RemoteServerPcEuRawSlug = 'PC/Mac: EU megaserver for' | 'PC/Mac: NA and EU megaservers for' | '] 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' | '] 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';
|
|
@@ -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' | '] EU megaservers for';
|
|
4
|
+
export type RemoteServerPsEuRawSlug = 'PlayStation®: NA and EU megaservers for' | 'The PlayStation™ Network' | '] EU megaservers for' | '• 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' | '] NA megaservers for';
|
|
4
|
+
export type RemoteServerPsNaRawSlug = 'PlayStation®: NA and EU megaservers for' | 'The PlayStation™ Network' | '] NA megaservers for' | '• 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' | '] EU megaservers for';
|
|
4
|
+
export type RemoteServerXboxEuRawSlug = 'Xbox: NA and EU megaservers for' | 'Xbox: EU megaserver for' | '] EU megaservers 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' | '] NA megaservers for';
|
|
4
|
+
export type RemoteServerXboxNaRawSlug = 'Xbox: NA and EU megaservers for' | '] NA 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.
|
|
3
|
+
"version": "2.0.0-dev.14",
|
|
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",
|
|
@@ -100,7 +100,7 @@
|
|
|
100
100
|
"eslint-config-prettier": "9.1.0",
|
|
101
101
|
"eslint-plugin-jest": "28.8.3",
|
|
102
102
|
"eslint-plugin-prettier": "5.2.1",
|
|
103
|
-
"eslint-plugin-sonarjs": "2.0.
|
|
103
|
+
"eslint-plugin-sonarjs": "2.0.4",
|
|
104
104
|
"eslint-plugin-unused-imports": "4.1.4",
|
|
105
105
|
"husky": "9.1.6",
|
|
106
106
|
"jest": "29.7.0",
|