@atmosx/event-product-parser 3.0.63 → 3.0.75
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/.github/docs/docs-functions.md +1 -1
- package/.github/docs/docs-general-configurations.md +1 -11
- package/.github/docs/docs-integrations.md +3 -2
- package/README.md +4 -4
- package/dist/cjs/index.cjs +3590 -623
- package/dist/esm/index.mjs +3589 -624
- package/package.json +11 -4
- package/src/bootstrap.ts +50 -33
- package/src/{@building → building}/CreateEvent.ts +10 -10
- package/src/{@building → building}/GetCleanedEvent.ts +2 -2
- package/src/{@building → building}/GetEventAttachments.ts +12 -10
- package/src/building/GetEventDirection.ts +28 -0
- package/src/{@building → building}/GetEventEnhancedName.ts +5 -6
- package/src/{@building → building}/GetEventGeometry.ts +19 -13
- package/src/{@building → building}/GetEventHeader.ts +4 -4
- package/src/{@building → building}/GetEventNodes.ts +16 -14
- package/src/{@building → building}/GetEventOffice.ts +5 -5
- package/src/building/GetEventPopulation.ts +58 -0
- package/src/{@building → building}/GetEventProperties.ts +23 -18
- package/src/{@building → building}/GetEventSignature.ts +8 -8
- package/src/{@building → building}/GetEventTags.ts +3 -3
- package/src/{@core/CreateListener.ts → building/GetEventTheme.ts} +8 -6
- package/src/{@building → building}/GetEventTracking.ts +6 -6
- package/src/{@modules/@eas/GenerateEASMessage.ts → components/audio/GenerateAudioMessage.ts} +32 -33
- package/src/{@modules/@eas → components/audio/components}/GetCleanDescription.ts +2 -2
- package/src/{@modules/@eas → components/audio/components}/GetFloatPCM16.ts +2 -2
- package/src/{@modules/@eas → components/audio/components}/GetMergedPCM16.ts +2 -2
- package/src/{@modules/@eas → components/audio/components}/GetPCM16.ts +2 -2
- package/src/{@modules/@eas → components/audio/components}/GetPCMToFloat.ts +2 -2
- package/src/{@modules/@eas → components/audio/components}/GetSampledPCM16.ts +2 -2
- package/src/{@modules/@eas → components/audio/components}/GetTTS.ts +5 -3
- package/src/{@modules/@eas → components/audio/components}/GetWavPCM16.ts +2 -2
- package/src/{@modules/@eas → components/audio/components}/SetAFSK.ts +2 -2
- package/src/{@modules/@eas → components/audio/components}/SetAsciiToBits.ts +2 -2
- package/src/{@modules/@eas → components/audio/components}/SetAttentionTone.ts +2 -2
- package/src/{@modules/@eas → components/audio/components}/SetNoise.ts +4 -4
- package/src/{@modules/@eas → components/audio/components}/SetRadioEffect.ts +4 -4
- package/src/{@modules/@eas → components/audio/components}/SetSameHeader.ts +5 -5
- package/src/{@modules/@utilities/SetWarning.ts → components/database/CreateQuery.ts} +18 -13
- package/src/{@modules/@database → components/database}/GetCachedEvents.ts +14 -9
- package/src/components/database/ImportBoundaries.ts +168 -0
- package/src/{@modules/@database → components/database}/ImportBroadcastify.ts +8 -17
- package/src/components/database/ImportCities.ts +87 -0
- package/src/{@modules/@database → components/database}/ImportShapefiles.ts +14 -16
- package/src/{@modules/@database → components/database}/ImportStanza.ts +13 -17
- package/src/components/database/InitializeDatabase.ts +71 -0
- package/src/components/images/GenerateGraphic.ts +242 -0
- package/src/components/images/components/CreateRectangle.ts +22 -0
- package/src/components/images/components/CreateText.ts +22 -0
- package/src/components/images/modules/CreateSVG.ts +37 -0
- package/src/components/images/modules/GetGeographicalBoundaries.ts +72 -0
- package/src/components/images/modules/GetGeographicalCities.ts +58 -0
- package/src/components/images/modules/GetGeographicalEvents.ts +48 -0
- package/src/components/images/modules/GetGeometryBounds.ts +82 -0
- package/src/components/images/modules/GetParsedBoundary.ts +58 -0
- package/src/components/images/modules/GetSVGPath.ts +53 -0
- package/src/components/images/modules/NormalizePolygon.ts +57 -0
- package/src/{@modules/@stanza → components/stanza}/GetAwipsType.ts +4 -4
- package/src/{@modules/@stanza → components/stanza}/ValidateStanza.ts +6 -6
- package/src/{@modules/@utilities → components/utilities}/CreateHttp.ts +2 -2
- package/src/{@parsers/@text → components/utilities}/GetEmbededText.ts +6 -4
- package/src/{@modules/@utilities → components/utilities}/GetFormattedTime.ts +2 -2
- package/src/{@modules/@utilities → components/utilities}/GetLatestIssuance.ts +2 -2
- package/src/{@modules/@utilities → components/utilities}/GetMatched.ts +2 -2
- package/src/{@modules/@utilities → components/utilities}/GetShapeNearestPoint.ts +2 -2
- package/src/{@parsers/@text → components/utilities}/GetStringText.ts +7 -7
- package/src/components/utilities/GetUnionPolygon.ts +36 -0
- package/src/{@modules/@utilities → components/utilities}/QueueManager.ts +2 -2
- package/src/{@modules/@utilities → components/utilities}/SetCronSchedule.ts +37 -25
- package/src/{@modules/@utilities → components/utilities}/SetDebug.ts +4 -4
- package/src/{@modules/@utilities → components/utilities}/SetEventEmit.ts +8 -7
- package/src/{@modules/@utilities → components/utilities}/SetSettings.ts +4 -4
- package/src/{@modules/@utilities → components/utilities}/SetSleep.ts +2 -2
- package/src/{@modules/@utilities → components/utilities}/SetTimeoutAction.ts +3 -3
- package/src/components/utilities/SetWarning.ts +47 -0
- package/src/{@modules/@xmpp → components/xmpp}/DeployXMPP.ts +12 -12
- package/src/{@modules/@xmpp → components/xmpp}/ErrorXMPP.ts +3 -3
- package/src/{@modules/@xmpp → components/xmpp}/OfflineXMPP.ts +4 -4
- package/src/{@modules/@xmpp → components/xmpp}/OnlineXMPP.ts +5 -5
- package/src/{@modules/@xmpp → components/xmpp}/ReconnectXMPP.ts +6 -6
- package/src/{@modules/@xmpp → components/xmpp}/StanzaXMPP.ts +8 -8
- package/src/{@core → core}/ClearEvents.ts +4 -4
- package/src/{@core → core}/GetEvents.ts +3 -3
- package/src/{@core → core}/GetNodes.ts +3 -3
- package/src/{@core → core}/GetRandomEvent.ts +3 -3
- package/src/{@core → core}/GetVersion.ts +3 -3
- package/src/{@core → core}/ManualEvent.ts +6 -6
- package/src/{@core → core}/QueryStanza.ts +9 -8
- package/src/{@core → core}/SetNode.ts +5 -5
- package/src/{@core → core}/StartService.ts +13 -12
- package/src/{@core → core}/StopService.ts +3 -3
- package/src/{@enums → enums}/AWIPS.ts +2 -2
- package/src/{@enums → enums}/Actions.ts +2 -2
- package/src/{@enums → enums}/Cancellation.ts +2 -2
- package/src/{@enums → enums}/Causes.ts +2 -2
- package/src/{@enums → enums}/Correlations.ts +2 -2
- package/src/{@enums → enums}/Enhanced.ts +4 -3
- package/src/{@enums → enums}/Events.ts +2 -2
- package/src/{@enums → enums}/Expressions.ts +2 -2
- package/src/{@enums → enums}/GlobalFilter.ts +2 -2
- package/src/{@enums → enums}/Hail.ts +2 -2
- package/src/{@enums → enums}/ICAO.ts +2 -2
- package/src/{@enums → enums}/Matches.ts +8 -3
- package/src/{@enums → enums}/Products.ts +2 -2
- package/src/{@enums → enums}/Records.ts +2 -2
- package/src/{@enums → enums}/Severity.ts +2 -2
- package/src/{@enums → enums}/Shapefiles.ts +2 -2
- package/src/{@enums → enums}/States.ts +68 -4
- package/src/{@enums → enums}/Status.ts +2 -2
- package/src/{@enums → enums}/Strings.ts +2 -2
- package/src/{@enums → enums}/Tags.ts +8 -3
- package/src/{@enums → enums}/Testing.ts +2 -2
- package/src/enums/Themes.ts +70 -0
- package/src/{@events → events}/ParseAPI.ts +28 -17
- package/src/{@events → events}/ParseText.ts +13 -11
- package/src/{@events → events}/ParseUGC.ts +15 -14
- package/src/{@events → events}/ParseVTEC.ts +18 -16
- package/src/index.ts +49 -32
- package/src/{@manager → manager}/MakeEvents.ts +16 -28
- package/src/{@manager → manager}/RemoveEvent.ts +9 -9
- package/src/{@manager → manager}/SetHash.ts +5 -5
- package/src/{@manager → manager}/UpdateEvents.ts +6 -6
- package/src/{@manager → manager}/UpdateNode.ts +6 -6
- package/src/{@manager → manager}/ValidateEvents.ts +31 -20
- package/src/{@parsers/@hvtec → parsers/hvtec}/HVExtract.ts +7 -7
- package/src/{@parsers/@text → parsers/text}/GetDescriptionFromProduct.ts +3 -3
- package/src/parsers/text/GetPolygonFromProduct.ts +71 -0
- package/src/{@parsers/@text → parsers/text}/GetTextFromProduct.ts +2 -2
- package/src/{@parsers/@ugc → parsers/ugc}/GetCache.ts +4 -4
- package/src/{@parsers/@ugc → parsers/ugc}/GetExpiry.ts +2 -2
- package/src/{@parsers/@ugc → parsers/ugc}/GetHeader.ts +3 -3
- package/src/{@parsers/@ugc → parsers/ugc}/GetLocations.ts +9 -9
- package/src/parsers/ugc/GetZonePolygon.ts +73 -0
- package/src/{@parsers/@ugc → parsers/ugc}/GetZones.ts +2 -2
- package/src/{@parsers/@ugc → parsers/ugc}/SetCache.ts +4 -4
- package/src/{@parsers/@ugc → parsers/ugc}/UGCExtract.ts +9 -9
- package/src/{@parsers/@vtec → parsers/vtec}/GetExpiry.ts +2 -2
- package/src/{@parsers/@vtec → parsers/vtec}/VTECExtract.ts +9 -9
- package/src/{@types-lower → static}/Attributes.ts +2 -3
- package/src/{@types-lower → static}/Event.ts +7 -6
- package/src/{@types-lower → static}/Properties.ts +17 -4
- package/src/{@types-lower → static}/Stanza.ts +3 -3
- package/src/{@tasks → tasks}/CreateTasks.ts +40 -34
- package/src/{@tasks → tasks}/TaskGenerateJSON.ts +2 -2
- package/src/{@tasks → tasks}/TaskGenerateText.ts +2 -2
- package/src/{@tasks → tasks}/TaskSendNTFY.ts +29 -25
- package/src/{@tasks → tasks}/TaskSendWebhook.ts +22 -15
- package/src/{@types → types}/Actions.ts +3 -3
- package/src/{@types → types}/HVTEC.ts +2 -2
- package/src/{@types → types}/Hash.ts +2 -2
- package/src/types/Nodes.ts +29 -0
- package/src/{@types → types}/Settings.ts +17 -8
- package/src/{@types → types}/StanzaCompiled.ts +3 -3
- package/src/{@types → types}/UGC.ts +2 -2
- package/src/{@types → types}/VTEC.ts +2 -2
- package/tools/build.js +2 -0
- package/tsconfig.json +25 -18
- package/src/@modules/@database/InitializeDatabase.ts +0 -59
- package/src/@modules/@utilities/GetSettings.ts +0 -25
- package/src/@modules/@utilities/SetListener.ts +0 -30
- package/src/@parsers/@text/GetPolygonFromProduct.ts +0 -53
- package/src/@parsers/@text/GetXML.ts +0 -61
- package/src/@parsers/@ugc/GetZonePolygon.ts +0 -111
- package/src/@tasks/TaskGenerateAudio.ts +0 -34
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
12
|
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
13
|
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
-
Documentation:
|
|
14
|
+
Documentation: https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Independent Package: @atmosx/event-product-parser
|
|
17
17
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
@@ -68,5 +68,69 @@ export const EnumStates: Record<string, string> = {
|
|
|
68
68
|
"WV": "West Virginia",
|
|
69
69
|
"WI": "Wisconsin",
|
|
70
70
|
"WY": "Wyoming",
|
|
71
|
-
"DC": "District of Columbia"
|
|
72
|
-
|
|
71
|
+
"DC": "District of Columbia",
|
|
72
|
+
};
|
|
73
|
+
|
|
74
|
+
export const EnumZones: Record<string, string> = {
|
|
75
|
+
"LM": "Lake Michigan",
|
|
76
|
+
"GM": "Gulf of Mexico",
|
|
77
|
+
"LH": "Lake Huron",
|
|
78
|
+
"LE": "Lake Erie",
|
|
79
|
+
"LS": "Lake Superior",
|
|
80
|
+
"LO": "Lake Ontario",
|
|
81
|
+
"AM": "Atlantic Ocean",
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const EnumStateFIPS: Record<string, string> = {
|
|
85
|
+
"01": "AL",
|
|
86
|
+
"02": "AK",
|
|
87
|
+
"04": "AZ",
|
|
88
|
+
"05": "AR",
|
|
89
|
+
"06": "CA",
|
|
90
|
+
"08": "CO",
|
|
91
|
+
"09": "CT",
|
|
92
|
+
"10": "DE",
|
|
93
|
+
"11": "DC",
|
|
94
|
+
"12": "FL",
|
|
95
|
+
"13": "GA",
|
|
96
|
+
"15": "HI",
|
|
97
|
+
"16": "ID",
|
|
98
|
+
"17": "IL",
|
|
99
|
+
"18": "IN",
|
|
100
|
+
"19": "IA",
|
|
101
|
+
"20": "KS",
|
|
102
|
+
"21": "KY",
|
|
103
|
+
"22": "LA",
|
|
104
|
+
"23": "ME",
|
|
105
|
+
"24": "MD",
|
|
106
|
+
"25": "MA",
|
|
107
|
+
"26": "MI",
|
|
108
|
+
"27": "MN",
|
|
109
|
+
"28": "MS",
|
|
110
|
+
"29": "MO",
|
|
111
|
+
"30": "MT",
|
|
112
|
+
"31": "NE",
|
|
113
|
+
"32": "NV",
|
|
114
|
+
"33": "NH",
|
|
115
|
+
"34": "NJ",
|
|
116
|
+
"35": "NM",
|
|
117
|
+
"36": "NY",
|
|
118
|
+
"37": "NC",
|
|
119
|
+
"38": "ND",
|
|
120
|
+
"39": "OH",
|
|
121
|
+
"40": "OK",
|
|
122
|
+
"41": "OR",
|
|
123
|
+
"42": "PA",
|
|
124
|
+
"44": "RI",
|
|
125
|
+
"45": "SC",
|
|
126
|
+
"46": "SD",
|
|
127
|
+
"47": "TN",
|
|
128
|
+
"48": "TX",
|
|
129
|
+
"49": "UT",
|
|
130
|
+
"50": "VT",
|
|
131
|
+
"51": "VA",
|
|
132
|
+
"53": "WA",
|
|
133
|
+
"54": "WV",
|
|
134
|
+
"55": "WI",
|
|
135
|
+
"56": "WY"
|
|
136
|
+
}
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
12
|
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
13
|
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
-
Documentation:
|
|
14
|
+
Documentation: https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Independent Package: @atmosx/event-product-parser
|
|
17
17
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
12
|
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
13
|
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
-
Documentation:
|
|
14
|
+
Documentation: https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Independent Package: @atmosx/event-product-parser
|
|
17
17
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
@@ -11,13 +11,18 @@
|
|
|
11
11
|
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
12
|
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
13
|
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
-
Documentation:
|
|
14
|
+
Documentation: https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Independent Package: @atmosx/event-product-parser
|
|
17
17
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
type EnumTagsType = {
|
|
21
|
+
match: RegExp;
|
|
22
|
+
tag: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const EnumTags: Record<string, EnumTagsType[]> = {
|
|
21
26
|
SEVERE_WEATHER: [
|
|
22
27
|
{ match: /A Large And Extremely Dangerous Tornado/i, tag: "Large and Dangerous Tornado" },
|
|
23
28
|
{ match: /This Is A Particularly Dangerous Situation/i, tag: "Particularly Dangerous Situation" },
|
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
12
|
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
13
|
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
-
Documentation:
|
|
14
|
+
Documentation: https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Independent Package: @atmosx/event-product-parser
|
|
17
17
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
_ _ _ __ __
|
|
3
|
+
/\ | | | | (_) \ \ / /
|
|
4
|
+
/ \ | |_ _ __ ___ ___ ___ _ __ | |__ ___ _ __ _ ___ \ V /
|
|
5
|
+
/ /\ \| __| '_ ` _ \ / _ \/ __| '_ \| '_ \ / _ \ '__| |/ __| > <
|
|
6
|
+
/ ____ \ |_| | | | | | (_) \__ \ |_) | | | | __/ | | | (__ / . \
|
|
7
|
+
/_/ \_\__|_| |_| |_|\___/|___/ .__/|_| |_|\___|_| |_|\___/_/ \_\
|
|
8
|
+
| |
|
|
9
|
+
|_|
|
|
10
|
+
|
|
11
|
+
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
|
+
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
|
+
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
+
Documentation: https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
|
+
|
|
16
|
+
Independent Package: @atmosx/event-product-parser
|
|
17
|
+
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
type Themes = {
|
|
21
|
+
Event: string;
|
|
22
|
+
RGB: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const EnumThemes: Themes[] = [
|
|
26
|
+
{ Event: `Tornado Emergency`, RGB: `rgb(166, 0, 255)` },
|
|
27
|
+
{ Event: `Flash Flood Emergency`, RGB: `rgb(21, 216, 37)` },
|
|
28
|
+
{ Event: `*PDS Tornado Warning*`, RGB: `rgb(208, 0, 255)` },
|
|
29
|
+
{ Event: `*Tornado Warning*`, RGB: `rgb(255, 0, 0)` },
|
|
30
|
+
{ Event: `Confirmed Tornado Warning`, RGB: `rgb(220, 20, 20)` },
|
|
31
|
+
{ Event: `Radar Indicated Tornado Warning`, RGB: `rgb(200, 30, 30)` },
|
|
32
|
+
{ Event: `Tornado Warning`, RGB: `rgb(180, 40, 40)` },
|
|
33
|
+
{ Event: `*EDS Severe Thunderstorm Warning*`, RGB: `rgb(255, 51, 0)` },
|
|
34
|
+
{ Event: `*Destructive Severe Thunderstorm Warning*`, RGB: `rgb(255, 51, 0)` },
|
|
35
|
+
{ Event: `Destructive Severe Thunderstorm Warning (TPROB)`, RGB: `rgb(240, 60, 0)` },
|
|
36
|
+
{ Event: `EDS Severe Thunderstorm Warning (TPROB)`, RGB: `rgb(240, 60, 0)` },
|
|
37
|
+
{ Event: `Considerable Severe Thunderstorm Warning (TPROB)`, RGB: `rgb(230, 100, 0)` },
|
|
38
|
+
{ Event: `*Severe Thunderstorm Warning*`, RGB: `rgb(197, 159, 32)` },
|
|
39
|
+
{ Event: `Severe Thunderstorm Warning (TPROB)`, RGB: `rgb(210, 140, 20)` },
|
|
40
|
+
{ Event: `Considerable Severe Thunderstorm Warning`, RGB: `rgb(204, 160, 0)` },
|
|
41
|
+
{ Event: `Severe Thunderstorm Warning`, RGB: `rgb(204, 132, 0)` },
|
|
42
|
+
{ Event: `Flash Flood Warning`, RGB: `rgb(97, 204, 30)` },
|
|
43
|
+
{ Event: `Flood Warning`, RGB: `rgb(0, 204, 0)` },
|
|
44
|
+
{ Event: `Hurricane Warning`, RGB: `rgb(16, 125, 176)` },
|
|
45
|
+
{ Event: `Tsunami Warning`, RGB: `rgb(93, 27, 158)` },
|
|
46
|
+
{ Event: `Tsunami Watch`, RGB: `rgb(72, 16, 128)` },
|
|
47
|
+
{ Event: `Tsunami Advisory`, RGB: `rgb(80, 48, 160)` },
|
|
48
|
+
{ Event: `Tropical Storm Warning`, RGB: `rgb(101, 194, 238)` },
|
|
49
|
+
{ Event: `Hurricane Watch`, RGB: `rgb(204, 84, 144)` },
|
|
50
|
+
{ Event: `*PDS Blizzard Warning*`, RGB: `rgb(5, 115, 151)` },
|
|
51
|
+
{ Event: `Blizzard Warning`, RGB: `rgb(0, 152, 204)` },
|
|
52
|
+
{ Event: `Snow Squall Warning`, RGB: `rgb(56, 104, 144)` },
|
|
53
|
+
{ Event: `*PDS Ice Storm Warning*`, RGB: `rgb(86, 67, 196)` },
|
|
54
|
+
{ Event: `Ice Storm Warning`, RGB: `rgb(58, 49, 111)` },
|
|
55
|
+
{ Event: `Lake Effect Snow Warning`, RGB: `rgb(0, 111, 111)` },
|
|
56
|
+
{ Event: `Winter Storm Warning`, RGB: `rgb(24, 115, 204)` },
|
|
57
|
+
{ Event: `Extreme Cold Warning`, RGB: `rgb(47, 47, 137)` },
|
|
58
|
+
{ Event: `Tornadic Special Marine Warning`, RGB: `rgb(3, 134, 134)` },
|
|
59
|
+
{ Event: `Special Marine Warning`, RGB: `rgb(0, 204, 204)` },
|
|
60
|
+
{ Event: `Special Weather Statement`, RGB: `rgb(70, 130, 180)` },
|
|
61
|
+
{ Event: `Mesoscale Discussion`, RGB: `rgb(255, 0, 0)` },
|
|
62
|
+
{ Event: `*PDS Tornado Watch*`, RGB: `rgb(255, 0, 0)` },
|
|
63
|
+
{ Event: `*Tornado Watch*`, RGB: `rgb(151, 23, 23)` },
|
|
64
|
+
{ Event: `*PDS Severe Thunderstorm Watch*`, RGB: `rgb(255, 81, 0)` },
|
|
65
|
+
{ Event: `*Severe Thunderstorm Watch*`, RGB: `rgb(255, 204, 0)` },
|
|
66
|
+
{ Event: `*Excessive Heat Warning*`, RGB: `rgb(255, 255, 255)` },
|
|
67
|
+
{ Event: `*Flood*`, RGB: `rgb(0, 255, 128)` },
|
|
68
|
+
{ Event: `*Heat*`, RGB: `rgb(240, 197, 119)` },
|
|
69
|
+
{ Event: `Default`, RGB: `rgb(86, 125, 165)` },
|
|
70
|
+
];
|
|
@@ -11,21 +11,23 @@
|
|
|
11
11
|
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
12
|
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
13
|
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
-
Documentation:
|
|
14
|
+
Documentation: https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Independent Package: @atmosx/event-product-parser
|
|
17
17
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { TypeStanzaCompiled } from "
|
|
21
|
-
import { TypeVTEC } from "
|
|
22
|
-
import { EnumICAO } from "@
|
|
23
|
-
import { Bootstrap } from "@
|
|
24
|
-
import { GetEventTracking } from "@
|
|
25
|
-
import { VTECExtract } from "@
|
|
26
|
-
import { GetEventTags } from "@
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
20
|
+
import { TypeStanzaCompiled } from "Types/StanzaCompiled"
|
|
21
|
+
import { TypeVTEC } from "Types/VTEC"
|
|
22
|
+
import { EnumICAO } from "@Enums/ICAO"
|
|
23
|
+
import { Bootstrap } from "@Bootstrap"
|
|
24
|
+
import { GetEventTracking } from "@Building/GetEventTracking"
|
|
25
|
+
import { VTECExtract } from "@ParsingVTEC/VTECExtract"
|
|
26
|
+
import { GetEventTags } from "@Building/GetEventTags"
|
|
27
|
+
import { GetEventTheme } from "@Building/GetEventTheme"
|
|
28
|
+
import { GetEventDirection } from "@Building/GetEventDirection"
|
|
29
|
+
import { GetTextFromProduct } from "@ParsingText/GetTextFromProduct"
|
|
30
|
+
import { SetDebug } from "@Utilities/SetDebug"
|
|
29
31
|
|
|
30
32
|
export const ParseAPI = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
31
33
|
const messages = Object.values(JSON.parse(Stanza.Message).features) as any;
|
|
@@ -35,7 +37,7 @@ export const ParseAPI = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
35
37
|
Bootstrap.Cache.Parsed.push({
|
|
36
38
|
type: `Feature`,
|
|
37
39
|
geometry: {
|
|
38
|
-
type: `
|
|
40
|
+
type: `Polygon`,
|
|
39
41
|
coordinates: []
|
|
40
42
|
},
|
|
41
43
|
properties: {
|
|
@@ -46,13 +48,17 @@ export const ParseAPI = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
46
48
|
expires: feature?.properties?.expires ? new Date(feature?.properties?.expires).toISOString() : null,
|
|
47
49
|
locations: feature?.properties?.areaDesc ?? null,
|
|
48
50
|
locations_array: feature?.properties?.areaDesc ? feature?.properties?.areaDesc.split('; ') : [],
|
|
49
|
-
|
|
50
|
-
feature?.properties?.
|
|
51
|
-
?.map((location: string) => location.match(/,\s*([A-Z]{2})\b/)?.[1])
|
|
51
|
+
regions: [...new Set(
|
|
52
|
+
feature?.properties?.geocode?.UGC?.map((ugc: string) => ugc.match(/^([A-Z]{2})[CZ](\d{3})$/)?.[1])
|
|
52
53
|
.filter(Boolean) ?? []
|
|
53
|
-
)],
|
|
54
|
+
)] as string[],
|
|
55
|
+
regions_string: (() => {
|
|
56
|
+
const abbrs = [...new Set(feature?.properties?.geocode?.UGC?.map((l: string) => l.match(/^([A-Z]{2})[CZ](\d{3})$/)?.[1]).filter(Boolean) ?? [])];
|
|
57
|
+
return abbrs.length ? abbrs.join(`-`) : null;
|
|
58
|
+
})(),
|
|
54
59
|
description: feature?.properties?.description ?? null,
|
|
55
60
|
attributes: feature?.properties?.attributes ?? {},
|
|
61
|
+
theme: GetEventTheme(feature?.properties?.event),
|
|
56
62
|
geocode: {
|
|
57
63
|
office: {
|
|
58
64
|
office: VTEC ? VTEC?.[0]?.Tracking.split(`.`)[0] : null,
|
|
@@ -60,6 +66,10 @@ export const ParseAPI = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
60
66
|
},
|
|
61
67
|
organization: feature?.properties?.parameters?.WMOidentifier?.[0],
|
|
62
68
|
ugc: feature?.properties?.geocode?.UGC ?? [],
|
|
69
|
+
census: {
|
|
70
|
+
population: null,
|
|
71
|
+
cities: []
|
|
72
|
+
},
|
|
63
73
|
polygon: feature?.geometry?.coordinates.length > 0 ? Buffer.from(JSON.stringify([feature?.geometry?.coordinates[0]])).toString('base64') : null,
|
|
64
74
|
polygon_generated: feature?.geometry?.coordinates.length > 0 ? true : false,
|
|
65
75
|
},
|
|
@@ -71,9 +81,10 @@ export const ParseAPI = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
71
81
|
impacts: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`IMPACT...`], Removal: [`.`]}) ?? null,
|
|
72
82
|
estimated_hail_size: feature?.properties?.parameters?.maxHailSize?.[0] ?? null,
|
|
73
83
|
estimated_wind_gusts: feature?.properties?.parameters?.maxWindGust?.[0] ?? null,
|
|
84
|
+
direction: GetEventDirection(feature?.properties?.description) ?? null,
|
|
74
85
|
damage_threat: feature?.properties?.parameters?.thunderstormDamageThreat?.[0] ?? null,
|
|
75
86
|
tornado_threat: feature?.properties?.parameters?.tornadoDetection?.[0] ?? null,
|
|
76
|
-
flood_threat: feature?.properties?.parameters?.
|
|
87
|
+
flood_threat: feature?.properties?.parameters?.flashFloodDamageThreat?.[0] ?? null,
|
|
77
88
|
wind_threat: feature?.properties?.parameters?.windThreat?.[0] ?? null,
|
|
78
89
|
hail_threat: feature?.properties?.parameters?.hailThreat?.[0] ?? null,
|
|
79
90
|
},
|
|
@@ -11,20 +11,21 @@
|
|
|
11
11
|
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
12
|
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
13
|
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
-
Documentation:
|
|
14
|
+
Documentation: https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Independent Package: @atmosx/event-product-parser
|
|
17
17
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { TypeAttributes } from "
|
|
21
|
-
import { TypeStanzaCompiled } from "
|
|
22
|
-
import { EnumMatches } from "@
|
|
23
|
-
import { Bootstrap } from "@
|
|
24
|
-
import { GetEventProperties } from "@
|
|
25
|
-
import { GetEventHeader } from "@
|
|
26
|
-
import { GetEventTracking } from "@
|
|
27
|
-
import {
|
|
20
|
+
import { TypeAttributes } from "StaticTypes/Attributes"
|
|
21
|
+
import { TypeStanzaCompiled } from "Types/StanzaCompiled"
|
|
22
|
+
import { EnumMatches } from "@Enums/Matches"
|
|
23
|
+
import { Bootstrap } from "@Bootstrap"
|
|
24
|
+
import { GetEventProperties } from "@Building/GetEventProperties"
|
|
25
|
+
import { GetEventHeader } from "@Building/GetEventHeader"
|
|
26
|
+
import { GetEventTracking } from "@Building/GetEventTracking"
|
|
27
|
+
import { GetEventTheme } from "@Building/GetEventTheme"
|
|
28
|
+
import { SetDebug } from "@Utilities/SetDebug"
|
|
28
29
|
|
|
29
30
|
export const ParseText = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
30
31
|
const getMessages = Stanza?.Message
|
|
@@ -55,7 +56,7 @@ export const ParseText = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
55
56
|
Bootstrap.Cache.Parsed.push({
|
|
56
57
|
type: `Feature`,
|
|
57
58
|
geometry: {
|
|
58
|
-
type: `
|
|
59
|
+
type: `Polygon`,
|
|
59
60
|
coordinates: []
|
|
60
61
|
},
|
|
61
62
|
properties: {
|
|
@@ -64,6 +65,7 @@ export const ParseText = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
64
65
|
status: isStatement ? `Statement` : `Issued`,
|
|
65
66
|
issued: (!isNaN(issued.getTime())) ? issued.toISOString() : new Date().toISOString(),
|
|
66
67
|
expires: isStatement ? new Date(issued.getTime() + 120 * 1000).toISOString() : (!isNaN(expires.getTime())) ? expires.toISOString() : new Date(Date.now() + 60 * 60 * 1000).toISOString(),
|
|
68
|
+
theme: GetEventTheme(event),
|
|
67
69
|
...props,
|
|
68
70
|
metadata: {
|
|
69
71
|
ms: performance.now() - tick,
|
|
@@ -11,21 +11,22 @@
|
|
|
11
11
|
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
12
|
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
13
|
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
-
Documentation:
|
|
14
|
+
Documentation: https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Independent Package: @atmosx/event-product-parser
|
|
17
17
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { TypeAttributes } from "
|
|
21
|
-
import { TypeStanzaCompiled } from "
|
|
22
|
-
import { EnumMatches } from "@
|
|
23
|
-
import { Bootstrap } from "@
|
|
24
|
-
import {
|
|
25
|
-
import { GetEventProperties } from "@
|
|
26
|
-
import { GetEventHeader } from "@
|
|
27
|
-
import { GetEventTracking } from "@
|
|
28
|
-
import {
|
|
20
|
+
import { TypeAttributes } from "StaticTypes/Attributes"
|
|
21
|
+
import { TypeStanzaCompiled } from "Types/StanzaCompiled"
|
|
22
|
+
import { EnumMatches } from "@Enums/Matches"
|
|
23
|
+
import { Bootstrap } from "@Bootstrap"
|
|
24
|
+
import { UGCExtract } from "@ParsingUGC/UGCExtract"
|
|
25
|
+
import { GetEventProperties } from "@Building/GetEventProperties"
|
|
26
|
+
import { GetEventHeader } from "@Building/GetEventHeader"
|
|
27
|
+
import { GetEventTracking } from "@Building/GetEventTracking"
|
|
28
|
+
import { GetEventTheme } from "@Building/GetEventTheme"
|
|
29
|
+
import { SetDebug } from "@Utilities/SetDebug"
|
|
29
30
|
|
|
30
31
|
export const ParseUGC = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
31
32
|
const getMessages = Stanza?.Message
|
|
@@ -36,7 +37,7 @@ export const ParseUGC = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
36
37
|
for (const message of getMessages) {
|
|
37
38
|
const tick = performance.now();
|
|
38
39
|
const attributes = Stanza?.Attributes as TypeAttributes
|
|
39
|
-
const ugc = await
|
|
40
|
+
const ugc = await UGCExtract(message)
|
|
40
41
|
|
|
41
42
|
if (ugc != null ) {
|
|
42
43
|
const props = GetEventProperties({ Message: message, Attributes: attributes, UGC: ugc })
|
|
@@ -54,13 +55,12 @@ export const ParseUGC = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
54
55
|
event += ` (AWIPSID)`
|
|
55
56
|
}
|
|
56
57
|
isStatement = true;
|
|
57
|
-
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
Bootstrap.Cache.Parsed.push({
|
|
61
61
|
type: `Feature`,
|
|
62
62
|
geometry: {
|
|
63
|
-
type: `
|
|
63
|
+
type: `Polygon`,
|
|
64
64
|
coordinates: []
|
|
65
65
|
},
|
|
66
66
|
properties: {
|
|
@@ -69,6 +69,7 @@ export const ParseUGC = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
69
69
|
status: isStatement ? `Statement` : `Issued`,
|
|
70
70
|
issued: (!isNaN(issued.getTime())) ? issued.toISOString() : new Date().toISOString(),
|
|
71
71
|
expires: isStatement ? new Date(issued.getTime() + 120 * 1000).toISOString() : (!isNaN(expires.getTime())) ? expires.toISOString() : new Date(Date.now() + 60 * 60 * 1000).toISOString(),
|
|
72
|
+
theme: GetEventTheme(event),
|
|
72
73
|
...props,
|
|
73
74
|
metadata: {
|
|
74
75
|
ms: performance.now() - tick,
|
|
@@ -11,24 +11,25 @@
|
|
|
11
11
|
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
12
|
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
13
|
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
-
Documentation:
|
|
14
|
+
Documentation: https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Independent Package: @atmosx/event-product-parser
|
|
17
17
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { TypeAttributes } from "
|
|
21
|
-
import { TypeStanzaCompiled } from "
|
|
22
|
-
import { TypeVTEC } from "
|
|
23
|
-
import { TypeHVTEC } from "
|
|
24
|
-
import { Bootstrap } from "@
|
|
25
|
-
import { VTECExtract } from "@
|
|
26
|
-
import { HVExtract } from "@
|
|
27
|
-
import {
|
|
28
|
-
import { GetEventProperties } from "@
|
|
29
|
-
import { GetEventHeader } from "@
|
|
30
|
-
import { GetEventTracking } from "@
|
|
31
|
-
import {
|
|
20
|
+
import { TypeAttributes } from "StaticTypes/Attributes"
|
|
21
|
+
import { TypeStanzaCompiled } from "Types/StanzaCompiled"
|
|
22
|
+
import { TypeVTEC } from "Types/VTEC"
|
|
23
|
+
import { TypeHVTEC } from "Types/HVTEC"
|
|
24
|
+
import { Bootstrap } from "@Bootstrap"
|
|
25
|
+
import { VTECExtract } from "@ParsingVTEC/VTECExtract"
|
|
26
|
+
import { HVExtract } from "@ParsingHVTEC/HVExtract"
|
|
27
|
+
import { UGCExtract } from "@ParsingUGC/UGCExtract"
|
|
28
|
+
import { GetEventProperties } from "@Building/GetEventProperties"
|
|
29
|
+
import { GetEventHeader } from "@Building/GetEventHeader"
|
|
30
|
+
import { GetEventTracking } from "@Building/GetEventTracking"
|
|
31
|
+
import { GetEventTheme } from "@Building/GetEventTheme"
|
|
32
|
+
import { SetDebug } from "@Utilities/SetDebug"
|
|
32
33
|
|
|
33
34
|
export const ParseVTEC = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
34
35
|
const getMessages = Stanza?.Message
|
|
@@ -41,7 +42,7 @@ export const ParseVTEC = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
41
42
|
const attributes = Stanza?.Attributes as TypeAttributes
|
|
42
43
|
const VTEC = VTECExtract(message) as TypeVTEC[];
|
|
43
44
|
const hVTEC = HVExtract(message) as TypeHVTEC[];
|
|
44
|
-
const ugc = await
|
|
45
|
+
const ugc = await UGCExtract(message)
|
|
45
46
|
if (VTEC != null && ugc != null ) {
|
|
46
47
|
for (const vtec of VTEC) {
|
|
47
48
|
const props = GetEventProperties({ Message: message, Attributes: attributes, UGC: ugc, VTEC: vtec })
|
|
@@ -51,7 +52,7 @@ export const ParseVTEC = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
51
52
|
Bootstrap.Cache.Parsed.push({
|
|
52
53
|
type: `Feature`,
|
|
53
54
|
geometry: {
|
|
54
|
-
type: `
|
|
55
|
+
type: `Polygon`,
|
|
55
56
|
coordinates: []
|
|
56
57
|
},
|
|
57
58
|
properties: {
|
|
@@ -60,6 +61,7 @@ export const ParseVTEC = async (Stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
60
61
|
status: vtec.Status,
|
|
61
62
|
issued: (!isNaN(issued.getTime())) ? issued.toISOString() : new Date().toISOString(),
|
|
62
63
|
expires: (!isNaN(expires.getTime())) ? expires.toISOString() : ugc.Expires ?? new Date(issued.getTime() + 60 * 60 * 1000).toISOString(),
|
|
64
|
+
theme: GetEventTheme(vtec.Event),
|
|
63
65
|
...props,
|
|
64
66
|
metadata: {
|
|
65
67
|
ms: performance.now() - tick,
|
package/src/index.ts
CHANGED
|
@@ -11,67 +11,84 @@
|
|
|
11
11
|
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
|
|
12
12
|
Discord: https://atmosphericx-discord.scriptkitty.cafe
|
|
13
13
|
Ko-Fi: https://ko-fi.com/k3yomi
|
|
14
|
-
Documentation:
|
|
14
|
+
Documentation: https://atmosphericx.scriptkitty.cafe/documentation
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
Independent Package: @atmosx/event-product-parser
|
|
17
17
|
|
|
18
18
|
*/
|
|
19
19
|
|
|
20
|
-
import { TypeSettings } from "
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
20
|
+
import { TypeSettings } from "Types/Settings"
|
|
21
|
+
import { Bootstrap } from "@Bootstrap"
|
|
22
|
+
import { GetEventGeometry } from "@Building/GetEventGeometry"
|
|
23
|
+
import { GetCleanedEvent } from "@Building/GetCleanedEvent"
|
|
24
|
+
import { SetSettings } from "@Utilities/SetSettings"
|
|
25
|
+
import { SetEventEmit } from "@Utilities/SetEventEmit"
|
|
26
|
+
import { SetWarning } from "@Utilities/SetWarning"
|
|
27
|
+
import { GenerateAudioMessage } from "@Audio/GenerateAudioMessage"
|
|
28
|
+
import { GenerateGraphic } from "@Image/GenerateGraphic"
|
|
29
|
+
import { SetNode } from "@Core/SetNode"
|
|
30
|
+
import { GetEvents } from "@Core/GetEvents"
|
|
31
|
+
import { GetNodes } from "@Core/GetNodes"
|
|
32
|
+
import { ManualEvent } from "@Core/ManualEvent"
|
|
33
|
+
import { GetRandomEvent } from "@Core/GetRandomEvent"
|
|
34
|
+
import { QueryStanza } from "@Core/QueryStanza"
|
|
35
|
+
import { ClearEvents } from "@Core/ClearEvents"
|
|
36
|
+
import { StartService } from "@Core/StartService"
|
|
37
|
+
import { StopService } from "@Core/StopService"
|
|
38
|
+
import { GetVersion } from "@Core/GetVersion"
|
|
39
|
+
|
|
38
40
|
|
|
39
41
|
export class Manager {
|
|
40
42
|
public constructor(settings: TypeSettings) {
|
|
41
|
-
this.
|
|
43
|
+
this.ErrorHandler(); StartService(settings)
|
|
42
44
|
}
|
|
43
45
|
|
|
44
|
-
on(event: string, callback: () => void) {
|
|
45
|
-
|
|
46
|
+
public on(event: string, callback: () => void) {
|
|
47
|
+
Bootstrap.Listener.on(event, callback)
|
|
48
|
+
return () => { void Bootstrap.Listener.off(event, callback) };
|
|
46
49
|
}
|
|
47
50
|
|
|
48
|
-
|
|
49
|
-
process.on('uncaughtException', (
|
|
50
|
-
const
|
|
51
|
-
|
|
51
|
+
private ErrorHandler() {
|
|
52
|
+
process.on('uncaughtException', (error: any) => {
|
|
53
|
+
const _IGNORED = [
|
|
54
|
+
'ETIMEDOUT',
|
|
55
|
+
'ECONNRESET',
|
|
56
|
+
'EHOSTUNREACH',
|
|
57
|
+
'ENOTFOUND',
|
|
58
|
+
'ECONNREFUSED',
|
|
59
|
+
'EPIPE',
|
|
60
|
+
'EADDRINUSE',
|
|
61
|
+
'EALREADY',
|
|
62
|
+
'EACCES',
|
|
63
|
+
'EAGAIN',
|
|
64
|
+
'EHOSTDOWN',
|
|
65
|
+
'STARTTLS_FAILURE'
|
|
66
|
+
];
|
|
67
|
+
if (_IGNORED.includes(error?.code)) {
|
|
52
68
|
SetEventEmit({
|
|
53
69
|
Event: `onServiceStatus`,
|
|
54
70
|
Metadata: {
|
|
55
|
-
Message: `Ignored Critical Error: ${
|
|
71
|
+
Message: `Ignored Critical Error: ${error?.code ?? 'Unknown error code'}. This may indicate a connection issue. Attempting to continue...`,
|
|
56
72
|
Data: {},
|
|
57
73
|
Type: `error`,
|
|
58
74
|
Error: true
|
|
59
75
|
}
|
|
60
76
|
})
|
|
61
|
-
return;
|
|
62
77
|
}
|
|
63
|
-
|
|
78
|
+
console.log(`Uncaught Exception: ${error instanceof Error ? error.stack ?? error.message : String(error)}`);
|
|
79
|
+
SetWarning({Message: `Uncaught Exception: ${error instanceof Error ? error.stack ?? error.message : String(error)}`})
|
|
64
80
|
})
|
|
65
81
|
}
|
|
66
82
|
}
|
|
67
83
|
|
|
68
84
|
export default Manager;
|
|
69
|
-
export type { TypeEvent } from "
|
|
85
|
+
export type { TypeEvent } from "StaticTypes/Event"
|
|
70
86
|
export {
|
|
71
87
|
SetSettings, GetEventGeometry, ManualEvent,
|
|
72
88
|
GetCleanedEvent, StopService, ClearEvents,
|
|
73
89
|
StartService, SetNode, GetRandomEvent, GetVersion,
|
|
74
|
-
GetEvents, GetNodes,
|
|
90
|
+
GetEvents, GetNodes, GenerateAudioMessage, GenerateGraphic,
|
|
91
|
+
QueryStanza
|
|
75
92
|
}
|
|
76
93
|
|
|
77
94
|
|