@atmosx/event-product-parser 3.0.4 → 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.
Files changed (212) hide show
  1. package/{CONTRIBUTING.md → .github/CONTRIBUTING.md} +1 -1
  2. package/.github/SUPPORTED_EVENTS.md +370 -0
  3. package/.github/docs/docs-functions.md +30 -0
  4. package/.github/docs/docs-general-configurations.md +199 -0
  5. package/.github/docs/docs-integrations.md +38 -0
  6. package/.github/docs/docs-listeners.md +28 -0
  7. package/.github/docs/docs-source-configuration.md +218 -0
  8. package/.github/docs/docs-technical.md +50 -0
  9. package/.github/logo.png +0 -0
  10. package/.github/samples/SAMPLE_EAS_GENERATION.wav +0 -0
  11. package/.github/samples/SAMPLE_GEOJSON.json +204 -0
  12. package/.github/samples/SAMPLE_TEXT_PRODUCT.txt +119 -0
  13. package/README.md +157 -337
  14. package/dist/cjs/index.cjs +24125 -15815
  15. package/dist/esm/index.mjs +24144 -15839
  16. package/package.json +56 -53
  17. package/pnpm-workspace.yaml +4 -0
  18. package/src/bootstrap.ts +83 -43
  19. package/src/building/CreateEvent.ts +54 -0
  20. package/src/{@building/building.clean.ts → building/GetCleanedEvent.ts} +4 -4
  21. package/src/building/GetEventAttachments.ts +88 -0
  22. package/src/building/GetEventDirection.ts +28 -0
  23. package/src/{@building/building.enhance.ts → building/GetEventEnhancedName.ts} +13 -17
  24. package/src/{@building/building.geometry.ts → building/GetEventGeometry.ts} +19 -13
  25. package/src/{@building/building.headers.ts → building/GetEventHeader.ts} +13 -13
  26. package/src/{@building/building.polygon.ts → building/GetEventNodes.ts} +26 -22
  27. package/src/{@building/building.office.ts → building/GetEventOffice.ts} +14 -14
  28. package/src/building/GetEventProperties.ts +105 -0
  29. package/src/{@building/building.signature.ts → building/GetEventSignature.ts} +16 -17
  30. package/src/{@core/core.createListener.ts → building/GetEventTags.ts} +11 -6
  31. package/src/building/GetEventTheme.ts +26 -0
  32. package/src/building/GetEventTracking.ts +64 -0
  33. package/src/components/audio/GenerateAudioMessage.ts +149 -0
  34. package/src/components/audio/components/GetCleanDescription.ts +91 -0
  35. package/src/{@modules/@eas/eas.getFloatPCM16.ts → components/audio/components/GetFloatPCM16.ts} +3 -3
  36. package/src/{@modules/@eas/eas.getMergedPCM16.ts → components/audio/components/GetMergedPCM16.ts} +3 -3
  37. package/src/{@modules/@eas/eas.getPCM16.ts → components/audio/components/GetPCM16.ts} +13 -8
  38. package/src/{@modules/@eas/eas.getPCMToFloat.ts → components/audio/components/GetPCMToFloat.ts} +3 -3
  39. package/src/{@modules/@eas/eas.getSampledPCM16.ts → components/audio/components/GetSampledPCM16.ts} +14 -8
  40. package/src/components/audio/components/GetTTS.ts +61 -0
  41. package/src/{@modules/@eas/eas.getWavPCM16.ts → components/audio/components/GetWavPCM16.ts} +8 -8
  42. package/src/{@modules/@eas/eas.setAFSK.ts → components/audio/components/SetAFSK.ts} +12 -8
  43. package/src/{@modules/@eas/eas.setAsciiToBits.ts → components/audio/components/SetAsciiToBits.ts} +3 -4
  44. package/src/{@modules/@eas/eas.setAttentionTone.ts → components/audio/components/SetAttentionTone.ts} +11 -6
  45. package/src/{@modules/@eas/eas.setNoise.ts → components/audio/components/SetNoise.ts} +14 -8
  46. package/src/{@modules/@eas/eas.setRadioEffect.ts → components/audio/components/SetRadioEffect.ts} +14 -8
  47. package/src/{@modules/@eas/eas.setSameHeader.ts → components/audio/components/SetSameHeader.ts} +22 -15
  48. package/src/{@modules/@utilities/utilities.setWarning.ts → components/database/CreateQuery.ts} +18 -13
  49. package/src/{@modules/@database/database.cache.ts → components/database/GetCachedEvents.ts} +19 -14
  50. package/src/components/database/ImportBoundaries.ts +168 -0
  51. package/src/components/database/ImportBroadcastify.ts +60 -0
  52. package/src/components/database/ImportCities.ts +87 -0
  53. package/src/{@modules/@database/database.shapefiles.ts → components/database/ImportShapefiles.ts} +31 -37
  54. package/src/components/database/ImportStanza.ts +43 -0
  55. package/src/components/database/InitializeDatabase.ts +71 -0
  56. package/src/components/images/GenerateGraphic.ts +234 -0
  57. package/src/components/images/components/CreateRectangle.ts +22 -0
  58. package/src/components/images/components/CreateText.ts +22 -0
  59. package/src/components/images/modules/CreateSVG.ts +37 -0
  60. package/src/components/images/modules/GetGeographicalBoundaries.ts +72 -0
  61. package/src/components/images/modules/GetGeographicalCities.ts +58 -0
  62. package/src/components/images/modules/GetGeographicalEvents.ts +48 -0
  63. package/src/components/images/modules/GetGeometryBounds.ts +82 -0
  64. package/src/components/images/modules/GetParsedBoundary.ts +58 -0
  65. package/src/components/images/modules/GetSVGPath.ts +53 -0
  66. package/src/components/images/modules/NormalizePolygon.ts +57 -0
  67. package/src/{@modules/@stanza/stanza.getAwipsType.ts → components/stanza/GetAwipsType.ts} +19 -18
  68. package/src/components/stanza/ValidateStanza.ts +62 -0
  69. package/src/components/utilities/CreateHttp.ts +83 -0
  70. package/src/{@modules/@utilities/utilities.getFormattedTime.ts → components/utilities/GetFormattedTime.ts} +3 -3
  71. package/src/components/utilities/GetLatestIssuance.ts +32 -0
  72. package/src/components/utilities/GetMatched.ts +38 -0
  73. package/src/{@modules/@utilities/utilities.getShapeNearestPoint.ts → components/utilities/GetShapeNearestPoint.ts} +24 -19
  74. package/src/components/utilities/GetUnionPolygon.ts +36 -0
  75. package/src/components/utilities/QueueManager.ts +70 -0
  76. package/src/components/utilities/SetCronSchedule.ts +98 -0
  77. package/src/{@core/core.clearEvents.ts → components/utilities/SetDebug.ts} +17 -12
  78. package/src/components/utilities/SetEventEmit.ts +42 -0
  79. package/src/{@modules/@utilities/utilities.setSettings.ts → components/utilities/SetSettings.ts} +7 -7
  80. package/src/{@modules/@utilities/utilities.setSleep.ts → components/utilities/SetSleep.ts} +5 -5
  81. package/src/components/utilities/SetTimeoutAction.ts +64 -0
  82. package/src/components/utilities/SetWarning.ts +47 -0
  83. package/src/{@modules/@xmpp/xmpp.xDeploy.ts → components/xmpp/DeployXMPP.ts} +26 -27
  84. package/src/components/xmpp/ErrorXMPP.ts +27 -0
  85. package/src/{@modules/@xmpp/xmpp.xError.ts → components/xmpp/OfflineXMPP.ts} +17 -9
  86. package/src/{@modules/@xmpp/xmpp.xOnline.ts → components/xmpp/OnlineXMPP.ts} +21 -20
  87. package/src/components/xmpp/ReconnectXMPP.ts +64 -0
  88. package/src/components/xmpp/StanzaXMPP.ts +63 -0
  89. package/src/{@building/building.tags.ts → core/ClearEvents.ts} +12 -5
  90. package/src/{@core/core.getVersion.ts → core/GetEvents.ts} +5 -6
  91. package/src/core/GetNodes.ts +24 -0
  92. package/src/{@core/core.getNodes.ts → core/GetRandomEvent.ts} +5 -6
  93. package/src/core/GetVersion.ts +24 -0
  94. package/src/core/ManualEvent.ts +55 -0
  95. package/src/core/QueryStanza.ts +40 -0
  96. package/src/core/SetNode.ts +87 -0
  97. package/src/core/StartService.ts +62 -0
  98. package/src/core/StopService.ts +32 -0
  99. package/src/enums/AWIPS.ts +366 -0
  100. package/src/{@dictionaries/dictionaries.eventActions.ts → enums/Actions.ts} +3 -3
  101. package/src/{@dictionaries/dictionaries.eventCancelMessages.ts → enums/Cancellation.ts} +4 -3
  102. package/src/{@dictionaries/dictionaries.eventCauses.ts → enums/Causes.ts} +3 -3
  103. package/src/{@dictionaries/dictionaries.statusCorrelationText.ts → enums/Correlations.ts} +3 -3
  104. package/src/enums/Enhanced.ts +70 -0
  105. package/src/{@dictionaries/dictionaries.eventTypes.ts → enums/Events.ts} +3 -3
  106. package/src/{@dictionaries/dictionaries.regExp.ts → enums/Expressions.ts} +5 -4
  107. package/src/{@core/core.getEvents.ts → enums/GlobalFilter.ts} +7 -8
  108. package/src/{@dictionaries/dictionaries.hailStrings.ts → enums/Hail.ts} +9 -4
  109. package/src/{@dictionaries/dictionaries.officeICAOs.ts → enums/ICAO.ts} +5 -3
  110. package/src/enums/Matches.ts +60 -0
  111. package/src/{@dictionaries/dictionaries.eventProducts.ts → enums/Products.ts} +3 -3
  112. package/src/{@dictionaries/dictionaries.eventRecords.ts → enums/Records.ts} +3 -3
  113. package/src/{@dictionaries/dictionaries.eventSeverity.ts → enums/Severity.ts} +3 -3
  114. package/src/{@dictionaries/dictionaries.shapefileLinks.ts → enums/Shapefiles.ts} +3 -3
  115. package/src/enums/States.ts +136 -0
  116. package/src/{@dictionaries/dictionaries.eventStatus.ts → enums/Status.ts} +3 -3
  117. package/src/enums/Strings.ts +22 -0
  118. package/src/enums/Tags.ts +172 -0
  119. package/src/{@dictionaries/dictionaries.testSignatures.ts → enums/Testing.ts} +5 -4
  120. package/src/enums/Themes.ts +70 -0
  121. package/src/events/ParseAPI.ts +129 -0
  122. package/src/{@events/events.text.ts → events/ParseText.ts} +32 -23
  123. package/src/{@events/events.ugc.ts → events/ParseUGC.ts} +36 -26
  124. package/src/events/ParseVTEC.ts +88 -0
  125. package/src/index.ts +60 -38
  126. package/src/manager/MakeEvents.ts +110 -0
  127. package/src/manager/RemoveEvent.ts +74 -0
  128. package/src/{@manager/manager.setHash.ts → manager/SetHash.ts} +19 -15
  129. package/src/manager/UpdateEvents.ts +35 -0
  130. package/src/manager/UpdateNode.ts +62 -0
  131. package/src/manager/ValidateEvents.ts +144 -0
  132. package/src/{@parsers/@hvtec/hvtec.extract.ts → parsers/hvtec/HVExtract.ts} +13 -13
  133. package/src/parsers/text/GetDescriptionFromProduct.ts +59 -0
  134. package/src/parsers/text/GetEmbededText.ts +57 -0
  135. package/src/parsers/text/GetPolygonFromProduct.ts +71 -0
  136. package/src/parsers/text/GetStringText.ts +58 -0
  137. package/src/{@parsers/@text/text.getTextFromProduct.ts → parsers/text/GetTextFromProduct.ts} +12 -12
  138. package/src/parsers/ugc/GetCache.ts +24 -0
  139. package/src/{@parsers/@ugc/ugc.expiry.ts → parsers/ugc/GetExpiry.ts} +3 -3
  140. package/src/{@parsers/@ugc/ugc.header.ts → parsers/ugc/GetHeader.ts} +6 -6
  141. package/src/parsers/ugc/GetLocations.ts +57 -0
  142. package/src/parsers/ugc/GetZonePolygon.ts +73 -0
  143. package/src/{@parsers/@ugc/ugc.zones.ts → parsers/ugc/GetZones.ts} +3 -3
  144. package/src/{@modules/@utilities/utilities.setListener.ts → parsers/ugc/SetCache.ts} +13 -10
  145. package/src/{@parsers/@ugc/ugc.extract.ts → parsers/ugc/UGCExtract.ts} +15 -15
  146. package/src/{@parsers/@pvtec/pvtec.expires.ts → parsers/vtec/GetExpiry.ts} +3 -3
  147. package/src/parsers/vtec/VTECExtract.ts +49 -0
  148. package/src/{@types/types.attributes.ts → static/Attributes.ts} +2 -3
  149. package/src/{@types/type.event.ts → static/Event.ts} +11 -8
  150. package/src/{@types/type.properties.ts → static/Properties.ts} +17 -10
  151. package/src/{@types/types.stanza.ts → static/Stanza.ts} +2 -2
  152. package/src/tasks/CreateTasks.ts +123 -0
  153. package/src/{@core/core.stop.ts → tasks/TaskGenerateJSON.ts} +14 -12
  154. package/src/tasks/TaskGenerateText.ts +34 -0
  155. package/src/tasks/TaskSendNTFY.ts +97 -0
  156. package/src/tasks/TaskSendWebhook.ts +107 -0
  157. package/src/types/Actions.ts +37 -0
  158. package/src/{@types/types.hvtec.ts → types/HVTEC.ts} +6 -6
  159. package/src/{@types/types.hash.ts → types/Hash.ts} +5 -5
  160. package/src/types/Nodes.ts +29 -0
  161. package/src/{@types/types.settings.ts → types/Settings.ts} +42 -10
  162. package/src/{@types/types.compiled.ts → types/StanzaCompiled.ts} +15 -14
  163. package/src/{@types/types.ugc.ts → types/UGC.ts} +5 -5
  164. package/src/{@modules/@utilities/utilities.getSettings.ts → types/VTEC.ts} +12 -7
  165. package/tools/build.js +47 -0
  166. package/tsconfig.json +28 -1
  167. package/dist/index.d.mts +0 -239
  168. package/dist/index.d.ts +0 -239
  169. package/src/@building/building.create.ts +0 -42
  170. package/src/@building/building.properties.ts +0 -89
  171. package/src/@building/building.tracking.ts +0 -68
  172. package/src/@building/building.validate.ts +0 -147
  173. package/src/@core/core.getRandomEvent.ts +0 -25
  174. package/src/@core/core.setNode.ts +0 -81
  175. package/src/@core/core.start.ts +0 -61
  176. package/src/@dictionaries/dictionaries.betterEventNames.ts +0 -99
  177. package/src/@dictionaries/dictionaries.eventAwipAbreviations.ts +0 -364
  178. package/src/@dictionaries/dictionaries.eventTags.ts +0 -93
  179. package/src/@dictionaries/dictionaries.eventsMatchText.ts +0 -36
  180. package/src/@dictionaries/dictionaries.transcribedMessageReplacements.ts +0 -68
  181. package/src/@events/events.api.ts +0 -113
  182. package/src/@events/events.vtec.ts +0 -87
  183. package/src/@manager/manager.mkEvent.ts +0 -96
  184. package/src/@manager/manager.rmEvent.ts +0 -49
  185. package/src/@manager/manager.updateEvents.ts +0 -35
  186. package/src/@manager/manager.updateNodes.ts +0 -55
  187. package/src/@manager/manager.updateWebhooks.ts +0 -50
  188. package/src/@modules/@database/database.init.ts +0 -45
  189. package/src/@modules/@database/database.stanza.ts +0 -48
  190. package/src/@modules/@eas/eas.setEasTone.ts +0 -137
  191. package/src/@modules/@stanza/stanza.validate.ts +0 -50
  192. package/src/@modules/@utilities/utilities.createHttp.ts +0 -85
  193. package/src/@modules/@utilities/utilities.createWebhook.ts +0 -115
  194. package/src/@modules/@utilities/utilities.setCronSchedule.ts +0 -65
  195. package/src/@modules/@utilities/utilities.setEventEmit.ts +0 -41
  196. package/src/@modules/@utilities/utilities.setTimeoutAction.ts +0 -59
  197. package/src/@modules/@xmpp/xmpp.xOffline.ts +0 -38
  198. package/src/@modules/@xmpp/xmpp.xReconnect.ts +0 -64
  199. package/src/@modules/@xmpp/xmpp.xStanza.ts +0 -63
  200. package/src/@parsers/@pvtec/pvtec.extract.ts +0 -49
  201. package/src/@parsers/@text/text.getDescriptionFromProduct.ts +0 -53
  202. package/src/@parsers/@text/text.getPolygonFromProduct.ts +0 -32
  203. package/src/@parsers/@text/text.getXML.ts +0 -61
  204. package/src/@parsers/@ugc/ugc.coordinates.ts +0 -110
  205. package/src/@parsers/@ugc/ugc.locations.ts +0 -29
  206. package/src/@types/types.pvtec.ts +0 -30
  207. package/src/@types/types.webhook.ts +0 -27
  208. package/test.js +0 -91
  209. package/tsup.config.ts +0 -16
  210. /package/{CODE_OF_CONDUCT.md → .github/CODE_OF_CONDUCT.md} +0 -0
  211. /package/{LICENSE → .github/LICENSE} +0 -0
  212. /package/{SECURITY.md → .github/SECURITY.md} +0 -0
