@atmosx/event-product-parser 3.0.62 → 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 +10 -8
- package/dist/cjs/index.cjs +24482 -7207
- package/dist/esm/index.mjs +24275 -7003
- package/package.json +56 -47
- package/pnpm-workspace.yaml +4 -0
- package/src/bootstrap.ts +65 -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 +22 -20
- package/src/{@building → building}/GetEventOffice.ts +13 -13
- package/src/building/GetEventPopulation.ts +58 -0
- package/src/building/GetEventProperties.ts +106 -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 +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 +16 -17
- package/src/{@modules/@stanza → components/stanza}/ValidateStanza.ts +27 -15
- package/src/{@modules/@utilities → components/utilities}/CreateHttp.ts +26 -26
- package/src/{@parsers/@text → components/utilities}/GetEmbededText.ts +8 -6
- 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/{@parsers/@text → components/utilities}/GetStringText.ts +9 -9
- package/src/components/utilities/GetUnionPolygon.ts +36 -0
- package/src/components/utilities/QueueManager.ts +70 -0
- package/src/components/utilities/SetCronSchedule.ts +106 -0
- 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 +4 -3
- 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 +133 -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 → manager}/MakeEvents.ts +38 -47
- 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/{@manager → manager}/ValidateEvents.ts +55 -45
- package/src/{@parsers/@hvtec → parsers/hvtec}/HVExtract.ts +11 -11
- package/src/{@parsers/@text → parsers/text}/GetDescriptionFromProduct.ts +20 -21
- package/src/parsers/text/GetPolygonFromProduct.ts +71 -0
- 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 +17 -3
- package/src/{@types → static}/Stanza.ts +2 -2
- package/src/tasks/CreateTasks.ts +116 -0
- package/src/tasks/TaskGenerateJSON.ts +34 -0
- package/src/tasks/TaskGenerateText.ts +34 -0
- package/src/tasks/TaskSendNTFY.ts +95 -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 +17 -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/RemoveEvent.ts +0 -70
- package/src/@manager/Tasks.ts +0 -246
- package/src/@modules/@database/InitializeDatabase.ts +0 -59
- package/src/@modules/@eas/GenerateEASMessage.ts +0 -144
- package/src/@modules/@utilities/SetCronSchedule.ts +0 -94
- 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
|
@@ -0,0 +1,87 @@
|
|
|
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
|
+
import { Bootstrap } from "@Bootstrap"
|
|
21
|
+
import { SetWarning } from "@Utilities/SetWarning"
|
|
22
|
+
import { SetEventEmit } from "@Utilities/SetEventEmit"
|
|
23
|
+
|
|
24
|
+
interface GetNodeOptions {
|
|
25
|
+
Identifier: string
|
|
26
|
+
Delete?: boolean
|
|
27
|
+
Coordinates: { Longitude: number; Latitude: number }
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const SetNode = ({ Identifier, Delete, Coordinates }: GetNodeOptions) => {
|
|
31
|
+
const nodes = Bootstrap.Cache.Nodes.features;
|
|
32
|
+
const exists = nodes.find((node) => node.properties.identifier === Identifier);
|
|
33
|
+
if (Delete) {
|
|
34
|
+
if (exists) {
|
|
35
|
+
const index = nodes.indexOf(exists);
|
|
36
|
+
nodes.splice(index, 1);
|
|
37
|
+
SetWarning({ Message: `Node with identifier '${Identifier}' deleted.` })
|
|
38
|
+
return SetEventEmit({
|
|
39
|
+
Event: `onNodeDelete`,
|
|
40
|
+
Metadata: {
|
|
41
|
+
Type: `node-delete`,
|
|
42
|
+
Node: exists
|
|
43
|
+
}
|
|
44
|
+
})
|
|
45
|
+
}
|
|
46
|
+
return SetWarning({ Message: `Node with identifier '${Identifier}' not found.` })
|
|
47
|
+
}
|
|
48
|
+
if (exists) {
|
|
49
|
+
const index = nodes.indexOf(exists);
|
|
50
|
+
if (exists.geometry.coordinates[0] === Coordinates.Longitude && exists.geometry.coordinates[1] === Coordinates.Latitude) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
nodes[index] = {
|
|
54
|
+
...exists,
|
|
55
|
+
geometry: {
|
|
56
|
+
type: "Point",
|
|
57
|
+
coordinates: [Coordinates.Longitude, Coordinates.Latitude]
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
SetWarning({ Message: `Node with identifier '${Identifier}' updated.` })
|
|
61
|
+
return SetEventEmit({
|
|
62
|
+
Event: `onNodeUpdate`,
|
|
63
|
+
Metadata: {
|
|
64
|
+
Type: `node-update`,
|
|
65
|
+
Node: nodes[index]
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
nodes.push({
|
|
70
|
+
type: "Feature",
|
|
71
|
+
geometry: {
|
|
72
|
+
type: "Point",
|
|
73
|
+
coordinates: [Coordinates.Longitude, Coordinates.Latitude]
|
|
74
|
+
},
|
|
75
|
+
properties: {
|
|
76
|
+
identifier: Identifier
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
SetWarning({ Message: `Node with identifier '${Identifier}' added.` })
|
|
80
|
+
return SetEventEmit({
|
|
81
|
+
Event: `onNodeAdd`,
|
|
82
|
+
Metadata: {
|
|
83
|
+
Type: `node-add`,
|
|
84
|
+
Node: nodes[nodes.length - 1]
|
|
85
|
+
}
|
|
86
|
+
})
|
|
87
|
+
}
|
|
@@ -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
|
|
|
@@ -43,7 +43,8 @@ export const EnumEnhanced: Record<string, Record<string, EnhancedEventType>> = {
|
|
|
43
43
|
"PDS Ice Storm Warning": { description: "particularly dangerous situation" },
|
|
44
44
|
},
|
|
45
45
|
"Special Marine Warning": {
|
|
46
|
-
"Special Marine Warning (
|
|
46
|
+
"Special Marine Warning (WPROB)": { tornado: `POSSIBLE` },
|
|
47
|
+
"Special Marine Warning (WCONF)": { tornado: `OBSERVED` },
|
|
47
48
|
},
|
|
48
49
|
"Tornado Watch": {
|
|
49
50
|
"PDS Tornado Watch": { pdswatch: true }
|
|
@@ -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
|
|