@eso-status/forum-message 2.0.0-dev.23 → 2.0.0-dev.24
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 +118 -112
- package/lib/connector.d.ts +40 -5
- package/lib/connector.js +93 -67
- package/lib/formatter/date.formatter.js +3 -3
- package/lib/identifier/slug.identifier.js +28 -48
- package/lib/index.js +2 -2
- package/lib/raw.d.ts +10 -0
- package/lib/raw.js +18 -0
- package/lib/type/remoteRawSlug.type.d.ts +2 -1
- 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/lib/type/remoteServiceStoreEsoRawSlug.type.d.ts +1 -1
- package/lib/type/remoteServiceSystemAccountRawSlug.type.d.ts +1 -1
- package/lib/type/remoteServiceWebSiteRawSlug.type.d.ts +1 -1
- package/lib/type/sourceUrl.type.d.ts +3 -1
- package/package.json +6 -6
- package/lib/const.d.ts +0 -9
- package/lib/const.js +0 -12
package/README.md
CHANGED
|
@@ -19,138 +19,144 @@
|
|
|
19
19
|
eso-status/forum-message is a library for retrieving and formatting data, which can be found at [https://forums.elderscrollsonline.com](https://forums.elderscrollsonline.com) or [https://forums.elderscrollsonline.com/en/categories/pts](https://forums.elderscrollsonline.com/en/categories/pts).
|
|
20
20
|
|
|
21
21
|
## Table of Contents
|
|
22
|
+
|
|
22
23
|
- [Install](#install)
|
|
23
24
|
- [Usage](#usage)
|
|
24
25
|
- [Return exemple](#return-exemple)
|
|
25
26
|
|
|
26
27
|
### Install
|
|
28
|
+
|
|
27
29
|
```shell
|
|
28
30
|
npm i @eso-status/forum-message
|
|
29
31
|
```
|
|
30
32
|
|
|
31
33
|
### Usage
|
|
34
|
+
|
|
32
35
|
```javascript
|
|
33
|
-
import ForumMessage from '@eso-status/forum-message';
|
|
34
36
|
import { EsoStatusRawData } from '@eso-status/types';
|
|
35
|
-
import
|
|
37
|
+
import ForumMessage from '@eso-status/forum-message';
|
|
38
|
+
import ForumMessageUrl from '@eso-status/forum-message/const/ForumMessageUrl.const';
|
|
36
39
|
|
|
37
40
|
// Homepage data
|
|
38
41
|
const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData();
|
|
39
42
|
|
|
40
43
|
// PTS category homepage data
|
|
41
|
-
const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData(
|
|
44
|
+
const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData('https://forums.elderscrollsonline.com');
|
|
42
45
|
```
|
|
46
|
+
|
|
43
47
|
### Return exemple
|
|
48
|
+
|
|
44
49
|
```text
|
|
45
50
|
[
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
51
|
+
{
|
|
52
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
53
|
+
raw: '[IN PROGRESS] NA megaservers for patch maintenance - March 9, 4:00AM EDT (8:00 UTC) - 12:00PM EDT (16:00 UTC)',
|
|
54
|
+
pattern: '[IN PROGRESS] NA megaservers for maintenance - [month] [day number], [hour]:[minute][meridiem] [timezone] ([hour]:[minute] [timezone]) - [hour]:[minute][meridiem] [timezone] ([hour]:[minute] [timezone])',
|
|
55
|
+
slug: 'server_pc_na',
|
|
56
|
+
type: 'server',
|
|
57
|
+
support: 'pc',
|
|
58
|
+
zone: 'na',
|
|
59
|
+
status: 'down',
|
|
60
|
+
rawStatus: '[IN PROGRESS]',
|
|
61
|
+
rawSlug: '[IN PROGRESS] NA megaservers',
|
|
62
|
+
rawDate: 'March 9, 4:00AM EDT (8:00 UTC) - 12:00PM EDT (16:00 UTC)',
|
|
63
|
+
dates: ['2026-03-09T08:00:00.000Z', '2026-03-09T16:00:00.000Z'],
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
67
|
+
raw: '[IN PROGRESS] NA megaservers for patch maintenance - March 9, 4:00AM EDT (8:00 UTC) - 12:00PM EDT (16:00 UTC)',
|
|
68
|
+
pattern: '[IN PROGRESS] NA megaservers for maintenance - [month] [day number], [hour]:[minute][meridiem] [timezone] ([hour]:[minute] [timezone]) - [hour]:[minute][meridiem] [timezone] ([hour]:[minute] [timezone])',
|
|
69
|
+
slug: 'server_ps_na',
|
|
70
|
+
type: 'server',
|
|
71
|
+
support: 'ps',
|
|
72
|
+
zone: 'na',
|
|
73
|
+
status: 'down',
|
|
74
|
+
rawStatus: '[IN PROGRESS]',
|
|
75
|
+
rawSlug: '[IN PROGRESS] NA megaservers',
|
|
76
|
+
rawDate: 'March 9, 4:00AM EDT (8:00 UTC) - 12:00PM EDT (16:00 UTC)',
|
|
77
|
+
dates: ['2026-03-09T08:00:00.000Z', '2026-03-09T16:00:00.000Z'],
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
81
|
+
raw: '[IN PROGRESS] NA megaservers for patch maintenance - March 9, 4:00AM EDT (8:00 UTC) - 12:00PM EDT (16:00 UTC)',
|
|
82
|
+
pattern: '[IN PROGRESS] NA megaservers for maintenance - [month] [day number], [hour]:[minute][meridiem] [timezone] ([hour]:[minute] [timezone]) - [hour]:[minute][meridiem] [timezone] ([hour]:[minute] [timezone])',
|
|
83
|
+
slug: 'server_xbox_na',
|
|
84
|
+
type: 'server',
|
|
85
|
+
support: 'xbox',
|
|
86
|
+
zone: 'na',
|
|
87
|
+
status: 'down',
|
|
88
|
+
rawStatus: '[IN PROGRESS]',
|
|
89
|
+
rawSlug: '[IN PROGRESS] NA megaservers',
|
|
90
|
+
rawDate: 'March 9, 4:00AM EDT (8:00 UTC) - 12:00PM EDT (16:00 UTC)',
|
|
91
|
+
dates: ['2026-03-09T08:00:00.000Z', '2026-03-09T16:00:00.000Z'],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
95
|
+
raw: '[IN PROGRESS] EU megaservers for patch maintenance - March 9, 8:00 UTC (4:00AM EDT) - 16:00 UTC (12:00PM EDT)',
|
|
96
|
+
pattern: '[IN PROGRESS] EU megaservers for maintenance - [month] [day number], [hour]:[minute] [timezone] ([hour]:[minute][meridiem] [timezone]) - [hour]:[minute] [timezone] ([hour]:[minute][meridiem] [timezone])',
|
|
97
|
+
slug: 'server_pc_eu',
|
|
98
|
+
type: 'server',
|
|
99
|
+
support: 'pc',
|
|
100
|
+
zone: 'eu',
|
|
101
|
+
status: 'down',
|
|
102
|
+
rawStatus: '[IN PROGRESS]',
|
|
103
|
+
rawSlug: '[IN PROGRESS] EU megaservers',
|
|
104
|
+
rawDate: 'March 9, 8:00 UTC (4:00AM EDT) - 16:00 UTC (12:00PM EDT)',
|
|
105
|
+
dates: ['2026-03-09T08:00:00.000Z', '2026-03-09T16:00:00.000Z'],
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
109
|
+
raw: '[IN PROGRESS] EU megaservers for patch maintenance - March 9, 8:00 UTC (4:00AM EDT) - 16:00 UTC (12:00PM EDT)',
|
|
110
|
+
pattern: '[IN PROGRESS] EU megaservers for maintenance - [month] [day number], [hour]:[minute] [timezone] ([hour]:[minute][meridiem] [timezone]) - [hour]:[minute] [timezone] ([hour]:[minute][meridiem] [timezone])',
|
|
111
|
+
slug: 'server_ps_eu',
|
|
112
|
+
type: 'server',
|
|
113
|
+
support: 'ps',
|
|
114
|
+
zone: 'eu',
|
|
115
|
+
status: 'down',
|
|
116
|
+
rawStatus: '[IN PROGRESS]',
|
|
117
|
+
rawSlug: '[IN PROGRESS] EU megaservers',
|
|
118
|
+
rawDate: 'March 9, 8:00 UTC (4:00AM EDT) - 16:00 UTC (12:00PM EDT)',
|
|
119
|
+
dates: ['2026-03-09T08:00:00.000Z', '2026-03-09T16:00:00.000Z'],
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
123
|
+
raw: '[IN PROGRESS] EU megaservers for patch maintenance - March 9, 8:00 UTC (4:00AM EDT) - 16:00 UTC (12:00PM EDT)',
|
|
124
|
+
pattern: '[IN PROGRESS] EU megaservers for maintenance - [month] [day number], [hour]:[minute] [timezone] ([hour]:[minute][meridiem] [timezone]) - [hour]:[minute] [timezone] ([hour]:[minute][meridiem] [timezone])',
|
|
125
|
+
slug: 'server_xbox_eu',
|
|
126
|
+
type: 'server',
|
|
127
|
+
support: 'xbox',
|
|
128
|
+
zone: 'eu',
|
|
129
|
+
status: 'down',
|
|
130
|
+
rawStatus: '[IN PROGRESS]',
|
|
131
|
+
rawSlug: '[IN PROGRESS] EU megaservers',
|
|
132
|
+
rawDate: 'March 9, 8:00 UTC (4:00AM EDT) - 16:00 UTC (12:00PM EDT)',
|
|
133
|
+
dates: ['2026-03-09T08:00:00.000Z', '2026-03-09T16:00:00.000Z'],
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
137
|
+
raw: 'ESO Store and Account System for maintenance - March 11, 9:00AM EDT (13:00 UTC) - 1:00PM EDT (17:00 UTC)',
|
|
138
|
+
pattern: 'ESO Store and Account System for maintenance - [month] [day number], [hour]:[minute][meridiem] [timezone] ([hour]:[minute] [timezone]) - [hour]:[minute][meridiem] [timezone] ([hour]:[minute] [timezone])',
|
|
139
|
+
slug: 'service_store_eso',
|
|
140
|
+
type: 'service',
|
|
141
|
+
support: 'store',
|
|
142
|
+
zone: 'eso',
|
|
143
|
+
status: 'planned',
|
|
144
|
+
rawSlug: 'ESO Store',
|
|
145
|
+
rawDate: 'March 11, 9:00AM EDT (13:00 UTC) - 1:00PM EDT (17:00 UTC)',
|
|
146
|
+
dates: ['2026-03-11T13:00:00.000Z', '2026-03-11T17:00:00.000Z'],
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
150
|
+
raw: 'ESO Store and Account System for maintenance - March 11, 9:00AM EDT (13:00 UTC) - 1:00PM EDT (17:00 UTC)',
|
|
151
|
+
pattern: 'ESO Store and Account System for maintenance - [month] [day number], [hour]:[minute][meridiem] [timezone] ([hour]:[minute] [timezone]) - [hour]:[minute][meridiem] [timezone] ([hour]:[minute] [timezone])',
|
|
152
|
+
slug: 'service_system_account',
|
|
153
|
+
type: 'service',
|
|
154
|
+
support: 'system',
|
|
155
|
+
zone: 'account',
|
|
156
|
+
status: 'planned',
|
|
157
|
+
rawSlug: 'Account System',
|
|
158
|
+
rawDate: 'March 11, 9:00AM EDT (13:00 UTC) - 1:00PM EDT (17:00 UTC)',
|
|
159
|
+
dates: ['2026-03-11T13:00:00.000Z', '2026-03-11T17:00:00.000Z'],
|
|
160
|
+
},
|
|
155
161
|
]
|
|
156
162
|
```
|
package/lib/connector.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SourceUrl } from './type/sourceUrl.type';
|
|
2
2
|
import { EsoStatusRawData } from './interface/esoStatusRawData.interface';
|
|
3
|
+
import { MessagePatternType } from './type/messagePattern.type';
|
|
3
4
|
/**
|
|
4
5
|
* Class for retrieving information from announcements
|
|
5
6
|
*/
|
|
@@ -14,6 +15,30 @@ export default class Connector {
|
|
|
14
15
|
* List of information from announcements
|
|
15
16
|
*/
|
|
16
17
|
rawEsoStatus: EsoStatusRawData[];
|
|
18
|
+
/**
|
|
19
|
+
* Sanitized remote content to compare changes between two versions
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
private sanitizedRemoteContent;
|
|
23
|
+
/**
|
|
24
|
+
* Patterns that matched the raw messages from the data source
|
|
25
|
+
*/
|
|
26
|
+
patterns: MessagePatternType[];
|
|
27
|
+
/**
|
|
28
|
+
* List of information from announcements by zone
|
|
29
|
+
* @private
|
|
30
|
+
*/
|
|
31
|
+
private readonly messagesZones;
|
|
32
|
+
/**
|
|
33
|
+
* List of raw data from announcements
|
|
34
|
+
* @private
|
|
35
|
+
*/
|
|
36
|
+
private readonly messages;
|
|
37
|
+
/**
|
|
38
|
+
* List of sanitized data from announcements
|
|
39
|
+
* @private
|
|
40
|
+
*/
|
|
41
|
+
private sanitizedMessages;
|
|
17
42
|
/**
|
|
18
43
|
* @param url URL used as the source to retrieve announcements
|
|
19
44
|
* @param remoteContent Content of the source retrieved via URL
|
|
@@ -30,6 +55,11 @@ export default class Connector {
|
|
|
30
55
|
* @private
|
|
31
56
|
*/
|
|
32
57
|
private static getRemoteContent;
|
|
58
|
+
/**
|
|
59
|
+
* Get a sanitized remote content to compare changes between two versions
|
|
60
|
+
* @private
|
|
61
|
+
*/
|
|
62
|
+
private cleanRemoteContent;
|
|
33
63
|
/**
|
|
34
64
|
* Method for retrieving raw announcements for all announcement levels
|
|
35
65
|
* @private
|
|
@@ -40,15 +70,15 @@ export default class Connector {
|
|
|
40
70
|
* @private
|
|
41
71
|
*/
|
|
42
72
|
private getMessagesByType;
|
|
43
|
-
/**
|
|
44
|
-
* Method for formatting the raw data of retrieved announcements
|
|
45
|
-
* @private
|
|
46
|
-
*/
|
|
47
|
-
private replace;
|
|
48
73
|
/**
|
|
49
74
|
* Method for separating each announcement message
|
|
50
75
|
*/
|
|
51
76
|
private split;
|
|
77
|
+
/**
|
|
78
|
+
* Method for formatting the raw data of retrieved announcements
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
81
|
+
private sanitize;
|
|
52
82
|
/**
|
|
53
83
|
* Method for removing unnecessary announcements
|
|
54
84
|
* @private
|
|
@@ -65,4 +95,9 @@ export default class Connector {
|
|
|
65
95
|
* @private
|
|
66
96
|
*/
|
|
67
97
|
private fetchEach;
|
|
98
|
+
/**
|
|
99
|
+
* Method to get all patterns
|
|
100
|
+
* @private
|
|
101
|
+
*/
|
|
102
|
+
private generatePatternList;
|
|
68
103
|
}
|
package/lib/connector.js
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const axios_1 = require("axios");
|
|
4
3
|
const raw_1 = require("./raw");
|
|
4
|
+
const axios_1 = require("axios");
|
|
5
|
+
const ForumMessagePtsUrl_const_1 = require("./const/ForumMessagePtsUrl.const");
|
|
6
|
+
const types_1 = require("@eso-status/types");
|
|
7
|
+
const messageSanitize_pattern_1 = require("./pattern/message/messageSanitize.pattern");
|
|
8
|
+
const messageFilter_pattern_1 = require("./pattern/message/messageFilter.pattern");
|
|
9
|
+
const forumMessagePtsReplace_pattern_1 = require("./pattern/content/forumMessagePtsReplace.pattern");
|
|
10
|
+
const forumMessageReplace_pattern_1 = require("./pattern/content/forumMessageReplace.pattern");
|
|
5
11
|
/**
|
|
6
12
|
* Class for retrieving information from announcements
|
|
7
13
|
*/
|
|
@@ -16,6 +22,30 @@ class Connector {
|
|
|
16
22
|
* List of information from announcements
|
|
17
23
|
*/
|
|
18
24
|
rawEsoStatus = [];
|
|
25
|
+
/**
|
|
26
|
+
* Sanitized remote content to compare changes between two versions
|
|
27
|
+
* @private
|
|
28
|
+
*/
|
|
29
|
+
sanitizedRemoteContent = '';
|
|
30
|
+
/**
|
|
31
|
+
* Patterns that matched the raw messages from the data source
|
|
32
|
+
*/
|
|
33
|
+
patterns = [];
|
|
34
|
+
/**
|
|
35
|
+
* List of information from announcements by zone
|
|
36
|
+
* @private
|
|
37
|
+
*/
|
|
38
|
+
messagesZones = [];
|
|
39
|
+
/**
|
|
40
|
+
* List of raw data from announcements
|
|
41
|
+
* @private
|
|
42
|
+
*/
|
|
43
|
+
messages = [];
|
|
44
|
+
/**
|
|
45
|
+
* List of sanitized data from announcements
|
|
46
|
+
* @private
|
|
47
|
+
*/
|
|
48
|
+
sanitizedMessages = [];
|
|
19
49
|
/**
|
|
20
50
|
* @param url URL used as the source to retrieve announcements
|
|
21
51
|
* @param remoteContent Content of the source retrieved via URL
|
|
@@ -23,11 +53,14 @@ class Connector {
|
|
|
23
53
|
constructor(url, remoteContent) {
|
|
24
54
|
this.url = url;
|
|
25
55
|
this.remoteContent = remoteContent;
|
|
56
|
+
this.sanitizedRemoteContent = this.remoteContent;
|
|
57
|
+
this.cleanRemoteContent();
|
|
26
58
|
this.getMessages();
|
|
27
|
-
this.replace();
|
|
28
59
|
this.split();
|
|
60
|
+
this.sanitize();
|
|
29
61
|
this.filter();
|
|
30
62
|
this.fetch();
|
|
63
|
+
this.generatePatternList();
|
|
31
64
|
}
|
|
32
65
|
/**
|
|
33
66
|
* Method for creating an instance of the connector via a URL
|
|
@@ -45,6 +78,20 @@ class Connector {
|
|
|
45
78
|
const response = await axios_1.default.get(url);
|
|
46
79
|
return response.status === 200 && !!response.data ? response.data : '';
|
|
47
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Get a sanitized remote content to compare changes between two versions
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
cleanRemoteContent() {
|
|
86
|
+
for (const [pattern, replacement] of forumMessageReplace_pattern_1.default) {
|
|
87
|
+
this.sanitizedRemoteContent = this.sanitizedRemoteContent.replace(pattern, replacement.toString());
|
|
88
|
+
}
|
|
89
|
+
if (this.url === ForumMessagePtsUrl_const_1.default) {
|
|
90
|
+
for (const [pattern, replacement] of forumMessagePtsReplace_pattern_1.default) {
|
|
91
|
+
this.sanitizedRemoteContent = this.sanitizedRemoteContent.replace(pattern, replacement.toString());
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
48
95
|
/**
|
|
49
96
|
* Method for retrieving raw announcements for all announcement levels
|
|
50
97
|
* @private
|
|
@@ -59,70 +106,29 @@ class Connector {
|
|
|
59
106
|
* @private
|
|
60
107
|
*/
|
|
61
108
|
getMessagesByType(type) {
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
if (result.length >= 2) {
|
|
67
|
-
this.raw.push(result[0]);
|
|
68
|
-
}
|
|
69
|
-
});
|
|
109
|
+
const regex = new RegExp(String.raw `<div[^>]*class="[^"]*DismissMessage ${type}[^"]*"[^>]*>([\s\S]*?)<\/div>`, 'g');
|
|
110
|
+
for (const match of this.remoteContent.matchAll(regex)) {
|
|
111
|
+
this.messagesZones.push(match[1]);
|
|
112
|
+
}
|
|
70
113
|
}
|
|
71
114
|
/**
|
|
72
|
-
* Method for
|
|
73
|
-
* @private
|
|
115
|
+
* Method for separating each announcement message
|
|
74
116
|
*/
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
raw.split('<br').forEach((line) => {
|
|
79
|
-
const split = line.split('/>');
|
|
80
|
-
list.push(split.join(''));
|
|
81
|
-
});
|
|
82
|
-
});
|
|
83
|
-
this.raw = list.map((raw) => {
|
|
84
|
-
let initialRaw = raw;
|
|
85
|
-
initialRaw = initialRaw.replace(' 。', '');
|
|
86
|
-
initialRaw = initialRaw.replaceAll('\n', '');
|
|
87
|
-
initialRaw = initialRaw.replaceAll('>•', '•');
|
|
88
|
-
initialRaw = initialRaw.replaceAll(' •', '•');
|
|
89
|
-
initialRaw = initialRaw.replaceAll('<br/>\n', '<br>');
|
|
90
|
-
initialRaw = initialRaw.replace(' Thank you for your patience!', '');
|
|
91
|
-
initialRaw = initialRaw.replace(' Thank you for your patience.', '');
|
|
92
|
-
initialRaw = initialRaw.replace(' We will update as new information becomes available.', '');
|
|
93
|
-
initialRaw = initialRaw.replace(' If you continue to experience difficulties at login, please restart your client. Thank you for your patience!', '');
|
|
94
|
-
initialRaw = initialRaw.replace(' ', ' ');
|
|
95
|
-
if (initialRaw.includes('\t')) {
|
|
96
|
-
const split = initialRaw.split('\t');
|
|
97
|
-
if (split[0] === ' ') {
|
|
98
|
-
return split[1];
|
|
99
|
-
}
|
|
100
|
-
if (split[0].includes('•')) {
|
|
101
|
-
return `• ${split[1]}`;
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
if (initialRaw.endsWith(' ')) {
|
|
105
|
-
initialRaw = initialRaw.substring(0, initialRaw.length - 1);
|
|
106
|
-
}
|
|
107
|
-
if (initialRaw.includes('. Please check here for status updates: <a href')) {
|
|
108
|
-
return initialRaw.split(' Please check here for status updates: <a href')[0];
|
|
109
|
-
}
|
|
110
|
-
if (initialRaw.includes(' <a href')) {
|
|
111
|
-
return initialRaw.split(' <a href')[0];
|
|
112
|
-
}
|
|
113
|
-
return initialRaw;
|
|
117
|
+
split() {
|
|
118
|
+
this.messagesZones.forEach((messagesZone) => {
|
|
119
|
+
this.messages.push(...messagesZone.split(/<br\s*\/?>/i));
|
|
114
120
|
});
|
|
115
121
|
}
|
|
116
122
|
/**
|
|
117
|
-
* Method for
|
|
123
|
+
* Method for formatting the raw data of retrieved announcements
|
|
124
|
+
* @private
|
|
118
125
|
*/
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
});
|
|
126
|
+
sanitize() {
|
|
127
|
+
this.sanitizedMessages = this.messages.map((message) => {
|
|
128
|
+
for (const [pattern, replacement] of messageSanitize_pattern_1.default) {
|
|
129
|
+
message = message.replace(pattern, replacement.toString());
|
|
130
|
+
}
|
|
131
|
+
return message;
|
|
126
132
|
});
|
|
127
133
|
}
|
|
128
134
|
/**
|
|
@@ -130,14 +136,8 @@ class Connector {
|
|
|
130
136
|
* @private
|
|
131
137
|
*/
|
|
132
138
|
filter() {
|
|
133
|
-
this.raw = this.
|
|
134
|
-
return (
|
|
135
|
-
!raw.includes('Mantenimiento de la semana del ') &&
|
|
136
|
-
!raw.includes('• PC/Mac: No maintenance – ') &&
|
|
137
|
-
!raw.includes('hora peninsular') &&
|
|
138
|
-
raw !== '' &&
|
|
139
|
-
!raw.startsWith('<') &&
|
|
140
|
-
!raw.endsWith('>'));
|
|
139
|
+
this.raw = this.sanitizedMessages.filter((message) => {
|
|
140
|
+
return (messageFilter_pattern_1.default.filter((pattern) => pattern.test(message)).length === 0);
|
|
141
141
|
});
|
|
142
142
|
}
|
|
143
143
|
/**
|
|
@@ -159,6 +159,32 @@ class Connector {
|
|
|
159
159
|
this.rawEsoStatus.push(match);
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Method to get all patterns
|
|
164
|
+
* @private
|
|
165
|
+
*/
|
|
166
|
+
generatePatternList() {
|
|
167
|
+
[
|
|
168
|
+
types_1.ServerPcEuSlug,
|
|
169
|
+
types_1.ServerPcNaSlug,
|
|
170
|
+
types_1.ServerPcPtsSlug,
|
|
171
|
+
types_1.ServerPsEuSlug,
|
|
172
|
+
types_1.ServerPsNaSlug,
|
|
173
|
+
types_1.ServerXboxEuSlug,
|
|
174
|
+
types_1.ServerXboxNaSlug,
|
|
175
|
+
types_1.ServiceStoreEsoSlug,
|
|
176
|
+
types_1.ServiceSystemAccountSlug,
|
|
177
|
+
types_1.ServiceWebSiteSlug,
|
|
178
|
+
].forEach((slug) => {
|
|
179
|
+
this.rawEsoStatus.forEach((rawEsoStatus) => {
|
|
180
|
+
if (rawEsoStatus.slug === slug) {
|
|
181
|
+
if (!this.patterns.includes(rawEsoStatus.pattern)) {
|
|
182
|
+
this.patterns.push(rawEsoStatus.pattern);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
}
|
|
162
188
|
}
|
|
163
189
|
exports.default = Connector;
|
|
164
190
|
//# sourceMappingURL=connector.js.map
|
|
@@ -44,12 +44,12 @@ class DateFormatter {
|
|
|
44
44
|
* @private
|
|
45
45
|
*/
|
|
46
46
|
getRawClassicDate() {
|
|
47
|
-
const split = this.raw.split('
|
|
47
|
+
const split = this.raw.split(' - ');
|
|
48
48
|
if (split.length > 2) {
|
|
49
49
|
split.shift();
|
|
50
|
-
return split.join('
|
|
50
|
+
return split.join(' - ');
|
|
51
51
|
}
|
|
52
|
-
return
|
|
52
|
+
return '';
|
|
53
53
|
}
|
|
54
54
|
/**
|
|
55
55
|
* Method for retrieving the raw date in case #2
|
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const types_1 = require("@eso-status/types");
|
|
4
4
|
const slug_match_1 = require("./slug.match");
|
|
5
|
+
const serverPcEuSlugIdentifier_pattern_1 = require("../pattern/slugIdentifier/serverPcEuSlugIdentifier.pattern");
|
|
6
|
+
const serverPcNaSlugIdentifier_pattern_1 = require("../pattern/slugIdentifier/serverPcNaSlugIdentifier.pattern");
|
|
7
|
+
const serverPcPtsSlugIdentifier_pattern_1 = require("../pattern/slugIdentifier/serverPcPtsSlugIdentifier.pattern");
|
|
8
|
+
const serverPsEuSlugIdentifier_pattern_1 = require("../pattern/slugIdentifier/serverPsEuSlugIdentifier.pattern");
|
|
9
|
+
const serverPsNaSlugIdentifier_pattern_1 = require("../pattern/slugIdentifier/serverPsNaSlugIdentifier.pattern");
|
|
10
|
+
const serverXboxEuSlugIdentifier_pattern_1 = require("../pattern/slugIdentifier/serverXboxEuSlugIdentifier.pattern");
|
|
11
|
+
const serverXboxNaSlugIdentifier_pattern_1 = require("../pattern/slugIdentifier/serverXboxNaSlugIdentifier.pattern");
|
|
12
|
+
const serviceStoreEsoSlugIdentifier_pattern_1 = require("../pattern/slugIdentifier/serviceStoreEsoSlugIdentifier.pattern");
|
|
13
|
+
const serviceSystemAccountSlugIdentifier_pattern_1 = require("../pattern/slugIdentifier/serviceSystemAccountSlugIdentifier.pattern");
|
|
14
|
+
const serviceWebSiteSlugIdentifier_pattern_1 = require("../pattern/slugIdentifier/serviceWebSiteSlugIdentifier.pattern");
|
|
5
15
|
/**
|
|
6
16
|
* Class for identifying the list of slugs contained in an announcement
|
|
7
17
|
*/
|
|
@@ -31,89 +41,52 @@ class SlugIdentifier {
|
|
|
31
41
|
* List of indicators proving that the announcement pertains to the slug server_pc_eu
|
|
32
42
|
* @private
|
|
33
43
|
*/
|
|
34
|
-
ServerPcEuMatchesList =
|
|
35
|
-
'PC/Mac: EU megaserver for',
|
|
36
|
-
'PC/Mac: NA and EU megaservers for',
|
|
37
|
-
'] EU megaservers for',
|
|
38
|
-
'• EU megaservers for',
|
|
39
|
-
'North American and European PC/Mac megaservers',
|
|
40
|
-
];
|
|
44
|
+
ServerPcEuMatchesList = serverPcEuSlugIdentifier_pattern_1.default;
|
|
41
45
|
/**
|
|
42
46
|
* List of indicators proving that the announcement pertains to the slug server_pc_na
|
|
43
47
|
* @private
|
|
44
48
|
*/
|
|
45
|
-
ServerPcNaMatchesList =
|
|
46
|
-
'PC/Mac: NA megaserver for',
|
|
47
|
-
'PC/Mac: NA and EU megaservers for',
|
|
48
|
-
'] NA megaservers for',
|
|
49
|
-
'• NA megaservers for',
|
|
50
|
-
'North American PC/Mac megaserver',
|
|
51
|
-
'North American and European PC/Mac megaservers',
|
|
52
|
-
];
|
|
49
|
+
ServerPcNaMatchesList = serverPcNaSlugIdentifier_pattern_1.default;
|
|
53
50
|
/**
|
|
54
51
|
* List of indicators proving that the announcement pertains to the slug server_pc_pts
|
|
55
52
|
* @private
|
|
56
53
|
*/
|
|
57
|
-
ServerPcPtsMatchesList =
|
|
54
|
+
ServerPcPtsMatchesList = serverPcPtsSlugIdentifier_pattern_1.default;
|
|
58
55
|
/**
|
|
59
56
|
* List of indicators proving that the announcement pertains to the slug server_ps_eu
|
|
60
57
|
* @private
|
|
61
58
|
*/
|
|
62
|
-
ServerPsEuMatchesList =
|
|
63
|
-
'PlayStation®: NA and EU megaservers for',
|
|
64
|
-
'The PlayStation™ Network',
|
|
65
|
-
'] EU megaservers for',
|
|
66
|
-
'• EU megaservers for',
|
|
67
|
-
];
|
|
59
|
+
ServerPsEuMatchesList = serverPsEuSlugIdentifier_pattern_1.default;
|
|
68
60
|
/**
|
|
69
61
|
* List of indicators proving that the announcement pertains to the slug server_ps_na
|
|
70
62
|
* @private
|
|
71
63
|
*/
|
|
72
|
-
ServerPsNaMatchesList =
|
|
73
|
-
'PlayStation®: NA and EU megaservers for',
|
|
74
|
-
'The PlayStation™ Network',
|
|
75
|
-
'] NA megaservers for',
|
|
76
|
-
'• NA megaservers for',
|
|
77
|
-
'North American PlayStation® megaserver',
|
|
78
|
-
];
|
|
64
|
+
ServerPsNaMatchesList = serverPsNaSlugIdentifier_pattern_1.default;
|
|
79
65
|
/**
|
|
80
66
|
* List of indicators proving that the announcement pertains to the slug server_xbox_eu
|
|
81
67
|
* @private
|
|
82
68
|
*/
|
|
83
|
-
ServerXboxEuMatchesList =
|
|
84
|
-
'Xbox: NA and EU megaservers for',
|
|
85
|
-
'Xbox: EU megaserver for',
|
|
86
|
-
'] EU megaservers for',
|
|
87
|
-
'• EU megaservers for',
|
|
88
|
-
'Xbox Live™',
|
|
89
|
-
];
|
|
69
|
+
ServerXboxEuMatchesList = serverXboxEuSlugIdentifier_pattern_1.default;
|
|
90
70
|
/**
|
|
91
71
|
* List of indicators proving that the announcement pertains to the slug server_xbox_na
|
|
92
72
|
* @private
|
|
93
73
|
*/
|
|
94
|
-
ServerXboxNaMatchesList =
|
|
95
|
-
'Xbox: NA and EU megaservers for',
|
|
96
|
-
'] NA megaservers for',
|
|
97
|
-
'• NA megaservers for',
|
|
98
|
-
'Xbox Live™',
|
|
99
|
-
];
|
|
74
|
+
ServerXboxNaMatchesList = serverXboxNaSlugIdentifier_pattern_1.default;
|
|
100
75
|
/**
|
|
101
76
|
* List of indicators proving that the announcement pertains to the slug service_store_eso
|
|
102
77
|
* @private
|
|
103
78
|
*/
|
|
104
|
-
ServiceStoreEsoMatchesList =
|
|
79
|
+
ServiceStoreEsoMatchesList = serviceStoreEsoSlugIdentifier_pattern_1.default;
|
|
105
80
|
/**
|
|
106
81
|
* List of indicators proving that the announcement pertains to the slug service_system_account
|
|
107
82
|
* @private
|
|
108
83
|
*/
|
|
109
|
-
ServiceSystemAccountMatchesList =
|
|
84
|
+
ServiceSystemAccountMatchesList = serviceSystemAccountSlugIdentifier_pattern_1.default;
|
|
110
85
|
/**
|
|
111
86
|
* List of indicators proving that the announcement pertains to the slug service_web_site
|
|
112
87
|
* @private
|
|
113
88
|
*/
|
|
114
|
-
ServiceWebSiteMatchesList =
|
|
115
|
-
'ESO Website for',
|
|
116
|
-
];
|
|
89
|
+
ServiceWebSiteMatchesList = serviceWebSiteSlugIdentifier_pattern_1.default;
|
|
117
90
|
/**
|
|
118
91
|
* @param raw Raw data of the announcement
|
|
119
92
|
*/
|
|
@@ -150,7 +123,14 @@ class SlugIdentifier {
|
|
|
150
123
|
* @private
|
|
151
124
|
*/
|
|
152
125
|
getMatches(slug) {
|
|
153
|
-
return this.getMatchList(slug)
|
|
126
|
+
return this.getMatchList(slug)
|
|
127
|
+
.map((identifier) => {
|
|
128
|
+
if (identifier[0].test(this.raw)) {
|
|
129
|
+
return identifier[0].exec(this.raw)[0];
|
|
130
|
+
}
|
|
131
|
+
return null;
|
|
132
|
+
})
|
|
133
|
+
.filter((match) => match !== null);
|
|
154
134
|
}
|
|
155
135
|
/**
|
|
156
136
|
* Method for testing if the announcement contains indicators of a given slug
|
package/lib/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const const_1 = require("./const");
|
|
4
3
|
const connector_1 = require("./connector");
|
|
4
|
+
const ForumMessageUrl_const_1 = require("./const/ForumMessageUrl.const");
|
|
5
5
|
/**
|
|
6
6
|
* Class for retrieving announcement information
|
|
7
7
|
*/
|
|
@@ -14,7 +14,7 @@ class ForumMessage {
|
|
|
14
14
|
* @param url URL serving as the source to retrieve announcements
|
|
15
15
|
*/
|
|
16
16
|
static async getData(url) {
|
|
17
|
-
return (await connector_1.default.init(url ??
|
|
17
|
+
return (await connector_1.default.init(url ?? ForumMessageUrl_const_1.default)).rawEsoStatus;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
exports.default = ForumMessage;
|
package/lib/raw.d.ts
CHANGED
|
@@ -25,6 +25,11 @@ export default class Raw {
|
|
|
25
25
|
* List of information about slugs found in the announcement
|
|
26
26
|
*/
|
|
27
27
|
matches: EsoStatusRawData[];
|
|
28
|
+
/**
|
|
29
|
+
* Pattern that matched the raw message from the data source
|
|
30
|
+
* @private
|
|
31
|
+
*/
|
|
32
|
+
private pattern;
|
|
28
33
|
/**
|
|
29
34
|
* @param url URL used as the source to retrieve announcements
|
|
30
35
|
* @param raw Raw data of the announcement
|
|
@@ -39,4 +44,9 @@ export default class Raw {
|
|
|
39
44
|
* Method for generating the RawEsoStatus object
|
|
40
45
|
*/
|
|
41
46
|
private getRawEsoStatus;
|
|
47
|
+
/**
|
|
48
|
+
* Method to get the pattern from raw
|
|
49
|
+
* @private
|
|
50
|
+
*/
|
|
51
|
+
private getPattern;
|
|
42
52
|
}
|
package/lib/raw.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const status_identifier_1 = require("./identifier/status.identifier");
|
|
4
4
|
const date_formatter_1 = require("./formatter/date.formatter");
|
|
5
5
|
const slug_identifier_1 = require("./identifier/slug.identifier");
|
|
6
|
+
const messageReplace_pattern_1 = require("./pattern/message/messageReplace.pattern");
|
|
6
7
|
/**
|
|
7
8
|
* Class containing announcement information
|
|
8
9
|
*/
|
|
@@ -28,6 +29,11 @@ class Raw {
|
|
|
28
29
|
* List of information about slugs found in the announcement
|
|
29
30
|
*/
|
|
30
31
|
matches = [];
|
|
32
|
+
/**
|
|
33
|
+
* Pattern that matched the raw message from the data source
|
|
34
|
+
* @private
|
|
35
|
+
*/
|
|
36
|
+
pattern;
|
|
31
37
|
/**
|
|
32
38
|
* @param url URL used as the source to retrieve announcements
|
|
33
39
|
* @param raw Raw data of the announcement
|
|
@@ -35,6 +41,7 @@ class Raw {
|
|
|
35
41
|
constructor(url, raw) {
|
|
36
42
|
this.url = url;
|
|
37
43
|
this.raw = raw;
|
|
44
|
+
this.getPattern();
|
|
38
45
|
this.statusIdentifier = new status_identifier_1.default(this.raw);
|
|
39
46
|
this.dateFormatter = new date_formatter_1.default(this.raw);
|
|
40
47
|
this.slugsIdentifier = new slug_identifier_1.default(this.raw);
|
|
@@ -54,6 +61,7 @@ class Raw {
|
|
|
54
61
|
const rawEsoStatus = {
|
|
55
62
|
source: this.url,
|
|
56
63
|
raw: this.raw,
|
|
64
|
+
pattern: this.pattern,
|
|
57
65
|
slug: slugMatch.slug,
|
|
58
66
|
type: slugMatch.getType(),
|
|
59
67
|
support: slugMatch.getSupport(),
|
|
@@ -70,6 +78,16 @@ class Raw {
|
|
|
70
78
|
}
|
|
71
79
|
return rawEsoStatus;
|
|
72
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Method to get the pattern from raw
|
|
83
|
+
* @private
|
|
84
|
+
*/
|
|
85
|
+
getPattern() {
|
|
86
|
+
this.pattern = this.raw;
|
|
87
|
+
for (const [pattern, replacement] of messageReplace_pattern_1.default) {
|
|
88
|
+
this.pattern = this.pattern.replace(pattern, replacement.toString());
|
|
89
|
+
}
|
|
90
|
+
}
|
|
73
91
|
}
|
|
74
92
|
exports.default = Raw;
|
|
75
93
|
//# sourceMappingURL=raw.js.map
|
|
@@ -7,7 +7,8 @@ import { RemoteServiceStoreEsoRawSlug } from './remoteServiceStoreEsoRawSlug.typ
|
|
|
7
7
|
import { RemoteServiceWebSiteRawSlug } from './remoteServiceWebSiteRawSlug.type';
|
|
8
8
|
import { RemoteServerXboxNaRawSlug } from './remoteServerXboxNaRawSlug.type';
|
|
9
9
|
import { RemoteServerPsNaRawSlug } from './remoteServerPsNaRawSlug.type';
|
|
10
|
+
import { RemoteServiceSystemAccountRawSlug } from './remoteServiceSystemAccountRawSlug.type';
|
|
10
11
|
/**
|
|
11
12
|
* Different slugs of announcements
|
|
12
13
|
*/
|
|
13
|
-
export type RemoteRawSlug = RemoteServerPcEuRawSlug | RemoteServerPcNaRawSlug | RemoteServerPcPtsRawSlug | RemoteServerPsEuRawSlug | RemoteServerPsNaRawSlug | RemoteServerXboxEuRawSlug | RemoteServerXboxNaRawSlug | RemoteServiceStoreEsoRawSlug | RemoteServiceWebSiteRawSlug;
|
|
14
|
+
export type RemoteRawSlug = RemoteServerPcEuRawSlug | RemoteServerPcNaRawSlug | RemoteServerPcPtsRawSlug | RemoteServerPsEuRawSlug | RemoteServerPsNaRawSlug | RemoteServerXboxEuRawSlug | RemoteServerXboxNaRawSlug | RemoteServiceStoreEsoRawSlug | RemoteServiceSystemAccountRawSlug | RemoteServiceWebSiteRawSlug;
|
|
@@ -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
|
|
4
|
+
export type RemoteServerPcEuRawSlug = 'PC/Mac: NA and EU megaservers' | 'PC/Mac: EU megaserver' | 'EU megaservers' | '[IN PROGRESS] EU megaservers' | '[COMPLETE] EU megaservers' | 'North American and European PC/Mac megaservers';
|
|
@@ -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
|
|
4
|
+
export type RemoteServerPcNaRawSlug = 'PC/Mac: NA and EU megaservers' | 'PC/Mac: NA megaserver' | 'North American PC/Mac megaserver' | 'NA megaservers' | '[IN PROGRESS] NA megaservers' | '[COMPLETE] NA megaservers' | 'North American and European PC/Mac megaservers';
|
|
@@ -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
|
|
4
|
+
export type RemoteServerPsEuRawSlug = 'EU megaservers' | 'PlayStation®: NA and EU megaservers' | 'PlayStation™ Network' | '[IN PROGRESS] EU megaservers' | '[COMPLETE] EU megaservers';
|
|
@@ -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
|
|
4
|
+
export type RemoteServerPsNaRawSlug = 'PlayStation®: NA and EU megaservers' | 'North American PlayStation® megaserver' | 'PlayStation™ Network' | 'NA megaservers' | '[IN PROGRESS] NA megaservers' | '[COMPLETE] NA megaservers';
|
|
@@ -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
|
|
4
|
+
export type RemoteServerXboxEuRawSlug = 'EU megaservers' | 'Xbox: NA and EU megaservers' | 'Xbox: EU megaserver' | '[IN PROGRESS] EU megaservers' | '[COMPLETE] EU megaservers' | 'Xbox Live™';
|
|
@@ -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
|
|
4
|
+
export type RemoteServerXboxNaRawSlug = 'NA megaservers' | 'Xbox: NA and EU megaservers' | '[IN PROGRESS] NA megaservers' | '[COMPLETE] NA megaservers' | 'Xbox Live™';
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { SourceUrlForumMessageType } from './sourceUrlForumMessage.type';
|
|
2
|
+
import { SourceUrlForumMessagePtsType } from './sourceUrlForumMessagePts.type';
|
|
1
3
|
/**
|
|
2
4
|
* Different URLs serving as sources for retrieving maintenance announcements
|
|
3
5
|
*/
|
|
4
|
-
export type SourceUrl =
|
|
6
|
+
export type SourceUrl = SourceUrlForumMessageType | SourceUrlForumMessagePtsType;
|
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.24",
|
|
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@gmail.com> (https://dov118.dev)",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"prepare": "husky"
|
|
89
89
|
},
|
|
90
90
|
"dependencies": {
|
|
91
|
-
"@eso-status/types": "2.0.0-dev.
|
|
92
|
-
"axios": "1.
|
|
91
|
+
"@eso-status/types": "2.0.0-dev.20",
|
|
92
|
+
"axios": "1.14.0",
|
|
93
93
|
"moment": "2.30.1"
|
|
94
94
|
},
|
|
95
95
|
"lint-staged": {
|
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@eslint/js": "10.0.1",
|
|
106
106
|
"@types/jest": "30.0.0",
|
|
107
|
-
"eslint": "10.0
|
|
107
|
+
"eslint": "10.1.0",
|
|
108
108
|
"eslint-config-prettier": "10.1.8",
|
|
109
|
-
"eslint-plugin-jest": "29.15.
|
|
109
|
+
"eslint-plugin-jest": "29.15.1",
|
|
110
110
|
"eslint-plugin-sonarjs": "4.0.2",
|
|
111
111
|
"eslint-plugin-unused-imports": "4.4.1",
|
|
112
112
|
"globals": "17.4.0",
|
|
@@ -117,7 +117,7 @@
|
|
|
117
117
|
"prettier": "3.8.1",
|
|
118
118
|
"ts-jest": "29.4.6",
|
|
119
119
|
"typescript": "5.9.3",
|
|
120
|
-
"typescript-eslint": "8.57.
|
|
120
|
+
"typescript-eslint": "8.57.2"
|
|
121
121
|
},
|
|
122
122
|
"jest": {
|
|
123
123
|
"moduleFileExtensions": [
|
package/lib/const.d.ts
DELETED
package/lib/const.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ForumMessagePTSURL = exports.ForumMessageURL = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Homepage URL
|
|
6
|
-
*/
|
|
7
|
-
exports.ForumMessageURL = 'https://forums.elderscrollsonline.com';
|
|
8
|
-
/**
|
|
9
|
-
* PTS category homepage URL
|
|
10
|
-
*/
|
|
11
|
-
exports.ForumMessagePTSURL = 'https://forums.elderscrollsonline.com/en/categories/pts';
|
|
12
|
-
//# sourceMappingURL=const.js.map
|