@atmosx/event-product-parser 3.0.6 → 3.0.7
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 +2 -2
- package/.github/docs/docs-general-configurations.md +2 -12
- package/.github/docs/docs-integrations.md +4 -3
- package/.github/docs/docs-listeners.md +1 -1
- package/.github/docs/docs-source-configuration.md +1 -1
- package/.github/docs/docs-technical.md +1 -1
- package/{.github/README.md → README.md} +15 -9
- package/dist/cjs/index.cjs +24073 -7018
- package/dist/esm/index.mjs +24035 -6983
- package/package.json +56 -47
- package/pnpm-workspace.yaml +4 -0
- package/src/bootstrap.ts +64 -48
- package/src/{@building → building}/CreateEvent.ts +22 -24
- package/src/{@building → building}/GetCleanedEvent.ts +2 -2
- package/src/{@building → building}/GetEventAttachments.ts +14 -12
- package/src/building/GetEventDirection.ts +28 -0
- package/src/{@building → building}/GetEventEnhancedName.ts +5 -8
- package/src/{@building → building}/GetEventGeometry.ts +19 -13
- package/src/{@building → building}/GetEventHeader.ts +13 -13
- package/src/{@building → building}/GetEventNodes.ts +21 -19
- package/src/{@building → building}/GetEventOffice.ts +13 -13
- package/src/building/GetEventProperties.ts +105 -0
- package/src/{@building → building}/GetEventSignature.ts +9 -9
- package/src/{@building → building}/GetEventTags.ts +3 -3
- package/src/building/GetEventTheme.ts +26 -0
- package/src/building/GetEventTracking.ts +64 -0
- package/src/components/audio/GenerateAudioMessage.ts +149 -0
- 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 +13 -8
- package/src/{@modules/@eas → components/audio/components}/GetPCMToFloat.ts +2 -2
- package/src/{@modules/@eas → components/audio/components}/GetSampledPCM16.ts +14 -8
- package/src/{@modules/@eas → components/audio/components}/GetTTS.ts +17 -10
- package/src/{@modules/@eas → components/audio/components}/GetWavPCM16.ts +7 -7
- package/src/{@modules/@eas → components/audio/components}/SetAFSK.ts +13 -8
- package/src/{@modules/@eas → components/audio/components}/SetAsciiToBits.ts +2 -2
- package/src/{@modules/@eas → components/audio/components}/SetAttentionTone.ts +11 -6
- package/src/{@modules/@eas → components/audio/components}/SetNoise.ts +12 -7
- package/src/{@modules/@eas → components/audio/components}/SetRadioEffect.ts +12 -7
- package/src/{@modules/@eas → components/audio/components}/SetSameHeader.ts +22 -14
- package/src/{@modules/@utilities/SetWarning.ts → components/database/CreateQuery.ts} +18 -13
- package/src/{@modules/@database → components/database}/GetCachedEvents.ts +18 -15
- package/src/components/database/ImportBoundaries.ts +168 -0
- package/src/{@modules/@database → components/database}/ImportBroadcastify.ts +14 -24
- package/src/components/database/ImportCities.ts +87 -0
- package/src/{@modules/@database → components/database}/ImportShapefiles.ts +23 -26
- package/src/{@modules/@database → components/database}/ImportStanza.ts +15 -19
- package/src/components/database/InitializeDatabase.ts +71 -0
- package/src/components/images/GenerateGraphic.ts +234 -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 +16 -17
- package/src/{@modules/@stanza → components/stanza}/ValidateStanza.ts +27 -15
- package/src/{@modules/@utilities → components/utilities}/CreateHttp.ts +26 -26
- 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 +10 -5
- package/src/{@modules/@utilities → components/utilities}/GetShapeNearestPoint.ts +24 -19
- package/src/components/utilities/GetUnionPolygon.ts +36 -0
- package/src/components/utilities/QueueManager.ts +70 -0
- package/src/{@modules/@utilities → components/utilities}/SetCronSchedule.ts +29 -25
- package/src/{@modules/@utilities → components/utilities}/SetDebug.ts +12 -12
- package/src/components/utilities/SetEventEmit.ts +42 -0
- package/src/{@modules/@utilities → components/utilities}/SetSettings.ts +7 -7
- package/src/{@modules/@utilities → components/utilities}/SetSleep.ts +5 -5
- package/src/components/utilities/SetTimeoutAction.ts +64 -0
- package/src/components/utilities/SetWarning.ts +47 -0
- package/src/{@modules/@xmpp → components/xmpp}/DeployXMPP.ts +20 -20
- package/src/{@core/CreateListener.ts → components/xmpp/ErrorXMPP.ts} +8 -5
- package/src/{@modules/@xmpp → components/xmpp}/OfflineXMPP.ts +13 -13
- package/src/{@modules/@xmpp → components/xmpp}/OnlineXMPP.ts +18 -18
- package/src/components/xmpp/ReconnectXMPP.ts +64 -0
- package/src/{@modules/@xmpp → components/xmpp}/StanzaXMPP.ts +25 -25
- package/src/{@core → core}/ClearEvents.ts +9 -9
- package/src/{@core → core}/GetEvents.ts +4 -4
- package/src/{@core → core}/GetNodes.ts +4 -4
- package/src/{@core → core}/GetRandomEvent.ts +4 -4
- package/src/{@core → core}/GetVersion.ts +4 -4
- package/src/{@core → core}/ManualEvent.ts +23 -24
- package/src/{@core → core}/QueryStanza.ts +12 -11
- package/src/core/SetNode.ts +87 -0
- package/src/{@core → core}/StartService.ts +21 -20
- package/src/{@core → core}/StopService.ts +10 -10
- 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 +2 -2
- package/src/{@enums → enums}/Events.ts +2 -2
- package/src/{@enums → enums}/Expressions.ts +3 -3
- 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 +9 -4
- package/src/{@enums → enums}/Testing.ts +2 -2
- package/src/enums/Themes.ts +70 -0
- package/src/events/ParseAPI.ts +129 -0
- package/src/{@events → events}/ParseText.ts +24 -22
- package/src/{@events → events}/ParseUGC.ts +27 -26
- package/src/{@events → events}/ParseVTEC.ts +38 -37
- package/src/index.ts +57 -37
- package/src/manager/MakeEvents.ts +110 -0
- package/src/manager/RemoveEvent.ts +74 -0
- package/src/{@manager → manager}/SetHash.ts +18 -13
- package/src/{@manager → manager}/UpdateEvents.ts +12 -12
- package/src/{@manager → manager}/UpdateNode.ts +14 -14
- package/src/{@building → manager}/ValidateEvents.ts +47 -57
- package/src/{@parsers/@hvtec → parsers/hvtec}/HVExtract.ts +11 -11
- package/src/{@parsers/@text → parsers/text}/GetDescriptionFromProduct.ts +20 -21
- package/src/{@parsers/@text → parsers/text}/GetEmbededText.ts +7 -6
- package/src/parsers/text/GetPolygonFromProduct.ts +71 -0
- package/src/{@parsers/@text → parsers/text}/GetStringText.ts +9 -9
- package/src/{@parsers/@text → parsers/text}/GetTextFromProduct.ts +12 -12
- package/src/parsers/ugc/GetCache.ts +24 -0
- package/src/{@parsers/@ugc → parsers/ugc}/GetExpiry.ts +2 -2
- package/src/{@parsers/@ugc/GetUGCHeader.ts → parsers/ugc/GetHeader.ts} +4 -4
- package/src/{@parsers/@ugc → parsers/ugc}/GetLocations.ts +10 -10
- package/src/parsers/ugc/GetZonePolygon.ts +73 -0
- package/src/{@parsers/@ugc → parsers/ugc}/GetZones.ts +3 -3
- package/src/{@parsers/@ugc → parsers/ugc}/SetCache.ts +13 -8
- package/src/{@parsers/@ugc → parsers/ugc}/UGCExtract.ts +14 -14
- package/src/{@parsers/@pvtec → parsers/vtec}/GetExpiry.ts +2 -2
- package/src/parsers/vtec/VTECExtract.ts +49 -0
- package/src/{@types → static}/Attributes.ts +2 -3
- package/src/{@types → static}/Event.ts +8 -7
- package/src/{@types → static}/Properties.ts +7 -3
- package/src/{@types → static}/Stanza.ts +2 -2
- package/src/tasks/CreateTasks.ts +123 -0
- package/src/tasks/TaskGenerateJSON.ts +34 -0
- package/src/tasks/TaskGenerateText.ts +34 -0
- package/src/tasks/TaskSendNTFY.ts +97 -0
- package/src/tasks/TaskSendWebhook.ts +107 -0
- package/src/{@types → types}/Actions.ts +3 -3
- package/src/{@types → types}/HVTEC.ts +6 -6
- package/src/{@types → types}/Hash.ts +5 -5
- package/src/types/Nodes.ts +29 -0
- package/src/{@types → types}/Settings.ts +16 -8
- package/src/{@types → types}/StanzaCompiled.ts +15 -15
- package/src/{@types → types}/UGC.ts +5 -5
- package/src/{@modules/@utilities/GetSettings.ts → types/VTEC.ts} +12 -7
- package/tools/build.js +47 -0
- package/tsconfig.json +28 -1
- package/src/@building/GetEventProperties.ts +0 -96
- package/src/@building/GetEventTracking.ts +0 -68
- package/src/@core/SetNode.ts +0 -81
- package/src/@events/ParseAPI.ts +0 -117
- package/src/@manager/CreateActions.ts +0 -213
- package/src/@manager/MakeEvent.ts +0 -99
- package/src/@manager/RemoveEvent.ts +0 -70
- package/src/@modules/@database/InitializeDatabase.ts +0 -59
- package/src/@modules/@eas/GenerateEASMessage.ts +0 -144
- package/src/@modules/@utilities/SetEventEmit.ts +0 -41
- package/src/@modules/@utilities/SetListener.ts +0 -30
- package/src/@modules/@utilities/SetTimeoutAction.ts +0 -64
- package/src/@modules/@xmpp/ErrorXMPP.ts +0 -27
- package/src/@modules/@xmpp/ReconnectXMPP.ts +0 -64
- package/src/@parsers/@pvtec/VTECExtract.ts +0 -49
- package/src/@parsers/@text/GetPolygonFromProduct.ts +0 -53
- package/src/@parsers/@text/GetXML.ts +0 -61
- package/src/@parsers/@ugc/GetCache.ts +0 -24
- package/src/@parsers/@ugc/GetZonePolygon.ts +0 -111
- package/src/@types/VTEC.ts +0 -30
- package/tsup.config.ts +0 -16
|
@@ -11,33 +11,34 @@
|
|
|
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 { SetWarning } from "
|
|
23
|
-
import { SetSettings } from "
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { UpdateNode } from "
|
|
29
|
-
import { UpdateEvents } from "
|
|
30
|
-
import { Cron } from "croner"
|
|
20
|
+
import { TypeSettings } from "Types/Settings"
|
|
21
|
+
import { Bootstrap } from "@Bootstrap"
|
|
22
|
+
import { SetWarning } from "@Utilities/SetWarning"
|
|
23
|
+
import { SetSettings } from "@Utilities/SetSettings"
|
|
24
|
+
import { SetCronSchedule } from "@Utilities/SetCronSchedule"
|
|
25
|
+
import { DeployXMPP } from "@XMPP/DeployXMPP"
|
|
26
|
+
import { InitializeDatabase } from "@Database/InitializeDatabase"
|
|
27
|
+
import { GetCachedEvents } from "@Database/GetCachedEvents"
|
|
28
|
+
import { UpdateNode } from "@Manager/UpdateNode"
|
|
29
|
+
import { UpdateEvents } from "@Manager/UpdateEvents"
|
|
30
|
+
import { Cron } from "croner"
|
|
31
31
|
|
|
32
32
|
export const StartService = async (configurations: TypeSettings): Promise<void> => {
|
|
33
|
-
if (!
|
|
33
|
+
if (!Bootstrap.Ready) {
|
|
34
34
|
return SetWarning({
|
|
35
|
-
|
|
35
|
+
Message: `You can not create another instance without shutting down the current one first, please make sure to call the stop() method first!`
|
|
36
36
|
})
|
|
37
37
|
}
|
|
38
38
|
const settings = SetSettings(configurations);
|
|
39
|
-
|
|
39
|
+
Bootstrap.Ready = true;
|
|
40
40
|
await InitializeDatabase();
|
|
41
|
+
if (settings.DebugDisableAllEvents) { return SetWarning({ Message: `DebugDisableAllEvents is enabled, no events will be processed!` }) }
|
|
41
42
|
if (settings.EnableWireService) {
|
|
42
43
|
(async () => {
|
|
43
44
|
await GetCachedEvents();
|
|
@@ -47,14 +48,14 @@ export const StartService = async (configurations: TypeSettings): Promise<void>
|
|
|
47
48
|
await SetCronSchedule()
|
|
48
49
|
let scheduleInterval = !settings.EnableWireService ? settings.NationalWeatherServiceSettings.CallbackInterval : 1;
|
|
49
50
|
if (!settings.EnableWireService && scheduleInterval < 15) {
|
|
50
|
-
SetWarning({
|
|
51
|
-
|
|
51
|
+
SetWarning({ Message: `Schedule interval of ${scheduleInterval} seconds is too low, setting to 15 seconds` })
|
|
52
|
+
Bootstrap.Settings.NationalWeatherServiceSettings.CallbackInterval = 15;
|
|
52
53
|
scheduleInterval = 15;
|
|
53
54
|
}
|
|
54
|
-
|
|
55
|
+
Bootstrap.Job = new Cron(`*/${scheduleInterval} * * * * *`, async () => {
|
|
55
56
|
await SetCronSchedule();
|
|
56
57
|
})
|
|
57
|
-
|
|
58
|
+
Bootstrap.Job = new Cron(`* * * * * *`, async () => {
|
|
58
59
|
await UpdateNode();
|
|
59
60
|
await UpdateEvents();
|
|
60
61
|
})
|
|
@@ -11,22 +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 {
|
|
20
|
+
import { Bootstrap } from "@Bootstrap"
|
|
21
21
|
|
|
22
22
|
export const StopService = async (): Promise<void> => {
|
|
23
|
-
if (
|
|
24
|
-
|
|
25
|
-
if (
|
|
26
|
-
try { await
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
23
|
+
if (Bootstrap.Ready) {
|
|
24
|
+
Bootstrap.Ready = false;
|
|
25
|
+
if (Bootstrap.Session) {
|
|
26
|
+
try { await Bootstrap.Session.stop(); } catch {}
|
|
27
|
+
Bootstrap.Cache.Connected = false;
|
|
28
|
+
Bootstrap.Cache.Hault = true;
|
|
29
|
+
Bootstrap.Session = null;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
}
|
|
@@ -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,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,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,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,15 +11,15 @@
|
|
|
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
|
export const EnumExpressions: { [key: string]: RegExp } = {
|
|
21
21
|
location: new RegExp(/^([A-Za-z.\-' ]+),\s*([A-Z]{2})$/),
|
|
22
|
-
|
|
22
|
+
vtec: new RegExp(`[OTEX].(NEW|CON|EXT|EXA|EXB|UPG|CAN|EXP|COR|ROU).[A-Z]{4}.[A-Z]{2}.[WAYSFON].[0-9]{4}.[0-9]{6}T[0-9]{4}Z-[0-9]{6}T[0-9]{4}Z`, "g"),
|
|
23
23
|
hvtec: new RegExp(`[a-zA-Z0-9]{4}.[A-Z0-9].[A-Z]{2}.[0-9]{6}T[0-9]{4}Z.[0-9]{6}T[0-9]{4}Z.[0-9]{6}T[0-9]{4}Z.[A-Z]{2}`, "imu"),
|
|
24
24
|
wmo: new RegExp(`[A-Z0-9]{6}\\s[A-Z]{4}\\s\\d{6}`, "imu"),
|
|
25
25
|
ugc1: new RegExp(`(\\w{2}[CZ](\\d{3}((-|>)\\s?(\\n\\n)?))+)`, "imu"),
|
|
@@ -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,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,14 +11,19 @@
|
|
|
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
|
+
type EnumMatchesType = {
|
|
21
|
+
match: RegExp;
|
|
22
|
+
label: string;
|
|
23
|
+
statement: boolean;
|
|
24
|
+
};
|
|
20
25
|
|
|
21
|
-
export const EnumMatches = {
|
|
26
|
+
export const EnumMatches: Record<string, EnumMatchesType[]> = {
|
|
22
27
|
SPS: [
|
|
23
28
|
{ match: /STRONG THUNDERSTORM/i, label: "Convective Special Weather Statement", statement: false },
|
|
24
29
|
{ match: /SPECIAL WEATHER STATEMENT/i, label: "Special Weather Statement", statement: false }
|
|
@@ -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,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,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" },
|
|
@@ -148,7 +153,7 @@ export const EnumTags = {
|
|
|
148
153
|
{ match: /Source\.\.\.Doppler Radar/i, tag: "Confirmed By Radar" },
|
|
149
154
|
{ match: /Source\.\.\.Automated Gauges/i, tag: "Confirmed By Automated Gauges" },
|
|
150
155
|
{ match: /Source\.\.\.Radar Confirmed/i, tag: "Confirmed By Radar" },
|
|
151
|
-
{ match: /Source\.\.\.Radar Indicated/i, tag: "Indicated
|
|
156
|
+
{ match: /Source\.\.\.Radar Indicated/i, tag: "Radar Indicated" },
|
|
152
157
|
{ match: /Source\.\.\.Public/i, tag: "Confirmed By Public" },
|
|
153
158
|
{ match: /Source\.\.\.Amateur Radio/i, tag: "Confirmed By Amateur Radio" },
|
|
154
159
|
{ match: /Source\.\.\.Emergency Management/i, tag: "Confirmed By Emergency Management" },
|
|
@@ -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
|
+
];
|