@eso-status/forum-message 2.0.0-dev.0 → 2.0.0-dev.2
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 +113 -109
- package/lib/identifier/slug.identifier.js +11 -10
- package/lib/identifier/status.identifier.js +3 -2
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -31,122 +31,126 @@ npm i @eso-status/forum-message
|
|
|
31
31
|
### Usage
|
|
32
32
|
```javascript
|
|
33
33
|
import ForumMessage from '@eso-status/forum-message';
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
34
|
+
import { EsoStatusRawData } from '@eso-status/types';
|
|
35
|
+
import { ForumMessagePTSURL } from '@eso-status/forum-message/const';
|
|
36
36
|
|
|
37
37
|
// Homepage data
|
|
38
|
-
const
|
|
38
|
+
const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData();
|
|
39
39
|
|
|
40
40
|
// PTS category homepage data
|
|
41
|
-
const
|
|
41
|
+
const esoStatusRawDataList: EsoStatusRawData[] = await ForumMessage.getData(ForumMessagePTSURL);
|
|
42
42
|
```
|
|
43
43
|
### Return exemple
|
|
44
44
|
```text
|
|
45
45
|
[
|
|
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
|
-
|
|
46
|
+
{
|
|
47
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
48
|
+
raw: '• PC/Mac: NA and EU megaservers for patch maintenance – September 3, 4:00AM EDT (8:00 UTC) – 9:00AM EDT (13:00 UTC)',
|
|
49
|
+
slug: 'server_pc_eu',
|
|
50
|
+
type: 'server',
|
|
51
|
+
support: 'pc',
|
|
52
|
+
zone: 'eu',
|
|
53
|
+
status: 'planned',
|
|
54
|
+
rawSlug: 'PC/Mac: NA and EU megaservers for',
|
|
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> ]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
60
|
+
raw: '• PC/Mac: NA and EU megaservers for patch maintenance – September 3, 4:00AM EDT (8:00 UTC) – 9:00AM EDT (13:00 UTC)',
|
|
61
|
+
slug: 'server_pc_na',
|
|
62
|
+
type: 'server',
|
|
63
|
+
support: 'pc',
|
|
64
|
+
zone: 'na',
|
|
65
|
+
status: 'planned',
|
|
66
|
+
rawSlug: 'PC/Mac: NA and EU megaservers for',
|
|
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> ]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
72
|
+
raw: '• Xbox: NA and EU megaservers for patch maintenance – September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
|
|
73
|
+
slug: 'server_xbox_eu',
|
|
74
|
+
type: 'server',
|
|
75
|
+
support: 'xbox',
|
|
76
|
+
zone: 'eu',
|
|
77
|
+
status: 'planned',
|
|
78
|
+
rawSlug: 'Xbox: NA and EU megaservers for',
|
|
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> ]
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
84
|
+
raw: '• Xbox: NA and EU megaservers for patch maintenance – September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
|
|
85
|
+
slug: 'server_xbox_na',
|
|
86
|
+
type: 'server',
|
|
87
|
+
support: 'xbox',
|
|
88
|
+
zone: 'na',
|
|
89
|
+
status: 'planned',
|
|
90
|
+
rawSlug: 'Xbox: NA and EU megaservers for',
|
|
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> ]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
96
|
+
raw: '• PlayStation®: NA and EU megaservers for patch maintenance – September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
|
|
97
|
+
slug: 'server_ps_eu',
|
|
98
|
+
type: 'server',
|
|
99
|
+
support: 'ps',
|
|
100
|
+
zone: 'eu',
|
|
101
|
+
status: 'planned',
|
|
102
|
+
rawSlug: 'PlayStation®: NA and EU megaservers for',
|
|
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> ]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
108
|
+
raw: '• PlayStation®: NA and EU megaservers for patch maintenance – September 4, 6:00AM EDT (10:00 UTC) - 12:00PM EDT (16:00 UTC)',
|
|
109
|
+
slug: 'server_ps_na',
|
|
110
|
+
type: 'server',
|
|
111
|
+
support: 'ps',
|
|
112
|
+
zone: 'na',
|
|
113
|
+
status: 'planned',
|
|
114
|
+
rawSlug: 'PlayStation®: NA and EU megaservers for',
|
|
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> ]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
120
|
+
raw: '• ESO Store and Account System for maintenance – September 4, 10:00AM EDT (14:00 UTC) - 12:00PM EDT (16:00 UTC)',
|
|
121
|
+
slug: 'service_store_eso',
|
|
122
|
+
type: 'service',
|
|
123
|
+
support: 'store',
|
|
124
|
+
zone: 'eso',
|
|
125
|
+
status: 'planned',
|
|
126
|
+
rawSlug: 'ESO Store and Account System for',
|
|
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> ]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
source: 'https://forums.elderscrollsonline.com',
|
|
132
|
+
raw: '• ESO Store and Account System for maintenance – September 4, 10:00AM EDT (14:00 UTC) - 12:00PM EDT (16:00 UTC)',
|
|
133
|
+
slug: 'service_system_account',
|
|
134
|
+
type: 'service',
|
|
135
|
+
support: 'system',
|
|
136
|
+
zone: 'account',
|
|
137
|
+
status: 'planned',
|
|
138
|
+
rawSlug: 'ESO Store and Account System for',
|
|
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> ]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
source: 'https://forums.elderscrollsonline.com/en/categories/pts',
|
|
144
|
+
raw: 'We will be performing maintenance on the PTS on Thursday at 9:00AM EDT (13:00 UTC).',
|
|
145
|
+
slug: 'server_pc_pts',
|
|
146
|
+
type: 'server',
|
|
147
|
+
support: 'pc',
|
|
148
|
+
zone: 'pts',
|
|
149
|
+
status: 'planned',
|
|
150
|
+
rawSlug: 'PTS',
|
|
151
|
+
rawDate: 'Thursday at 9:00AM EDT (13:00 UTC).',
|
|
152
|
+
rawStatus: 'We will be performing maintenance',
|
|
153
|
+
dates: [ Moment<2024-09-05T13:00:00Z> ]
|
|
154
|
+
}
|
|
151
155
|
]
|
|
152
156
|
```
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const types_1 = require("@eso-status/types");
|
|
3
4
|
const slug_match_1 = require("./slug.match");
|
|
4
5
|
/**
|
|
5
6
|
* Class for identifying the list of slugs contained in an announcement
|
|
@@ -15,16 +16,16 @@ class SlugIdentifier {
|
|
|
15
16
|
* @private
|
|
16
17
|
*/
|
|
17
18
|
this.slugList = [
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
19
|
+
types_1.ServerPcEuSlug,
|
|
20
|
+
types_1.ServerPcNaSlug,
|
|
21
|
+
types_1.ServerPcPtsSlug,
|
|
22
|
+
types_1.ServerPsEuSlug,
|
|
23
|
+
types_1.ServerPsNaSlug,
|
|
24
|
+
types_1.ServerXboxEuSlug,
|
|
25
|
+
types_1.ServerXboxNaSlug,
|
|
26
|
+
types_1.ServiceStoreEsoSlug,
|
|
27
|
+
types_1.ServiceSystemAccountSlug,
|
|
28
|
+
types_1.ServiceWebSiteSlug,
|
|
28
29
|
];
|
|
29
30
|
/**
|
|
30
31
|
* List of indicators proving that the announcement pertains to the slug server_pc_eu
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const types_1 = require("@eso-status/types");
|
|
3
4
|
/**
|
|
4
5
|
* Class for identifying the status contained in an announcement
|
|
5
6
|
*/
|
|
@@ -13,7 +14,7 @@ class StatusIdentifier {
|
|
|
13
14
|
* List of statuses to check for presence in the announcement
|
|
14
15
|
* @private
|
|
15
16
|
*/
|
|
16
|
-
this.statusList = [
|
|
17
|
+
this.statusList = [types_1.UpStatus, types_1.DownStatus, types_1.PlannedStatus];
|
|
17
18
|
/**
|
|
18
19
|
* List of indicators proving that the announcement pertains to the status up
|
|
19
20
|
* @private
|
|
@@ -77,7 +78,7 @@ class StatusIdentifier {
|
|
|
77
78
|
*/
|
|
78
79
|
default() {
|
|
79
80
|
if (!this.status) {
|
|
80
|
-
this.status =
|
|
81
|
+
this.status = types_1.PlannedStatus;
|
|
81
82
|
}
|
|
82
83
|
}
|
|
83
84
|
}
|
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.2",
|
|
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",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"README.md"
|
|
64
64
|
],
|
|
65
65
|
"engines": {
|
|
66
|
-
"node": "
|
|
66
|
+
"node": "^18.18.0 || ^20.0.0"
|
|
67
67
|
},
|
|
68
68
|
"bugs": {
|
|
69
69
|
"url": "https://github.com/eso-status/forum-message/issues"
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"prepare": "husky"
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {
|
|
89
|
-
"@eso-status/types": "2.0.0-dev.
|
|
89
|
+
"@eso-status/types": "2.0.0-dev.11",
|
|
90
90
|
"axios": "1.7.7",
|
|
91
91
|
"moment": "2.30.1"
|
|
92
92
|
},
|