@eso-status/live-services 1.0.0

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/.npmrc ADDED
@@ -0,0 +1 @@
1
+ engine-strict=true
package/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 dov118
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,119 @@
1
+ # eso-status/live-services
2
+ [![npm](https://img.shields.io/npm/v/@eso-status/live-services)](https://www.npmjs.com/package/@eso-status/live-services)
3
+ [![license](https://img.shields.io/npm/l/@eso-status/live-services)](https://github.com/eso-status/live-services/blob/master/LICENSE.md)
4
+ <img src="https://img.shields.io/npm/dt/@eso-status/live-services" alt="Downloads" />
5
+ [![LGTM Grade](https://img.shields.io/lgtm/grade/javascript/github/eso-status/live-services)](https://lgtm.com/projects/g/eso-status/live-services/context:javascript)
6
+ <img src="https://img.shields.io/node/v/@eso-status/live-services" alt="Node version" />
7
+ [![Build Status](https://github.com/eso-status/live-services/workflows/CI/badge.svg)](https://github.com/eso-status/live-services/actions/workflows/CI.yaml)
8
+ [![Delivery Status](https://github.com/eso-status/live-services/workflows/CD/badge.svg)](https://github.com/eso-status/live-services/actions/workflows/CD.yaml)
9
+
10
+ eso-status/live-services is a library for getting and formatting data can founded in [https://live-services.elderscrollsonline.com/status/realms](https://live-services.elderscrollsonline.com/status/realms)
11
+
12
+ ## Table of Contents
13
+ - [How to get it ?](#how-to-get-it-)
14
+ - [How to use it ?](#how-to-use-it-)
15
+ - [Returned data format](#returned-data-format-)
16
+
17
+ ### How to get it ?
18
+ ```shell
19
+ npm i @eso-status/live-services
20
+ ```
21
+
22
+ ### How to use it ?
23
+ - TypeScript
24
+ ```typescript
25
+ import { RawEsoStatus } from '@eso-status/types';
26
+ import { LiveServices } from "@eso-status/live-services";
27
+
28
+ LiveServices.getData().then((data: RawEsoStatus[]): void => {
29
+
30
+ }).catch((error: Error): void => {
31
+
32
+ });
33
+ ```
34
+ - JavaScript
35
+ ```javascript
36
+ const { LiveServices } = require('@eso-status/live-services');
37
+
38
+ LiveServices.getData().then(function (data) {
39
+
40
+ }).catch(function (error) {
41
+
42
+ });
43
+ ```
44
+
45
+ ### Returned data format ?
46
+ ```text
47
+ [
48
+ {
49
+ sources: [ 'https://live-services.elderscrollsonline.com/status/realms' ],
50
+ raw: [ 'The Elder Scrolls Online (EU)', 'UP' ],
51
+ rawSlug: 'The Elder Scrolls Online (EU)',
52
+ rawStatus: 'UP',
53
+ slugs: [ 'server_pc_eu' ],
54
+ support: 'pc',
55
+ zone: 'eu',
56
+ status: 'up'
57
+ },
58
+ {
59
+ sources: [ 'https://live-services.elderscrollsonline.com/status/realms' ],
60
+ raw: [ 'The Elder Scrolls Online (NA)', 'UP' ],
61
+ rawSlug: 'The Elder Scrolls Online (NA)',
62
+ rawStatus: 'UP',
63
+ slugs: [ 'server_pc_na' ],
64
+ support: 'pc',
65
+ zone: 'na',
66
+ status: 'up'
67
+ },
68
+ {
69
+ sources: [ 'https://live-services.elderscrollsonline.com/status/realms' ],
70
+ raw: [ 'The Elder Scrolls Online (PS4 - EU)', 'UP' ],
71
+ rawSlug: 'The Elder Scrolls Online (PS4 - EU)',
72
+ rawStatus: 'UP',
73
+ slugs: [ 'server_ps_eu' ],
74
+ support: 'ps',
75
+ zone: 'eu',
76
+ status: 'up'
77
+ },
78
+ {
79
+ sources: [ 'https://live-services.elderscrollsonline.com/status/realms' ],
80
+ raw: [ 'The Elder Scrolls Online (PS4 - US)', 'UP' ],
81
+ rawSlug: 'The Elder Scrolls Online (PS4 - US)',
82
+ rawStatus: 'UP',
83
+ slugs: [ 'server_ps_na' ],
84
+ support: 'ps',
85
+ zone: 'na',
86
+ status: 'up'
87
+ },
88
+ {
89
+ sources: [ 'https://live-services.elderscrollsonline.com/status/realms' ],
90
+ raw: [ 'The Elder Scrolls Online (PTS)', 'UP' ],
91
+ rawSlug: 'The Elder Scrolls Online (PTS)',
92
+ rawStatus: 'UP',
93
+ slugs: [ 'server_pc_pts' ],
94
+ support: 'pc',
95
+ zone: 'pts',
96
+ status: 'up'
97
+ },
98
+ {
99
+ sources: [ 'https://live-services.elderscrollsonline.com/status/realms' ],
100
+ raw: [ 'The Elder Scrolls Online (XBox - EU)', 'UP' ],
101
+ rawSlug: 'The Elder Scrolls Online (XBox - EU)',
102
+ rawStatus: 'UP',
103
+ slugs: [ 'server_xbox_eu' ],
104
+ support: 'xbox',
105
+ zone: 'eu',
106
+ status: 'up'
107
+ },
108
+ {
109
+ sources: [ 'https://live-services.elderscrollsonline.com/status/realms' ],
110
+ raw: [ 'The Elder Scrolls Online (XBox - US)', 'UP' ],
111
+ rawSlug: 'The Elder Scrolls Online (XBox - US)',
112
+ rawStatus: 'UP',
113
+ slugs: [ 'server_xbox_na' ],
114
+ support: 'xbox',
115
+ zone: 'na',
116
+ status: 'up'
117
+ }
118
+ ]
119
+ ```
@@ -0,0 +1,46 @@
1
+ import { Support, Slug, Status, Zone } from '@eso-status/types';
2
+ /**
3
+ * Class with methode for LiveServices element
4
+ */
5
+ export default class LiveServicesElement {
6
+ /**
7
+ * Methode used to get slug of raw slug
8
+ *
9
+ * @public
10
+ * @static
11
+ *
12
+ * @param rawSlug string Raw slug
13
+ * @return Slug Slug
14
+ */
15
+ static getSlug(rawSlug: string): Slug;
16
+ /**
17
+ * Methode used to get support of slug
18
+ *
19
+ * @public
20
+ * @static
21
+ *
22
+ * @param slug Slug Slug
23
+ * @return Support Support of slug
24
+ */
25
+ static getSupport(slug: Slug): Support;
26
+ /**
27
+ * Methode used to get zone of slug
28
+ *
29
+ * @public
30
+ * @static
31
+ *
32
+ * @param slug Slug Slug
33
+ * @return Zone Zone of slug
34
+ */
35
+ static getZone(slug: Slug): Zone;
36
+ /**
37
+ * Methode used to get status of raw status
38
+ *
39
+ * @public
40
+ * @static
41
+ *
42
+ * @param rawStatus string Raw status
43
+ * @return Status Status of raw data
44
+ */
45
+ static getStatus(rawStatus: string): Status;
46
+ }
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ /**
4
+ * Class with methode for LiveServices element
5
+ */
6
+ var LiveServicesElement = /** @class */ (function () {
7
+ function LiveServicesElement() {
8
+ }
9
+ /**
10
+ * Methode used to get slug of raw slug
11
+ *
12
+ * @public
13
+ * @static
14
+ *
15
+ * @param rawSlug string Raw slug
16
+ * @return Slug Slug
17
+ */
18
+ LiveServicesElement.getSlug = function (rawSlug) {
19
+ switch (rawSlug) {
20
+ case 'The Elder Scrolls Online (NA)':
21
+ return 'server_pc_na';
22
+ case 'The Elder Scrolls Online (EU)':
23
+ return 'server_pc_eu';
24
+ case 'The Elder Scrolls Online (XBox - US)':
25
+ return 'server_xbox_na';
26
+ case 'The Elder Scrolls Online (XBox - EU)':
27
+ return 'server_xbox_eu';
28
+ case 'The Elder Scrolls Online (PS4 - US)':
29
+ return 'server_ps_na';
30
+ case 'The Elder Scrolls Online (PS4 - EU)':
31
+ return 'server_ps_eu';
32
+ case 'The Elder Scrolls Online (PTS)':
33
+ return 'server_pc_pts';
34
+ default:
35
+ return 'undefined';
36
+ }
37
+ };
38
+ /**
39
+ * Methode used to get support of slug
40
+ *
41
+ * @public
42
+ * @static
43
+ *
44
+ * @param slug Slug Slug
45
+ * @return Support Support of slug
46
+ */
47
+ LiveServicesElement.getSupport = function (slug) {
48
+ return slug.split('_')[1];
49
+ };
50
+ /**
51
+ * Methode used to get zone of slug
52
+ *
53
+ * @public
54
+ * @static
55
+ *
56
+ * @param slug Slug Slug
57
+ * @return Zone Zone of slug
58
+ */
59
+ LiveServicesElement.getZone = function (slug) {
60
+ return slug.split('_')[2];
61
+ };
62
+ /**
63
+ * Methode used to get status of raw status
64
+ *
65
+ * @public
66
+ * @static
67
+ *
68
+ * @param rawStatus string Raw status
69
+ * @return Status Status of raw data
70
+ */
71
+ LiveServicesElement.getStatus = function (rawStatus) {
72
+ switch (rawStatus) {
73
+ case 'UP':
74
+ return 'up';
75
+ case 'DOWN':
76
+ return 'down';
77
+ default:
78
+ return 'undefined';
79
+ }
80
+ };
81
+ return LiveServicesElement;
82
+ }());
83
+ exports.default = LiveServicesElement;
@@ -0,0 +1,54 @@
1
+ import { RawEsoStatus } from '@eso-status/types';
2
+ /**
3
+ * Connector used to get data from https://live-services.elderscrollsonline.com/status/realms
4
+ */
5
+ export default class LiveServicesConnector {
6
+ /**
7
+ * URL to get remote content
8
+ *
9
+ * @public
10
+ * @static
11
+ *
12
+ * @return string URL to get remote content
13
+ */
14
+ static url: string;
15
+ /**
16
+ * Methode used to get raw content of the remote website
17
+ *
18
+ * @public
19
+ * @static
20
+ *
21
+ * @return Promise<string> Raw content of the remote website
22
+ */
23
+ static getRemoteContent(): Promise<string>;
24
+ /**
25
+ * Methode used to select raw content containing eso servers status information
26
+ *
27
+ * @public
28
+ * @static
29
+ *
30
+ * @param remoteContent Raw content of the remote website
31
+ * @return string Raw content containing eso servers status information
32
+ */
33
+ static getFilterContent(remoteContent: string): string;
34
+ /**
35
+ * Methode used to get list of each raw information
36
+ *
37
+ * @public
38
+ * @static
39
+ *
40
+ * @param filteredContent string Raw content containing eso servers status information
41
+ * @return RawEsoStatus[] List of each information
42
+ */
43
+ static changeFilterContentForList(filteredContent: string): RawEsoStatus[];
44
+ /**
45
+ * Methode used to get last eso status server with data
46
+ *
47
+ * @public
48
+ * @static
49
+ *
50
+ * @param lastRawData ServiceAlertsInterface[] Raw eso server status list sorted by date
51
+ * @return RawEsoStatus[] Last eso status server with data
52
+ */
53
+ static getData(lastRawData: RawEsoStatus[]): RawEsoStatus[];
54
+ }
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ var axios_1 = require("axios");
40
+ var LiveServicesElement_1 = require("../classes/LiveServicesElement");
41
+ /**
42
+ * Connector used to get data from https://live-services.elderscrollsonline.com/status/realms
43
+ */
44
+ var LiveServicesConnector = /** @class */ (function () {
45
+ function LiveServicesConnector() {
46
+ }
47
+ /**
48
+ * Methode used to get raw content of the remote website
49
+ *
50
+ * @public
51
+ * @static
52
+ *
53
+ * @return Promise<string> Raw content of the remote website
54
+ */
55
+ LiveServicesConnector.getRemoteContent = function () {
56
+ return __awaiter(this, void 0, void 0, function () {
57
+ var response;
58
+ return __generator(this, function (_a) {
59
+ switch (_a.label) {
60
+ case 0: return [4 /*yield*/, axios_1.default.get(LiveServicesConnector.url)];
61
+ case 1:
62
+ response = _a.sent();
63
+ if ((response === null || response === void 0 ? void 0 : response.status) !== 200) {
64
+ throw new Error("Bad response ".concat(response === null || response === void 0 ? void 0 : response.status, " (").concat(response === null || response === void 0 ? void 0 : response.data, ")"));
65
+ }
66
+ else if (!(response === null || response === void 0 ? void 0 : response.data)) {
67
+ throw new Error("Empty response ".concat(response === null || response === void 0 ? void 0 : response.status, " (").concat(response === null || response === void 0 ? void 0 : response.data, ")"));
68
+ }
69
+ else {
70
+ return [2 /*return*/, JSON.stringify(response === null || response === void 0 ? void 0 : response.data)];
71
+ }
72
+ return [2 /*return*/];
73
+ }
74
+ });
75
+ });
76
+ };
77
+ /**
78
+ * Methode used to select raw content containing eso servers status information
79
+ *
80
+ * @public
81
+ * @static
82
+ *
83
+ * @param remoteContent Raw content of the remote website
84
+ * @return string Raw content containing eso servers status information
85
+ */
86
+ LiveServicesConnector.getFilterContent = function (remoteContent) {
87
+ var _a, _b;
88
+ return JSON.stringify((_b = (_a = JSON.parse(remoteContent)) === null || _a === void 0 ? void 0 : _a.zos_platform_response) === null || _b === void 0 ? void 0 : _b.response);
89
+ };
90
+ /**
91
+ * Methode used to get list of each raw information
92
+ *
93
+ * @public
94
+ * @static
95
+ *
96
+ * @param filteredContent string Raw content containing eso servers status information
97
+ * @return RawEsoStatus[] List of each information
98
+ */
99
+ LiveServicesConnector.changeFilterContentForList = function (filteredContent) {
100
+ return Object.entries(JSON.parse(filteredContent)).map(function (item) { return ({
101
+ sources: [LiveServicesConnector.url],
102
+ raw: [item[0], String(item[1])],
103
+ rawSlug: item[0],
104
+ rawStatus: String(item[1]),
105
+ }); });
106
+ };
107
+ /**
108
+ * Methode used to get last eso status server with data
109
+ *
110
+ * @public
111
+ * @static
112
+ *
113
+ * @param lastRawData ServiceAlertsInterface[] Raw eso server status list sorted by date
114
+ * @return RawEsoStatus[] Last eso status server with data
115
+ */
116
+ LiveServicesConnector.getData = function (lastRawData) {
117
+ return lastRawData.map(function (item) {
118
+ var _a, _b;
119
+ var newItem = item;
120
+ newItem.slugs = [LiveServicesElement_1.default.getSlug((_a = newItem.rawSlug) !== null && _a !== void 0 ? _a : '')];
121
+ newItem.support = LiveServicesElement_1.default.getSupport(newItem.slugs[0]);
122
+ newItem.zone = LiveServicesElement_1.default.getZone(newItem.slugs[0]);
123
+ newItem.status = LiveServicesElement_1.default.getStatus((_b = newItem.rawStatus) !== null && _b !== void 0 ? _b : '');
124
+ return newItem;
125
+ });
126
+ };
127
+ /**
128
+ * URL to get remote content
129
+ *
130
+ * @public
131
+ * @static
132
+ *
133
+ * @return string URL to get remote content
134
+ */
135
+ LiveServicesConnector.url = 'https://live-services.elderscrollsonline.com/status/realms';
136
+ return LiveServicesConnector;
137
+ }());
138
+ exports.default = LiveServicesConnector;
package/lib/index.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ import { RawEsoStatus } from '@eso-status/types';
2
+ /**
3
+ * Class of Live Services
4
+ */
5
+ export declare class LiveServices {
6
+ /**
7
+ * Methode used to get Live Services data
8
+ *
9
+ * @public
10
+ * @static
11
+ *
12
+ * @return Promise<RawEsoStatus[]> Live Services elements
13
+ */
14
+ static getData(): Promise<RawEsoStatus[]>;
15
+ }
package/lib/index.js ADDED
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (_) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.LiveServices = void 0;
40
+ var LiveServicesConnector_1 = require("./connectors/LiveServicesConnector");
41
+ /**
42
+ * Class of Live Services
43
+ */
44
+ var LiveServices = /** @class */ (function () {
45
+ function LiveServices() {
46
+ }
47
+ /**
48
+ * Methode used to get Live Services data
49
+ *
50
+ * @public
51
+ * @static
52
+ *
53
+ * @return Promise<RawEsoStatus[]> Live Services elements
54
+ */
55
+ LiveServices.getData = function () {
56
+ return __awaiter(this, void 0, void 0, function () {
57
+ var remoteContent, filteredContent, lastRawData;
58
+ return __generator(this, function (_a) {
59
+ switch (_a.label) {
60
+ case 0: return [4 /*yield*/, LiveServicesConnector_1.default.getRemoteContent()];
61
+ case 1:
62
+ remoteContent = _a.sent();
63
+ filteredContent = LiveServicesConnector_1.default.getFilterContent(remoteContent);
64
+ lastRawData = LiveServicesConnector_1.default.changeFilterContentForList(filteredContent);
65
+ return [2 /*return*/, LiveServicesConnector_1.default.getData(lastRawData)];
66
+ }
67
+ });
68
+ });
69
+ };
70
+ return LiveServices;
71
+ }());
72
+ exports.LiveServices = LiveServices;
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "@eso-status/live-services",
3
+ "version": "1.0.0",
4
+ "description": "Library used to get servers status of The elders scrolls Online game with https://live-services.elderscrollsonline.com/status/realms",
5
+ "main": "lib/index.js",
6
+ "scripts": {
7
+ "lint": "eslint tests src --ext .ts",
8
+ "lint:fix": "eslint tests src --ext .ts --fix",
9
+ "build": "rm -R -f lib/* && tsc",
10
+ "test": "jest",
11
+ "start": "node .",
12
+ "dev": "npm run lint && npm run build && npm run start",
13
+ "watch": "nodemon --exec npm run dev"
14
+ },
15
+ "files": [
16
+ "lib/classes/LiveServicesElement.d.ts",
17
+ "lib/classes/LiveServicesElement.js",
18
+ "lib/connectors/LiveServicesConnector.d.ts",
19
+ "lib/connectors/LiveServicesConnector.js",
20
+ "lib/index.d.ts",
21
+ "lib/index.js",
22
+ ".npmrc",
23
+ "LICENSE.md",
24
+ "package.json",
25
+ "README.md"
26
+ ],
27
+ "engineStrict": true,
28
+ "engines": {
29
+ "node": "^10.18.0 || ^12.14.0 || >=14.15.0"
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git@github.com:eso-status/live-services-dev.git"
34
+ },
35
+ "author": "@dov118 <contact@dov118.dev> (https://dov118.dev)",
36
+ "license": "MIT",
37
+ "bugs": {
38
+ "url": "https://github.com/eso-status/live-services-dev/issues"
39
+ },
40
+ "homepage": "https://github.com/eso-status/live-services-dev#readme",
41
+ "devDependencies": {
42
+ "@eso-status/types": "1.0.0",
43
+ "@types/jest": "^27.0.3",
44
+ "@types/node": "16.11.11",
45
+ "@typescript-eslint/eslint-plugin": "5.5.0",
46
+ "@typescript-eslint/parser": "5.5.0",
47
+ "@typescript-eslint/typescript-estree": "5.5.0",
48
+ "eslint": "8.3.0",
49
+ "eslint-config-airbnb-base": "15.0.0",
50
+ "eslint-plugin-import": "2.25.3",
51
+ "eslint-plugin-jest": "25.3.0",
52
+ "jest": "27.4.2",
53
+ "nodemon": "2.0.15",
54
+ "ts-jest": "27.0.7",
55
+ "typescript": "4.5.2"
56
+ },
57
+ "dependencies": {
58
+ "axios": "0.24.0"
59
+ }
60
+ }