@eso-status/service-alerts 1.0.8 → 2.0.0-dev.1
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/LICENSE.md +1 -1
- package/README.md +109 -204
- package/lib/connector.d.ts +65 -0
- package/lib/connector.js +123 -0
- package/lib/const.d.ts +6 -0
- package/lib/const.js +8 -0
- package/lib/formatter/date.formatter.d.ts +19 -0
- package/lib/formatter/date.formatter.js +32 -0
- package/lib/identifier/slug.identifier.d.ts +89 -0
- package/lib/identifier/slug.identifier.js +140 -0
- package/lib/identifier/slug.match.d.ts +26 -0
- package/lib/identifier/slug.match.js +35 -0
- package/lib/identifier/status.identifier.d.ts +58 -0
- package/lib/identifier/status.identifier.js +74 -0
- package/lib/index.d.ts +6 -11
- package/lib/index.js +11 -72
- package/lib/interface/esoStatusRawData.interface.d.ts +54 -0
- package/lib/interface/esoStatusRawData.interface.js +3 -0
- package/lib/raw.d.ts +39 -0
- package/lib/raw.js +52 -0
- package/lib/type/remoteDownRawStatus.type.d.ts +4 -0
- package/lib/type/remoteDownRawStatus.type.js +3 -0
- package/lib/type/remoteIssuesRawStatus.type.d.ts +4 -0
- package/lib/type/remoteIssuesRawStatus.type.js +3 -0
- package/lib/type/remoteRawSlug.type.d.ts +13 -0
- package/lib/type/remoteRawSlug.type.js +3 -0
- package/lib/type/remoteRawStatus.type.d.ts +7 -0
- package/lib/type/remoteRawStatus.type.js +3 -0
- package/lib/type/remoteServerPcEuRawSlug.type.d.ts +4 -0
- package/lib/type/remoteServerPcEuRawSlug.type.js +3 -0
- package/lib/type/remoteServerPcNaRawSlug.type.d.ts +4 -0
- package/lib/type/remoteServerPcNaRawSlug.type.js +3 -0
- package/lib/type/remoteServerPcPtsRawSlug.type.d.ts +4 -0
- package/lib/type/remoteServerPcPtsRawSlug.type.js +3 -0
- package/lib/type/remoteServerPsEuRawSlug.type.d.ts +4 -0
- package/lib/type/remoteServerPsEuRawSlug.type.js +3 -0
- package/lib/type/remoteServerPsNaRawSlug.type.d.ts +4 -0
- package/lib/type/remoteServerPsNaRawSlug.type.js +3 -0
- package/lib/type/remoteServerXboxEuRawSlug.type.d.ts +4 -0
- package/lib/type/remoteServerXboxEuRawSlug.type.js +3 -0
- package/lib/type/remoteServerXboxNaRawSlug.type.d.ts +4 -0
- package/lib/type/remoteServerXboxNaRawSlug.type.js +3 -0
- package/lib/type/remoteServiceStoreEsoRawSlug.type.d.ts +4 -0
- package/lib/type/remoteServiceStoreEsoRawSlug.type.js +3 -0
- package/lib/type/remoteServiceSystemAccountRawSlug.type.d.ts +4 -0
- package/lib/type/remoteServiceSystemAccountRawSlug.type.js +3 -0
- package/lib/type/remoteUpRawStatus.type.d.ts +4 -0
- package/lib/type/remoteUpRawStatus.type.js +3 -0
- package/lib/type/sourceUrl.type.d.ts +4 -0
- package/lib/type/sourceUrl.type.js +3 -0
- package/package.json +107 -36
- package/lib/classes/ServiceAlertsElement.d.ts +0 -100
- package/lib/classes/ServiceAlertsElement.js +0 -284
- package/lib/connectors/ServiceAlertConnector.d.ts +0 -112
- package/lib/connectors/ServiceAlertConnector.js +0 -263
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { RemoteServerPcEuRawSlug } from './remoteServerPcEuRawSlug.type';
|
|
2
|
+
import { RemoteServerPcNaRawSlug } from './remoteServerPcNaRawSlug.type';
|
|
3
|
+
import { RemoteServerPcPtsRawSlug } from './remoteServerPcPtsRawSlug.type';
|
|
4
|
+
import { RemoteServerPsEuRawSlug } from './remoteServerPsEuRawSlug.type';
|
|
5
|
+
import { RemoteServerPsNaRawSlug } from './remoteServerPsNaRawSlug.type';
|
|
6
|
+
import { RemoteServerXboxEuRawSlug } from './remoteServerXboxEuRawSlug.type';
|
|
7
|
+
import { RemoteServerXboxNaRawSlug } from './remoteServerXboxNaRawSlug.type';
|
|
8
|
+
import { RemoteServiceStoreEsoRawSlug } from './remoteServiceStoreEsoRawSlug.type';
|
|
9
|
+
import { RemoteServiceSystemAccountRawSlug } from './remoteServiceSystemAccountRawSlug.type';
|
|
10
|
+
/**
|
|
11
|
+
* Different slugs of announcements
|
|
12
|
+
*/
|
|
13
|
+
export type RemoteRawSlug = RemoteServerPcEuRawSlug | RemoteServerPsEuRawSlug | RemoteServerXboxEuRawSlug | RemoteServerPcNaRawSlug | RemoteServerPsNaRawSlug | RemoteServerXboxNaRawSlug | RemoteServerPcPtsRawSlug | RemoteServiceStoreEsoRawSlug | RemoteServiceSystemAccountRawSlug;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { RemoteUpRawStatus } from './remoteUpRawStatus.type';
|
|
2
|
+
import { RemoteDownRawStatus } from './remoteDownRawStatus.type';
|
|
3
|
+
import { RemoteIssuesRawStatus } from './remoteIssuesRawStatus.type';
|
|
4
|
+
/**
|
|
5
|
+
* Different statuses of announcements
|
|
6
|
+
*/
|
|
7
|
+
export type RemoteRawStatus = RemoteUpRawStatus | RemoteDownRawStatus | RemoteIssuesRawStatus;
|
package/package.json
CHANGED
|
@@ -1,64 +1,135 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@eso-status/service-alerts",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Library
|
|
3
|
+
"version": "2.0.0-dev.1",
|
|
4
|
+
"description": "Library for retrieving and formatting data, available at https://help.elderscrollsonline.com/app/answers/detail/a_id/4320.",
|
|
5
|
+
"author": "@dov118 <contact@dov118.dev> (https://dov118.dev)",
|
|
5
6
|
"main": "lib/index.js",
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
"lint": "eslint tests src --ext .ts",
|
|
9
|
-
"lint:fix": "eslint tests src --ext .ts --fix",
|
|
10
|
-
"build": "rm -R -f lib/* && tsc",
|
|
11
|
-
"test": "jest",
|
|
12
|
-
"start": "node .",
|
|
13
|
-
"dev": "npm run lint && npm run build && npm run start",
|
|
14
|
-
"dev:test": "npm run lint && npm run build && npm run test",
|
|
15
|
-
"watch": "nodemon --exec npm run dev",
|
|
16
|
-
"watch:test": "nodemon --exec npm run dev:test"
|
|
17
|
-
},
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"engineStrict": true,
|
|
18
9
|
"files": [
|
|
19
|
-
"lib/
|
|
20
|
-
"lib/
|
|
21
|
-
"lib/
|
|
22
|
-
"lib/
|
|
10
|
+
"lib/formatter/date.formatter.d.ts",
|
|
11
|
+
"lib/formatter/date.formatter.js",
|
|
12
|
+
"lib/identifier/slug.identifier.d.ts",
|
|
13
|
+
"lib/identifier/slug.identifier.js",
|
|
14
|
+
"lib/identifier/slug.match.d.ts",
|
|
15
|
+
"lib/identifier/slug.match.js",
|
|
16
|
+
"lib/identifier/status.identifier.d.ts",
|
|
17
|
+
"lib/identifier/status.identifier.js",
|
|
18
|
+
"lib/interface/esoStatusRawData.interface.d.ts",
|
|
19
|
+
"lib/interface/esoStatusRawData.interface.js",
|
|
20
|
+
"lib/type/remoteDownRawStatus.type.d.ts",
|
|
21
|
+
"lib/type/remoteDownRawStatus.type.js",
|
|
22
|
+
"lib/type/remoteIssuesRawStatus.type.d.ts",
|
|
23
|
+
"lib/type/remoteIssuesRawStatus.type.js",
|
|
24
|
+
"lib/type/remoteRawSlug.type.d.ts",
|
|
25
|
+
"lib/type/remoteRawSlug.type.js",
|
|
26
|
+
"lib/type/remoteRawStatus.type.d.ts",
|
|
27
|
+
"lib/type/remoteRawStatus.type.js",
|
|
28
|
+
"lib/type/remoteServerPcEuRawSlug.type.d.ts",
|
|
29
|
+
"lib/type/remoteServerPcEuRawSlug.type.js",
|
|
30
|
+
"lib/type/remoteServerPcNaRawSlug.type.d.ts",
|
|
31
|
+
"lib/type/remoteServerPcNaRawSlug.type.js",
|
|
32
|
+
"lib/type/remoteServerPcPtsRawSlug.type.d.ts",
|
|
33
|
+
"lib/type/remoteServerPcPtsRawSlug.type.js",
|
|
34
|
+
"lib/type/remoteServerPsEuRawSlug.type.d.ts",
|
|
35
|
+
"lib/type/remoteServerPsEuRawSlug.type.js",
|
|
36
|
+
"lib/type/remoteServerPsNaRawSlug.type.d.ts",
|
|
37
|
+
"lib/type/remoteServerPsNaRawSlug.type.js",
|
|
38
|
+
"lib/type/remoteServerXboxEuRawSlug.type.d.ts",
|
|
39
|
+
"lib/type/remoteServerXboxEuRawSlug.type.js",
|
|
40
|
+
"lib/type/remoteServerXboxNaRawSlug.type.d.ts",
|
|
41
|
+
"lib/type/remoteServerXboxNaRawSlug.type.js",
|
|
42
|
+
"lib/type/remoteServiceStoreEsoRawSlug.type.d.ts",
|
|
43
|
+
"lib/type/remoteServiceStoreEsoRawSlug.type.js",
|
|
44
|
+
"lib/type/remoteServiceSystemAccountRawSlug.type.d.ts",
|
|
45
|
+
"lib/type/remoteServiceSystemAccountRawSlug.type.js",
|
|
46
|
+
"lib/type/remoteUpRawStatus.type.d.ts",
|
|
47
|
+
"lib/type/remoteUpRawStatus.type.js",
|
|
48
|
+
"lib/type/sourceUrl.type.d.ts",
|
|
49
|
+
"lib/type/sourceUrl.type.js",
|
|
50
|
+
"lib/connector.d.ts",
|
|
51
|
+
"lib/connector.js",
|
|
52
|
+
"lib/const.d.ts",
|
|
53
|
+
"lib/const.js",
|
|
23
54
|
"lib/index.d.ts",
|
|
24
55
|
"lib/index.js",
|
|
25
|
-
".
|
|
56
|
+
"lib/raw.d.ts",
|
|
57
|
+
"lib/raw.js",
|
|
58
|
+
".npmrc,",
|
|
26
59
|
"LICENSE.md",
|
|
27
60
|
"package.json",
|
|
28
61
|
"README.md"
|
|
29
62
|
],
|
|
30
|
-
"engineStrict": true,
|
|
31
63
|
"engines": {
|
|
32
|
-
"node": "
|
|
64
|
+
"node": "^18.18.0 || ^20.0.0"
|
|
65
|
+
},
|
|
66
|
+
"bugs": {
|
|
67
|
+
"url": "https://github.com/eso-status/service-alerts/issues"
|
|
33
68
|
},
|
|
69
|
+
"homepage": "https://github.com/eso-status/service-alerts#readme",
|
|
34
70
|
"repository": {
|
|
35
71
|
"type": "git",
|
|
36
72
|
"url": "git@github.com:eso-status/service-alerts.git"
|
|
37
73
|
},
|
|
38
|
-
"
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
"
|
|
74
|
+
"scripts": {
|
|
75
|
+
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
|
76
|
+
"lint": "eslint \"{src,test}/**/*.ts\"",
|
|
77
|
+
"lint:fix": "eslint \"{src,test}/**/*.ts\" --fix",
|
|
78
|
+
"build": "rm -R -f lib/* && tsc --project tsconfig.build.json",
|
|
79
|
+
"dev": "npm run build && node .",
|
|
80
|
+
"watch": "nodemon --exec npm run dev",
|
|
81
|
+
"test": "npm run build && jest --runInBand --setupFiles",
|
|
82
|
+
"test:watch": "jest --runInBand --watch --setupFiles",
|
|
83
|
+
"test:cov": "jest --runInBand --coverage --setupFiles",
|
|
84
|
+
"prepare": "husky"
|
|
85
|
+
},
|
|
86
|
+
"dependencies": {
|
|
87
|
+
"@eso-status/types": "2.0.0-dev.11",
|
|
88
|
+
"axios": "1.7.7",
|
|
89
|
+
"moment": "2.30.1"
|
|
42
90
|
},
|
|
43
|
-
"homepage": "https://github.com/eso-status/service-alerts#readme",
|
|
44
91
|
"devDependencies": {
|
|
45
|
-
"@eso-status/types": "1.0.7",
|
|
46
92
|
"@types/jest": "29.5.12",
|
|
47
|
-
"@types/node": "22.5.1",
|
|
48
|
-
"@typescript-eslint/eslint-plugin": "7.18.0",
|
|
49
|
-
"@typescript-eslint/parser": "7.18.0",
|
|
50
|
-
"@typescript-eslint/typescript-estree": "7.18.0",
|
|
51
93
|
"eslint": "8.57.0",
|
|
52
94
|
"eslint-config-airbnb-base": "15.0.0",
|
|
53
|
-
"eslint-
|
|
54
|
-
"eslint-
|
|
95
|
+
"eslint-config-airbnb-typescript": "18.0.0",
|
|
96
|
+
"eslint-config-prettier": "9.1.0",
|
|
97
|
+
"eslint-plugin-jest": "28.8.3",
|
|
98
|
+
"eslint-plugin-prettier": "5.2.1",
|
|
99
|
+
"eslint-plugin-sonarjs": "2.0.2",
|
|
100
|
+
"eslint-plugin-unused-imports": "4.1.3",
|
|
101
|
+
"husky": "9.1.5",
|
|
55
102
|
"jest": "29.7.0",
|
|
56
103
|
"nodemon": "3.1.4",
|
|
104
|
+
"prettier": "3.3.3",
|
|
57
105
|
"ts-jest": "29.2.5",
|
|
58
106
|
"typescript": "5.5.4"
|
|
59
107
|
},
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
|
|
108
|
+
"jest": {
|
|
109
|
+
"moduleFileExtensions": [
|
|
110
|
+
"js",
|
|
111
|
+
"json",
|
|
112
|
+
"ts"
|
|
113
|
+
],
|
|
114
|
+
"rootDir": "./",
|
|
115
|
+
"testRegex": ".*\\.e2e-spec\\.ts|.*\\.spec\\.ts$",
|
|
116
|
+
"transform": {
|
|
117
|
+
"^.+\\.ts$": "ts-jest"
|
|
118
|
+
},
|
|
119
|
+
"collectCoverageFrom": [
|
|
120
|
+
"src/**/*.ts"
|
|
121
|
+
],
|
|
122
|
+
"coverageDirectory": "./coverage",
|
|
123
|
+
"testEnvironment": "node",
|
|
124
|
+
"setupFiles": [
|
|
125
|
+
"dotenv/config"
|
|
126
|
+
],
|
|
127
|
+
"moduleDirectories": [
|
|
128
|
+
"node_modules",
|
|
129
|
+
"src"
|
|
130
|
+
],
|
|
131
|
+
"modulePaths": [
|
|
132
|
+
"<rootDir>"
|
|
133
|
+
]
|
|
63
134
|
}
|
|
64
135
|
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { Moment } from 'moment';
|
|
2
|
-
import { Support, Slug, Status, Type, Zone } from '@eso-status/types';
|
|
3
|
-
/**
|
|
4
|
-
* Class with methode for ServiceAlerts element
|
|
5
|
-
*/
|
|
6
|
-
export default class ServiceAlertsElement {
|
|
7
|
-
/**
|
|
8
|
-
* Methode used to get slugs list of raw content
|
|
9
|
-
*
|
|
10
|
-
* @public
|
|
11
|
-
* @static
|
|
12
|
-
*
|
|
13
|
-
* @param rawData string Raw data
|
|
14
|
-
* @return Slug[] List of slug
|
|
15
|
-
*/
|
|
16
|
-
static getSlug(rawData: string): Slug[];
|
|
17
|
-
/**
|
|
18
|
-
* Methode used to determinate service type
|
|
19
|
-
*
|
|
20
|
-
* @public
|
|
21
|
-
* @static
|
|
22
|
-
*
|
|
23
|
-
* @param type Type Type to check
|
|
24
|
-
* @param rawData string Raw data
|
|
25
|
-
* @return boolean Check result
|
|
26
|
-
*/
|
|
27
|
-
static isType(type: Type, rawData: string): boolean;
|
|
28
|
-
/**
|
|
29
|
-
* Methode used to determinate service support
|
|
30
|
-
*
|
|
31
|
-
* @public
|
|
32
|
-
* @static
|
|
33
|
-
*
|
|
34
|
-
* @param support Support Support to check
|
|
35
|
-
* @param rawData string Raw data
|
|
36
|
-
* @return boolean Check result
|
|
37
|
-
*/
|
|
38
|
-
static isSupport(support: Support, rawData: string): boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Methode used to determinate service zone
|
|
41
|
-
*
|
|
42
|
-
* @public
|
|
43
|
-
* @static
|
|
44
|
-
*
|
|
45
|
-
* @param zone Zone Zone to check
|
|
46
|
-
* @param rawData string Raw data
|
|
47
|
-
* @return boolean Check result
|
|
48
|
-
*/
|
|
49
|
-
static isZone(zone: Zone, rawData: string): boolean;
|
|
50
|
-
/**
|
|
51
|
-
* Methode used to get date of raw content
|
|
52
|
-
*
|
|
53
|
-
* @public
|
|
54
|
-
* @static
|
|
55
|
-
*
|
|
56
|
-
* @param rawDate string Raw data
|
|
57
|
-
* @return Moment Date of raw data
|
|
58
|
-
*/
|
|
59
|
-
static getDate(rawDate: string): Moment;
|
|
60
|
-
/**
|
|
61
|
-
* Methode used to get type of slug
|
|
62
|
-
*
|
|
63
|
-
* @public
|
|
64
|
-
* @static
|
|
65
|
-
*
|
|
66
|
-
* @param slug Slug Slug
|
|
67
|
-
* @return Type Type of slug
|
|
68
|
-
*/
|
|
69
|
-
static getType(slug: Slug): Type;
|
|
70
|
-
/**
|
|
71
|
-
* Methode used to get support of slug
|
|
72
|
-
*
|
|
73
|
-
* @public
|
|
74
|
-
* @static
|
|
75
|
-
*
|
|
76
|
-
* @param slug Slug Slug
|
|
77
|
-
* @return Support Support of slug
|
|
78
|
-
*/
|
|
79
|
-
static getSupport(slug: Slug): Support;
|
|
80
|
-
/**
|
|
81
|
-
* Methode used to get zone of slug
|
|
82
|
-
*
|
|
83
|
-
* @public
|
|
84
|
-
* @static
|
|
85
|
-
*
|
|
86
|
-
* @param slug Slug Slug
|
|
87
|
-
* @return Zone Zone of slug
|
|
88
|
-
*/
|
|
89
|
-
static getZone(slug: Slug): Zone;
|
|
90
|
-
/**
|
|
91
|
-
* Methode used to get status of raw data
|
|
92
|
-
*
|
|
93
|
-
* @public
|
|
94
|
-
* @static
|
|
95
|
-
*
|
|
96
|
-
* @param rawData string Raw data
|
|
97
|
-
* @return Status Status of raw data
|
|
98
|
-
*/
|
|
99
|
-
static getStatus(rawData: string): Status;
|
|
100
|
-
}
|