@@ -1,81 +0,0 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
15
-
16
- Internal Package: @atmosx/event-product-parser
17
-
18
- */
19
-
20
- import { bootstrap } from "../bootstrap";
21
- import { setWarning } from "../@modules/@utilities/utilities.setWarning"
22
- import { setEventEmit } from "../@modules/@utilities/utilities.setEventEmit";
23
-
24
- interface GetAddChaserOptions {
25
- identifier: string
26
- delete?: boolean
27
- coordinates: { longitude: number; latitude: number }
28
- }
29
-
30
- export const setNode = (options: GetAddChaserOptions) => {
31
- const nodes = bootstrap.cache.nodes.features;
32
- const exists = nodes.find((node) => node.properties.identifier === options.identifier);
33
- if (options.delete) {
34
- if (exists) {
35
- const index = nodes.indexOf(exists);
36
- nodes.splice(index, 1);
37
- return setEventEmit({
38
- event: `onNodeDelete`,
39
- metadata: {
40
- type: `node-delete`,
41
- node: exists
42
- }
43
- })
44
- }
45
- return setWarning({ message: `Node with identifier '${options.identifier}' not found.` })
46
- }
47
- if (exists) {
48
- const index = nodes.indexOf(exists);
49
- nodes[index] = {
50
- ...exists,
51
- geometry: {
52
- type: "Point",
53
- coordinates: [options.coordinates.longitude, options.coordinates.latitude]
54
- }
55
- };
56
- return setEventEmit({
57
- event: `onNodeUpdate`,
58
- metadata: {
59
- type: `node-update`,
60
- node: nodes[index]
61
- }
62
- })
63
- }
64
- nodes.push({
65
- type: "Feature",
66
- geometry: {
67
- type: "Point",
68
- coordinates: [options.coordinates.longitude, options.coordinates.latitude]
69
- },
70
- properties: {
71
- identifier: options.identifier
72
- }
73
- });
74
- return setEventEmit({
75
- event: `onNodeAdd`,
76
- metadata: {
77
- type: `node-add`,
78
- node: nodes[nodes.length - 1]
79
- }
80
- })
81
- }
@@ -1,61 +0,0 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
15
-
16
- Internal Package: @atmosx/event-product-parser
17
-
18
- */
19
-
20
- import { TypeSettings } from "../@types/types.settings";
21
- import { bootstrap } from "../bootstrap";
22
- import { setWarning } from "../@modules/@utilities/utilities.setWarning"
23
- import { setSettings } from "../@modules/@utilities/utilities.setSettings"
24
- import { xDeploy } from "../@modules/@xmpp/xmpp.xDeploy"
25
- import { initializeDatabase } from "../@modules/@database/database.init";
26
- import { getCachedEvents } from "../@modules/@database/database.cache";
27
- import { setCronSchedule } from "../@modules/@utilities/utilities.setCronSchedule";
28
- import { updateNode } from "../@manager/manager.updateNodes";
29
- import { updateEvents } from "../@manager/manager.updateEvents";
30
- import { Cron } from "croner";
31
-
32
- export const startService = async (configurations: TypeSettings): Promise<void> => {
33
- if (!bootstrap.isReady) {
34
- return setWarning({
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
- })
37
- }
38
- const settings = setSettings(configurations);
39
- bootstrap.isReady = true;
40
- await initializeDatabase();
41
- if (settings.EnableWireService) {
42
- (async () => {
43
- await getCachedEvents();
44
- await xDeploy()
45
- })();
46
- }
47
- await setCronSchedule()
48
- let scheduleInterval = !settings.EnableWireService ? settings.NationalWeatherServiceSettings.CallbackInterval : 1;
49
- if (!settings.EnableWireService && scheduleInterval < 15) {
50
- setWarning({ message: `Schedule Interval of ${scheduleInterval} seconds is too low, setting to 15 seconds` })
51
- bootstrap.settings.NationalWeatherServiceSettings.CallbackInterval = 15;
52
- scheduleInterval = 15;
53
- }
54
- bootstrap.cron = new Cron(`*/${scheduleInterval} * * * * *`, async () => {
55
- await setCronSchedule();
56
- })
57
- bootstrap.cron = new Cron(`* * * * * *`, async () => {
58
- await updateNode();
59
- await updateEvents();
60
- })
61
- }
@@ -1,99 +0,0 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
15
-
16
- Internal Package: @atmosx/event-product-parser
17
-
18
- */
19
-
20
- type EnhancedEventType = {
21
- description?: string
22
- append?: boolean
23
- tornado?: string
24
- damage?: string
25
- }
26
-
27
- export const betterEventNames: Record<string, Record<string, EnhancedEventType>> = {
28
- "Tornado Warning": {
29
- "Tornado Emergency": {
30
- description: "tornado emergency"
31
- },
32
- "PDS Tornado Warning": {
33
- description: "particularly dangerous situation",
34
- damage: `CONSIDERABLE`
35
- },
36
- "Radar Confirmed Tornado Warning": {
37
- description: "source...radar confirmed tornado.",
38
- tornado: `OBSERVED`
39
- },
40
- "Confirmed Tornado Warning": {
41
- tornado: `OBSERVED`
42
- },
43
- "Radar Indicated Tornado Warning": { },
44
- },
45
- "Blizzard Warning": {
46
- "PDS Blizzard Warning": {
47
- description: "particularly dangerous situation",
48
- },
49
- },
50
- "Ice Storm Warning": {
51
- "PDS Ice Storm Warning": {
52
- description: "particularly dangerous situation",
53
- },
54
- },
55
- "Special Marine Warning": {
56
- "Special Marine Warning (TPROB)": {
57
- tornado: `POSSIBLE`
58
- },
59
- },
60
- "Tornado Watch": {
61
- "PDS Tornado Watch": {
62
- description: "particularly dangerous situation"
63
- }
64
- },
65
- "Flash Flood Warning": {
66
- "Flash Flood Emergency": {
67
- description: "flash flood emergency"
68
- },
69
- "Considerable Flash Flood Warning": {
70
- damage: `CONSIDERABLE`
71
- },
72
- },
73
- "Severe Thunderstorm Warning": {
74
- "EDS Severe Thunderstorm Warning (TPROB)": {
75
- description: "extremely dangerous situation",
76
- tornado: "POSSIBLE"
77
- },
78
- "EDS Severe Thunderstorm Warning": {
79
- description: "extremely dangerous situation"
80
- },
81
- "Destructive Severe Thunderstorm Warning (TPROB)": {
82
- damage: `DESTRUCTIVE`,
83
- tornado: `POSSIBLE`
84
- },
85
- "Destructive Severe Thunderstorm Warning": {
86
- damage: `DESTRUCTIVE`
87
- },
88
- "Considerable Severe Thunderstorm Warning (TPROB)": {
89
- damage: `CONSIDERABLE`,
90
- tornado: `POSSIBLE`
91
- },
92
- "Considerable Severe Thunderstorm Warning": {
93
- damage: `CONSIDERABLE`
94
- },
95
- "Severe Thunderstorm Warning (TPROB)": {
96
- tornado: `POSSIBLE`
97
- },
98
- },
99
- }
@@ -1,364 +0,0 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
15
-
16
- Internal Package: @atmosx/event-product-parser
17
-
18
- */
19
-
20
- export const eventAwipAbreviations: Record<string, string> = {
21
- ABV: `rawinsonde-data-above-100-millibars`,
22
- ADA: `alarm-alert-administrative-message`,
23
- ADM: `alert-administrative-message`,
24
- ADR: `nws-administrative-message`,
25
- ADV: `space-environment-advisory`,
26
- AFD: `area-forecast-discussion`,
27
- AFM: `area-forecast-matrices`,
28
- AFP: `area-forecast-product`,
29
- AFW: `fire-weather-matrix`,
30
- AGF: `agricultural-forecast`,
31
- AGO: `agricultural-observations`,
32
- ALT: `space-environment-alert`,
33
- AQA: `air-quality-alert`,
34
- AQI: `air-quality-index-statement`,
35
- ASA: `air-stagnation-advisory`,
36
- AVA: `avalanche-watch`,
37
- AVG: `avalanche-weather-guidance`,
38
- AVW: `avalanche-warning`,
39
- AWO: `area-weather-outlook`,
40
- AWS: `area-weather-summary`,
41
- AWU: `area-weather-update`,
42
- AWW: `airport-weather-warning`,
43
- BLU: `blue-alert`,
44
- BOY: `buoy-report`,
45
- BRG: `coast-guard-observations`,
46
- BRT: `hourly-roundup-for-weather-radio`,
47
- CAE: `child-abduction-emergency`,
48
- CCF: `coded-city-forecast`,
49
- CDW: `civil-danger-warning`,
50
- CEM: `civil-emergency-message`,
51
- CF6: `monthly-daily-climate-data`,
52
- CFP: `convective-forecast-product`,
53
- CFW: `coastal-flood-warnings-watches-statements`,
54
- CGR: `coast-guard-surface-report`,
55
- CHG: `computer-hurricane-guidance`,
56
- CLA: `climatological-report-annual`,
57
- CLI: `climatological-report-daily`,
58
- CLM: `climatological-report-monthly`,
59
- CLQ: `climatological-report-quarterly`,
60
- CLS: `climatological-report-seasonal`,
61
- CLT: `climate-report`,
62
- CMM: `coded-climatological-monthly-means`,
63
- COD: `coded-analysis-and-forecasts`,
64
- CPF: `great-lakes-port-forecast`,
65
- CUR: `space-environment-products-routine`,
66
- CWA: `center-weather-advisory`,
67
- CWF: `coastal-waters-forecast`,
68
- CWS: `center-weather-statement`,
69
- DAY: `space-environment-product-daily`,
70
- DDO: `daily-dispersion-outlook`,
71
- DGT: `drought-information-statement`,
72
- DMO: `practice-demo-warning`,
73
- DSA: `unnumbered-depression-advisory`,
74
- DSM: `asos-daily-summary`,
75
- DSW: `dust-storm-warning`,
76
- EFP: `extended-forecast-3-to-5-day`,
77
- EOL: `six-to-ten-day-weather-outlook-local`,
78
- EQI: `tsunami-bulletin`,
79
- EQR: `earthquake-report`,
80
- EQW: `earthquake-warning`,
81
- ESF: `flood-potential-outlook`,
82
- ESG: `extended-streamflow-guidance`,
83
- ESP: `extended-streamflow-prediction`,
84
- ESS: `water-supply-outlook`,
85
- EVI: `evacuation-immediate`,
86
- EWW: `extreme-wind-warning`,
87
- FA0: `aviation-area-forecast-pacific`,
88
- FA1: `aviation-area-forecast-northeast`,
89
- FA2: `aviation-area-forecast-southeast`,
90
- FA3: `aviation-area-forecast-north-central`,
91
- FA4: `aviation-area-forecast-south-central`,
92
- FA5: `aviation-area-forecast-rocky-mountains`,
93
- FA6: `aviation-area-forecast-west-coast`,
94
- FA7: `aviation-area-forecast-juneau-ak`,
95
- FA8: `aviation-area-forecast-anchorage-ak`,
96
- FA9: `aviation-area-forecast-fairbanks-ak`,
97
- FD0: `winds-aloft-forecast-24hr-high-altitude`,
98
- FD1: `winds-aloft-forecast-6hr`,
99
- FD2: `winds-aloft-forecast-12hr`,
100
- FD3: `winds-aloft-forecast-24hr`,
101
- FD4: `winds-aloft-forecast`,
102
- FD5: `winds-aloft-forecast`,
103
- FD6: `winds-aloft-forecast`,
104
- FD7: `winds-aloft-forecast`,
105
- FD8: `winds-aloft-forecast-6hr-high-altitude`,
106
- FD9: `winds-aloft-forecast-12hr-high-altitude`,
107
- FDI: `fire-danger-indices`,
108
- FFA: `flash-flood-watch`,
109
- FFG: `flash-flood-guidance`,
110
- FFH: `headwater-guidance`,
111
- FFS: `flash-flood-statement`,
112
- FFW: `flash-flood-warning`,
113
- FLN: `national-flood-summary`,
114
- FLS: `flood-statement`,
115
- FLW: `flood-warning`,
116
- FOF: `upper-wind-fallout-forecast`,
117
- FRW: `fire-warning`,
118
- FSH: `marine-fisheries-service-message`,
119
- FTM: `radar-outage-notification`,
120
- FTP: `temp-pop-guidance`,
121
- FWA: `fire-weather-administrative-message`,
122
- FWD: `fire-weather-outlook-discussion`,
123
- FWF: `fire-weather-forecast`,
124
- FWL: `land-management-forecast`,
125
- FWM: `miscellaneous-fire-weather-product`,
126
- FWN: `fire-weather-notification`,
127
- FWO: `fire-weather-observation`,
128
- FWS: `fire-weather-spot-forecast`,
129
- FZL: `freezing-level-data`,
130
- GLF: `great-lakes-forecast`,
131
- GLS: `great-lakes-storm-summary`,
132
- GRE: `green`,
133
- HD1: `rfc-qpf-data-product`,
134
- HD2: `rfc-qpf-data-product`,
135
- HD3: `rfc-qpf-data-product`,
136
- HD4: `rfc-qpf-data-product`,
137
- HD7: `rfc-qpf-data-product`,
138
- HD8: `rfc-qpf-data-product`,
139
- HD9: `rfc-qpf-data-product`,
140
- HLS: `hurricane-local-statement`,
141
- HMD: `hydrometeorological-discussion`,
142
- HML: `ahps-xml-product`,
143
- HMW: `hazardous-materials-warning`,
144
- HP1: `rfc-qpf-verification-product`,
145
- HP2: `rfc-qpf-verification-product`,
146
- HP3: `rfc-qpf-verification-product`,
147
- HP4: `rfc-qpf-verification-product`,
148
- HP5: `rfc-qpf-verification-product`,
149
- HP6: `rfc-qpf-verification-product`,
150
- HP7: `rfc-qpf-verification-product`,
151
- HP8: `rfc-qpf-verification-product`,
152
- HRR: `weather-roundup`,
153
- HSF: `high-seas-forecast`,
154
- HWO: `hazardous-weather-outlook`,
155
- HWR: `hourly-weather-roundup`,
156
- HYD: `daily-hydrometeorological-products`,
157
- HYM: `monthly-hydrometeorological-product`,
158
- ICE: `ice-forecast`,
159
- IDM: `ice-drift-vectors`,
160
- INI: `administrative-message`,
161
- IOB: `ice-observation`,
162
- KPA: `keep-alive-message`,
163
- LAE: `local-area-emergency`,
164
- LCD: `preliminary-local-climatological-data`,
165
- LCO: `local-cooperative-observation`,
166
- LEW: `law-enforcement-warning`,
167
- LFP: `local-forecast`,
168
- LKE: `lake-stages`,
169
- LLS: `low-level-sounding`,
170
- LOW: `low-temperatures`,
171
- LSR: `local-storm-report`,
172
- LTG: `lightning-data`,
173
- MAN: `rawinsonde-mandatory-levels`,
174
- MAP: `mean-areal-precipitation`,
175
- MAW: `amended-marine-forecast`,
176
- MFM: `marine-forecast-matrix`,
177
- MIM: `marine-interpretation-message`,
178
- MIS: `miscellaneous-local-product`,
179
- MOB: `marine-observations`,
180
- MON: `space-environment-product-monthly`,
181
- MRP: `marine-product-techniques-development`,
182
- MSM: `asos-monthly-summary-message`,
183
- MTR: `metar-observation`,
184
- MTT: `metar-test-message`,
185
- MVF: `marine-verification-coded-message`,
186
- MWS: `marine-weather-statement`,
187
- MWW: `marine-weather-message`,
188
- NOU: `weather-reconnaissance-flights`,
189
- NOW: `short-term-forecast`,
190
- NOX: `data-management-message`,
191
- NPW: `non-precipitation-warning`,
192
- NSH: `nearshore-marine-forecast`,
193
- NUW: `nuclear-power-plant-warning`,
194
- NWR: `noaa-weather-radio-forecast`,
195
- OAV: `other-aviation-products`,
196
- OBS: `observations`,
197
- OFA: `offshore-aviation-forecast`,
198
- OFF: `offshore-forecast`,
199
- OMR: `other-marine-products`,
200
- OPU: `other-public-products`,
201
- OSO: `other-surface-observations`,
202
- OSW: `ocean-surface-winds`,
203
- OUA: `other-upper-air-data`,
204
- OZF: `zone-forecast`,
205
- PFM: `point-forecast-matrices`,
206
- PFW: `fire-weather-point-forecast-matrices`,
207
- PLS: `plain-language-ship-report`,
208
- PMD: `prognostic-meteorological-discussion`,
209
- PNS: `public-information-statement`,
210
- POE: `probability-of-exceedance`,
211
- PRB: `heat-index-forecast-tables`,
212
- PRC: `pilot-report-collective`,
213
- PRE: `preliminary-forecasts`,
214
- PSH: `post-storm-hurricane-report`,
215
- PTS: `probabilistic-outlook-points`,
216
- PWO: `public-severe-weather-outlook`,
217
- PWS: `tropical-cyclone-probabilities`,
218
- QPF: `quantitative-precipitation-forecast`,
219
- QPS: `quantitative-precipitation-statement`,
220
- RDF: `revised-digital-forecast`,
221
- REC: `recreational-report`,
222
- RER: `record-report`,
223
- RET: `eas-activation-request`,
224
- RFD: `rangeland-fire-danger-forecast`,
225
- RFI: `rfi-observation`,
226
- RFR: `route-forecast`,
227
- RFW: `red-flag-warning`,
228
- RHW: `radiological-hazard-warning`,
229
- RMT: `required-monthly-test`,
230
- RNS: `rain-information-statement`,
231
- RR1: `hydro-met-data-report-part-1`,
232
- RR2: `hydro-met-data-report-part-2`,
233
- RR3: `hydro-met-data-report-part-3`,
234
- RR4: `hydro-met-data-report-part-4`,
235
- RR5: `hydro-met-data-report-part-5`,
236
- RR6: `hydro-met-data-report-part-6`,
237
- RR7: `hydro-met-data-report-part-7`,
238
- RR8: `hydro-met-data-report-part-8`,
239
- RR9: `hydro-met-data-report-part-9`,
240
- RRA: `automated-hydrologic-observation-report`,
241
- RRM: `miscellaneous-hydrologic-data`,
242
- RRS: `hads-data`,
243
- RRY: `asos-hourly-test-message`,
244
- RSD: `daily-snotel-data`,
245
- RSM: `monthly-snotel-data`,
246
- RTP: `regional-temp-precip-table`,
247
- RVA: `river-summary`,
248
- RVD: `daily-river-forecast`,
249
- RVF: `river-forecast`,
250
- RVI: `river-ice-statement`,
251
- RVM: `miscellaneous-river-product`,
252
- RVR: `river-recreation-statement`,
253
- RVS: `river-statement`,
254
- RWR: `regional-weather-roundup`,
255
- RWS: `regional-weather-summary`,
256
- RWT: `required-weekly-test`,
257
- SAB: `special-avalanche-bulletin`,
258
- SAF: `agricultural-weather-forecast`,
259
- SAG: `snow-avalanche-guidance`,
260
- SAT: `apt-prediction`,
261
- SAW: `preliminary-notice-of-watch`,
262
- SCC: `storm-summary`,
263
- SCD: `supplementary-climatological-data`,
264
- SCN: `soil-climate-analysis-network`,
265
- SCP: `satellite-cloud-product`,
266
- SCS: `selected-cities-summary`,
267
- SDO: `supplementary-data-observation`,
268
- SDS: `special-dispersion-statement`,
269
- SEL: `severe-local-storm-watch`,
270
- SEV: `spc-watch-point-information`,
271
- SFP: `state-forecast`,
272
- SFT: `tabular-state-forecast`,
273
- SGL: `rawinsonde-significant-levels`,
274
- SHP: `surface-ship-report`,
275
- SIG: `international-sigmet`,
276
- SIM: `satellite-interpretation-message`,
277
- SLS: `severe-local-storm-outline`,
278
- SMF: `smoke-management-weather-forecast`,
279
- SMW: `special-marine-warning`,
280
- SOO: `science-operations-officer-product`,
281
- SPE: `satellite-precipitation-estimates`,
282
- SPF: `storm-strike-probability-bulletin`,
283
- SPS: `special-weather-statement`,
284
- SPW: `shelter-in-place-warning`,
285
- SQW: `snow-squall-warning`,
286
- SRD: `surf-discussion`,
287
- SRF: `surf-forecast`,
288
- SRG: `soaring-guidance`,
289
- SSM: `synoptic-surface-observation`,
290
- STA: `weather-statistical-summary`,
291
- STD: `satellite-tropical-disturbance-summary`,
292
- STO: `road-condition-report`,
293
- STP: `state-temp-precip-table`,
294
- STQ: `spot-forecast-request`,
295
- SUM: `space-weather-message`,
296
- SVR: `severe-thunderstorm-warning`,
297
- SVS: `severe-weather-statement`,
298
- SWOMCD: `mesoscale-discussion`,
299
- SWODY1: `day-1`,
300
- SWODY2: `day-2`,
301
- SWODY3: `day-3`,
302
- SWS: `state-weather-summary`,
303
- SYN: `regional-weather-synopsis`,
304
- TAF: `terminal-aerodrome-forecast`,
305
- TAP: `terminal-alerting-products`,
306
- TAV: `travelers-forecast-table`,
307
- TCA: `tropical-cyclone-advisory`,
308
- TCD: `tropical-cyclone-discussion`,
309
- TCE: `tropical-cyclone-position-estimate`,
310
- TCM: `tropical-cyclone-marine-aviation-advisory`,
311
- TCP: `public-tropical-cyclone-advisory`,
312
- TCS: `satellite-tropical-cyclone-summary`,
313
- TCU: `tropical-cyclone-update`,
314
- TCV: `tropical-cyclone-break-points`,
315
- TIB: `tsunami-bulletin`,
316
- TID: `tide-report`,
317
- TMA: `tsunami-tide-seismic-acknowledgement`,
318
- TOE: `telephone-outage-emergency`,
319
- TOR: `tornado-warning`,
320
- TPT: `temperature-precipitation-table`,
321
- TSU: `tsunami-watch`,
322
- TUV: `ultraviolet-index`,
323
- TVL: `travelers-forecast`,
324
- TWB: `transcribed-weather-broadcast`,
325
- TWD: `tropical-weather-discussion`,
326
- TWO: `tropical-weather-outlook`,
327
- TWS: `tropical-weather-summary`,
328
- URN: `aircraft-reconnaissance`,
329
- UVI: `ultraviolet-index`,
330
- VAA: `volcanic-activity-advisory`,
331
- VER: `forecast-verification-statistics`,
332
- VFT: `taf-verification-product`,
333
- VOW: `volcano-warning`,
334
- WA0: `airmet-pacific`,
335
- WA1: `airmet-northeast`,
336
- WA2: `airmet-southeast`,
337
- WA3: `airmet-north-central`,
338
- WA4: `airmet-south-central`,
339
- WA5: `airmet-rocky-mountains`,
340
- WA6: `airmet-west-coast`,
341
- WA7: `airmet-juneau-ak`,
342
- WA8: `airmet-anchorage-ak`,
343
- WA9: `airmet-fairbanks-ak`,
344
- WAR: `space-environment-warning`,
345
- WAT: `space-environment-watch`,
346
- WCN: `weather-watch-clearance-notification`,
347
- WCR: `weekly-weather-and-crop-report`,
348
- WDA: `weekly-data-for-agriculture`,
349
- WDU: `warning-decision-update`,
350
- WEK: `space-environment-product-weekly`,
351
- WOU: `watch-outline-update`,
352
- WS1: `sigmet-northeast`,
353
- WS2: `sigmet-southeast`,
354
- WS3: `sigmet-north-central`,
355
- WS4: `sigmet-south-central`,
356
- WS5: `sigmet-rocky-mountains`,
357
- WS6: `sigmet-west-coast`,
358
- WST: `tropical-cyclone-sigmet`,
359
- WSV: `volcanic-activity-sigmet`,
360
- WSW: `winter-weather-warning`,
361
- WWA: `watch-status-report`,
362
- WWP: `watch-probabilities`,
363
- ZFP: `zone-forecast-product`,
364
- };