@eso-status/forum-message 1.0.13 → 2.0.0-dev.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.
Files changed (57) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +100 -93
  3. package/lib/connector.d.ts +68 -0
  4. package/lib/connector.js +122 -0
  5. package/lib/const.d.ts +9 -0
  6. package/lib/const.js +12 -0
  7. package/lib/formatter/date.formatter.d.ts +97 -0
  8. package/lib/formatter/date.formatter.js +161 -0
  9. package/lib/identifier/slug.identifier.d.ts +94 -0
  10. package/lib/identifier/slug.identifier.js +139 -0
  11. package/lib/identifier/slug.match.d.ts +26 -0
  12. package/lib/identifier/slug.match.js +35 -0
  13. package/lib/identifier/status.identifier.d.ts +63 -0
  14. package/lib/identifier/status.identifier.js +85 -0
  15. package/lib/index.d.ts +11 -13
  16. package/lib/index.js +14 -72
  17. package/lib/raw.d.ts +42 -0
  18. package/lib/raw.js +58 -0
  19. package/lib/type/messageType.type.d.ts +4 -0
  20. package/lib/type/messageType.type.js +3 -0
  21. package/lib/type/remoteDownRawStatus.type.d.ts +4 -0
  22. package/lib/type/remoteDownRawStatus.type.js +3 -0
  23. package/lib/type/remotePlannedRawStatus.type.d.ts +4 -0
  24. package/lib/type/remotePlannedRawStatus.type.js +3 -0
  25. package/lib/type/remoteRawSlug.type.d.ts +11 -0
  26. package/lib/type/remoteRawSlug.type.js +3 -0
  27. package/lib/type/remoteRawStatus.type.d.ts +7 -0
  28. package/lib/type/remoteRawStatus.type.js +3 -0
  29. package/lib/type/remoteServerPcEuRawSlug.type.d.ts +4 -0
  30. package/lib/type/remoteServerPcEuRawSlug.type.js +3 -0
  31. package/lib/type/remoteServerPcNaRawSlug.type.d.ts +4 -0
  32. package/lib/type/remoteServerPcNaRawSlug.type.js +3 -0
  33. package/lib/type/remoteServerPcPtsRawSlug.type.d.ts +4 -0
  34. package/lib/type/remoteServerPcPtsRawSlug.type.js +3 -0
  35. package/lib/type/remoteServerPsEuRawSlug.type.d.ts +4 -0
  36. package/lib/type/remoteServerPsEuRawSlug.type.js +3 -0
  37. package/lib/type/remoteServerPsNaRawSlug.type.d.ts +4 -0
  38. package/lib/type/remoteServerPsNaRawSlug.type.js +3 -0
  39. package/lib/type/remoteServerXboxEuRawSlug.type.d.ts +4 -0
  40. package/lib/type/remoteServerXboxEuRawSlug.type.js +3 -0
  41. package/lib/type/remoteServerXboxNaRawSlug.type.d.ts +4 -0
  42. package/lib/type/remoteServerXboxNaRawSlug.type.js +3 -0
  43. package/lib/type/remoteServiceStoreEsoRawSlug.type.d.ts +4 -0
  44. package/lib/type/remoteServiceStoreEsoRawSlug.type.js +3 -0
  45. package/lib/type/remoteServiceSystemAccountRawSlug.type.d.ts +4 -0
  46. package/lib/type/remoteServiceSystemAccountRawSlug.type.js +3 -0
  47. package/lib/type/remoteServiceWebSiteRawSlug.type.d.ts +4 -0
  48. package/lib/type/remoteServiceWebSiteRawSlug.type.js +3 -0
  49. package/lib/type/remoteUpRawStatus.type.d.ts +4 -0
  50. package/lib/type/remoteUpRawStatus.type.js +3 -0
  51. package/lib/type/sourceUrl.type.d.ts +4 -0
  52. package/lib/type/sourceUrl.type.js +3 -0
  53. package/package.json +110 -37
  54. package/lib/classes/ForumMessageElement.d.ts +0 -110
  55. package/lib/classes/ForumMessageElement.js +0 -386
  56. package/lib/connectors/ForumMessageConnector.d.ts +0 -127
  57. package/lib/connectors/ForumMessageConnector.js +0 -311
package/lib/index.js CHANGED
@@ -1,77 +1,19 @@
1
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 (g && (g = 0, op[0] && (_ = 0)), _) 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
2
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.ForumMessage = exports.ForumMessagePTSURL = exports.ForumMessageURL = void 0;
40
- var ForumMessageConnector_1 = require("./connectors/ForumMessageConnector");
41
- exports.ForumMessageURL = 'https://forums.elderscrollsonline.com/';
42
- exports.ForumMessagePTSURL = 'https://forums.elderscrollsonline.com/en/categories/pts';
3
+ const const_1 = require("./const");
4
+ const connector_1 = require("./connector");
43
5
  /**
44
- * Class of Forum Message
6
+ * Class for retrieving announcement information
45
7
  */
46
- var ForumMessage = /** @class */ (function () {
47
- function ForumMessage() {
48
- }
8
+ class ForumMessage {
49
9
  /**
50
- * Methode used to get Forum Message data
51
- *
52
- * @public
53
- * @static
54
- *
55
- * @return Promise<RawEsoStatus[]> Forum Message elements
56
- */
57
- ForumMessage.getData = function () {
58
- return __awaiter(this, arguments, void 0, function (url) {
59
- var remoteContent, slugOfRawContent, rawContentBySlug, rawContentWithRawDate, data;
60
- if (url === void 0) { url = exports.ForumMessageURL; }
61
- return __generator(this, function (_a) {
62
- switch (_a.label) {
63
- case 0: return [4 /*yield*/, ForumMessageConnector_1.default.getRemoteContent(url)];
64
- case 1:
65
- remoteContent = _a.sent();
66
- slugOfRawContent = ForumMessageConnector_1.default.getRawContentWithSlug(remoteContent);
67
- rawContentBySlug = ForumMessageConnector_1.default.splitRawContentBySlug(slugOfRawContent);
68
- rawContentWithRawDate = ForumMessageConnector_1.default.getRawContentWithRawDate(rawContentBySlug);
69
- data = ForumMessageConnector_1.default.getData(rawContentWithRawDate);
70
- return [2 /*return*/, ForumMessageConnector_1.default.sortData(data)];
71
- }
72
- });
73
- });
74
- };
75
- return ForumMessage;
76
- }());
77
- exports.ForumMessage = ForumMessage;
10
+ * Method for retrieving announcement information
11
+ * If no URL is provided as a parameter, the method will return announcement information for https://forums.elderscrollsonline.com
12
+ * @param url URL serving as the source to retrieve announcements
13
+ */
14
+ static async getData(url) {
15
+ return (await connector_1.default.init(url ?? const_1.ForumMessageURL)).rawEsoStatus;
16
+ }
17
+ }
18
+ exports.default = ForumMessage;
19
+ //# sourceMappingURL=index.js.map
package/lib/raw.d.ts ADDED
@@ -0,0 +1,42 @@
1
+ import { SourceUrl } from './type/sourceUrl.type';
2
+ import { EsoStatusRawData } from './interface/esoStatusRawData.interface';
3
+ /**
4
+ * Class containing announcement information
5
+ */
6
+ export default class Raw {
7
+ private url;
8
+ private raw;
9
+ /**
10
+ * Status identification class
11
+ * @private
12
+ */
13
+ private readonly statusIdentifier;
14
+ /**
15
+ * Class for identifying and formatting the date(s)
16
+ * @private
17
+ */
18
+ private readonly dateFormatter;
19
+ /**
20
+ * Class for identifying the list of slugs
21
+ * @private
22
+ */
23
+ private slugsIdentifier;
24
+ /**
25
+ * List of information about slugs found in the announcement
26
+ */
27
+ matches: EsoStatusRawData[];
28
+ /**
29
+ * @param url URL used as the source to retrieve announcements
30
+ * @param raw Raw data of the announcement
31
+ */
32
+ constructor(url: SourceUrl, raw: string);
33
+ /**
34
+ * Method for formatting each slug found in the announcement to RawEsoStatus
35
+ * @private
36
+ */
37
+ private split;
38
+ /**
39
+ * Method for generating the RawEsoStatus object
40
+ */
41
+ private getRawEsoStatus;
42
+ }
package/lib/raw.js ADDED
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const status_identifier_1 = require("./identifier/status.identifier");
4
+ const date_formatter_1 = require("./formatter/date.formatter");
5
+ const slug_identifier_1 = require("./identifier/slug.identifier");
6
+ /**
7
+ * Class containing announcement information
8
+ */
9
+ class Raw {
10
+ /**
11
+ * @param url URL used as the source to retrieve announcements
12
+ * @param raw Raw data of the announcement
13
+ */
14
+ constructor(url, raw) {
15
+ this.url = url;
16
+ this.raw = raw;
17
+ /**
18
+ * List of information about slugs found in the announcement
19
+ */
20
+ this.matches = [];
21
+ this.statusIdentifier = new status_identifier_1.default(this.raw);
22
+ this.dateFormatter = new date_formatter_1.default(this.raw);
23
+ this.slugsIdentifier = new slug_identifier_1.default(this.raw);
24
+ this.split();
25
+ }
26
+ /**
27
+ * Method for formatting each slug found in the announcement to RawEsoStatus
28
+ * @private
29
+ */
30
+ split() {
31
+ this.matches = this.slugsIdentifier.slugMatches.map((slugMatch) => this.getRawEsoStatus(slugMatch));
32
+ }
33
+ /**
34
+ * Method for generating the RawEsoStatus object
35
+ */
36
+ getRawEsoStatus(slugMatch) {
37
+ const rawEsoStatus = {
38
+ source: this.url,
39
+ raw: this.raw,
40
+ slug: slugMatch.slug,
41
+ type: slugMatch.getType(),
42
+ support: slugMatch.getSupport(),
43
+ zone: slugMatch.getZone(),
44
+ status: this.statusIdentifier.status,
45
+ rawSlug: slugMatch.rawSlug,
46
+ };
47
+ if (this.dateFormatter.rawDate) {
48
+ rawEsoStatus.rawDate = this.dateFormatter.rawDate;
49
+ rawEsoStatus.dates = this.dateFormatter.dates;
50
+ }
51
+ if (this.statusIdentifier.rawStatus) {
52
+ rawEsoStatus.rawStatus = this.statusIdentifier.rawStatus;
53
+ }
54
+ return rawEsoStatus;
55
+ }
56
+ }
57
+ exports.default = Raw;
58
+ //# sourceMappingURL=raw.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different classes of announcement messages on the ESO forum
3
+ */
4
+ export type MessageType = 'WarningMessage' | 'AlertMessage';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=messageType.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different statuses of announcements indicating that the announcement refers to an inaccessible service/server
3
+ */
4
+ export type RemoteDownRawStatus = '[EXTENDED]' | '[IN PROGRESS]' | 'unavailable';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteDownRawStatus.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different statuses of announcements indicating that the announcement refers to a service/server that will be undergoing maintenance soon
3
+ */
4
+ export type RemotePlannedRawStatus = 'We will be performing maintenance';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remotePlannedRawStatus.type.js.map
@@ -0,0 +1,11 @@
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 { RemoteServerXboxEuRawSlug } from './remoteServerXboxEuRawSlug.type';
6
+ import { RemoteServiceStoreEsoRawSlug } from './remoteServiceStoreEsoRawSlug.type';
7
+ import { RemoteServiceWebSiteRawSlug } from './remoteServiceWebSiteRawSlug.type';
8
+ /**
9
+ * Different slugs of announcements
10
+ */
11
+ export type RemoteRawSlug = RemoteServerPcEuRawSlug | RemoteServerPcNaRawSlug | RemoteServerPcPtsRawSlug | RemoteServerPsEuRawSlug | RemoteServerXboxEuRawSlug | RemoteServiceStoreEsoRawSlug | RemoteServiceWebSiteRawSlug;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteRawSlug.type.js.map
@@ -0,0 +1,7 @@
1
+ import { RemoteUpRawStatus } from './remoteUpRawStatus.type';
2
+ import { RemoteDownRawStatus } from './remoteDownRawStatus.type';
3
+ import { RemotePlannedRawStatus } from './remotePlannedRawStatus.type';
4
+ /**
5
+ * Different statuses of announcements
6
+ */
7
+ export type RemoteRawStatus = RemoteUpRawStatus | RemoteDownRawStatus | RemotePlannedRawStatus;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteRawStatus.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different slugs of announcements concerning the European PC/Mac Megaserver
3
+ */
4
+ export type RemoteServerPcEuRawSlug = 'PC/Mac: EU megaserver for' | 'PC/Mac: NA and EU megaservers for';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteServerPcEuRawSlug.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different slugs of announcements concerning the North American PC/Mac Megaserver
3
+ */
4
+ export type RemoteServerPcNaRawSlug = 'PC/Mac: NA megaserver for' | 'PC/Mac: NA and EU megaservers for';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteServerPcNaRawSlug.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different slugs of announcements concerning the PTS
3
+ */
4
+ export type RemoteServerPcPtsRawSlug = 'PTS';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteServerPcPtsRawSlug.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different slugs of announcements concerning the European PlayStation® Megaserver
3
+ */
4
+ export type RemoteServerPsEuRawSlug = 'PlayStation®: NA and EU megaservers for';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteServerPsEuRawSlug.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different slugs of announcements concerning the North American PlayStation® Megaserver
3
+ */
4
+ export type RemoteServerPsNaRawSlug = 'PlayStation®: NA and EU megaservers for';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteServerPsNaRawSlug.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different slugs of announcements concerning the European Xbox Megaserver
3
+ */
4
+ export type RemoteServerXboxEuRawSlug = 'Xbox: NA and EU megaservers for';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteServerXboxEuRawSlug.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different slugs of announcements concerning the North American Xbox Megaserver
3
+ */
4
+ export type RemoteServerXboxNaRawSlug = 'Xbox: NA and EU megaservers for';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteServerXboxNaRawSlug.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different slugs of announcements concerning the ESO store
3
+ */
4
+ export type RemoteServiceStoreEsoRawSlug = 'ESO Store and Account System for';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteServiceStoreEsoRawSlug.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different slugs of announcements concerning the account system
3
+ */
4
+ export type RemoteServiceSystemAccountRawSlug = 'ESO Store and Account System for';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteServiceSystemAccountRawSlug.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different slugs of announcements concerning the website service
3
+ */
4
+ export type RemoteServiceWebSiteRawSlug = 'ESO Website for';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteServiceWebSiteRawSlug.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different statuses of announcements indicating that the announcement refers to an accessible service/server
3
+ */
4
+ export type RemoteUpRawStatus = '[COMPLETE]' | 'now available' | 'complete';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=remoteUpRawStatus.type.js.map
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Different URLs serving as sources for retrieving maintenance announcements
3
+ */
4
+ export type SourceUrl = 'https://forums.elderscrollsonline.com' | 'https://forums.elderscrollsonline.com/en/categories/pts';
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=sourceUrl.type.js.map
package/package.json CHANGED
@@ -1,64 +1,137 @@
1
1
  {
2
2
  "name": "@eso-status/forum-message",
3
- "version": "1.0.13",
4
- "description": "Library used to get servers status of The elders scrolls Online game with https://forums.elderscrollsonline.com/ and https://forums.elderscrollsonline.com/en/categories/pts",
3
+ "version": "2.0.0-dev.0",
4
+ "description": "Library for retrieving and formatting data, available at https://forums.elderscrollsonline.com or https://forums.elderscrollsonline.com/en/categories/pts",
5
+ "author": "@dov118 <contact@dov118.dev> (https://dov118.dev)",
5
6
  "main": "lib/index.js",
6
- "scripts": {
7
- "post-install": "cp pre-commit .git/hooks/ && chmod +x .git/hooks/pre-commit && echo 'hook copied'",
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 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/classes/ForumMessageElement.d.ts",
20
- "lib/classes/ForumMessageElement.js",
21
- "lib/connectors/ForumMessageConnector.d.ts",
22
- "lib/connectors/ForumMessageConnector.js",
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/type/messageType.type.d.ts",
19
+ "lib/type/messageType.type.js",
20
+ "lib/type/remoteDownRawStatus.type.d.ts",
21
+ "lib/type/remoteDownRawStatus.type.js",
22
+ "lib/type/remotePlannedRawStatus.type.d.ts",
23
+ "lib/type/remotePlannedRawStatus.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/remoteServiceWebSiteRawSlug.type.d.ts",
47
+ "lib/type/remoteServiceWebSiteRawSlug.type.js",
48
+ "lib/type/remoteUpRawStatus.type.d.ts",
49
+ "lib/type/remoteUpRawStatus.type.js",
50
+ "lib/type/sourceUrl.type.d.ts",
51
+ "lib/type/sourceUrl.type.js",
52
+ "lib/connector.d.ts",
53
+ "lib/connector.js",
54
+ "lib/const.d.ts",
55
+ "lib/const.js",
23
56
  "lib/index.d.ts",
24
57
  "lib/index.js",
25
- ".npmrc",
58
+ "lib/raw.d.ts",
59
+ "lib/raw.js",
60
+ ".npmrc,",
26
61
  "LICENSE.md",
27
62
  "package.json",
28
63
  "README.md"
29
64
  ],
30
- "engineStrict": true,
31
65
  "engines": {
32
- "node": ">=18.18.0 || >=20.0.0"
66
+ "node": ">=16.10.0 || >=18.12.0 || >=20.0.0"
33
67
  },
68
+ "bugs": {
69
+ "url": "https://github.com/eso-status/forum-message/issues"
70
+ },
71
+ "homepage": "https://github.com/eso-status/forum-message#readme",
34
72
  "repository": {
35
73
  "type": "git",
36
- "url": "git@github.com:eso-status/forum-message-dev.git"
74
+ "url": "git@github.com:eso-status/forum-message.git"
37
75
  },
38
- "author": "@dov118 <contact@dov118.dev> (https://dov118.dev)",
39
- "license": "MIT",
40
- "bugs": {
41
- "url": "https://github.com/eso-status/forum-message-dev/issues"
76
+ "scripts": {
77
+ "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
78
+ "lint": "eslint \"{src,test}/**/*.ts\"",
79
+ "lint:fix": "eslint \"{src,test}/**/*.ts\" --fix",
80
+ "build": "rm -R -f lib/* && tsc --project tsconfig.build.json",
81
+ "dev": "npm run build && node .",
82
+ "watch": "nodemon --exec npm run dev",
83
+ "test": "npm run build && jest --runInBand --setupFiles",
84
+ "test:watch": "jest --runInBand --watch --setupFiles",
85
+ "test:cov": "jest --runInBand --coverage --setupFiles",
86
+ "prepare": "husky"
87
+ },
88
+ "dependencies": {
89
+ "@eso-status/types": "2.0.0-dev.4",
90
+ "axios": "1.7.7",
91
+ "moment": "2.30.1"
42
92
  },
43
- "homepage": "https://github.com/eso-status/forum-message-dev#readme",
44
93
  "devDependencies": {
45
- "@eso-status/types": "1.0.7",
46
94
  "@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
95
  "eslint": "8.57.0",
52
96
  "eslint-config-airbnb-base": "15.0.0",
53
- "eslint-plugin-import": "2.29.1",
54
- "eslint-plugin-jest": "28.8.0",
97
+ "eslint-config-airbnb-typescript": "18.0.0",
98
+ "eslint-config-prettier": "9.1.0",
99
+ "eslint-plugin-jest": "28.8.3",
100
+ "eslint-plugin-prettier": "5.2.1",
101
+ "eslint-plugin-sonarjs": "2.0.2",
102
+ "eslint-plugin-unused-imports": "4.1.3",
103
+ "husky": "9.1.5",
55
104
  "jest": "29.7.0",
56
105
  "nodemon": "3.1.4",
106
+ "prettier": "3.3.3",
57
107
  "ts-jest": "29.2.5",
58
108
  "typescript": "5.5.4"
59
109
  },
60
- "dependencies": {
61
- "axios": "1.7.5",
62
- "moment": "2.30.1"
110
+ "jest": {
111
+ "moduleFileExtensions": [
112
+ "js",
113
+ "json",
114
+ "ts"
115
+ ],
116
+ "rootDir": "./",
117
+ "testRegex": ".*\\.e2e-spec\\.ts|.*\\.spec\\.ts$",
118
+ "transform": {
119
+ "^.+\\.ts$": "ts-jest"
120
+ },
121
+ "collectCoverageFrom": [
122
+ "src/**/*.ts"
123
+ ],
124
+ "coverageDirectory": "./coverage",
125
+ "testEnvironment": "node",
126
+ "setupFiles": [
127
+ "dotenv/config"
128
+ ],
129
+ "moduleDirectories": [
130
+ "node_modules",
131
+ "src"
132
+ ],
133
+ "modulePaths": [
134
+ "<rootDir>"
135
+ ]
63
136
  }
64
137
  }