@atmosx/event-product-parser 3.0.51 → 3.0.52

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 (139) hide show
  1. package/.vscode/settings.json +3 -3
  2. package/CODE_OF_CONDUCT.md +9 -9
  3. package/CONTRIBUTING.md +29 -29
  4. package/LICENSE +17 -17
  5. package/README.md +443 -444
  6. package/SECURITY.md +20 -20
  7. package/SUPPORTED_EVENTS.md +369 -368
  8. package/dist/cjs/index.cjs +161 -204
  9. package/dist/esm/index.mjs +160 -203
  10. package/package.json +52 -52
  11. package/src/@building/building.attachments.ts +82 -82
  12. package/src/@building/building.clean.ts +29 -29
  13. package/src/@building/building.create.ts +55 -55
  14. package/src/@building/building.enhance.ts +59 -59
  15. package/src/@building/building.geometry.ts +47 -47
  16. package/src/@building/building.headers.ts +36 -36
  17. package/src/@building/building.office.ts +42 -42
  18. package/src/@building/building.polygon.ts +69 -69
  19. package/src/@building/building.properties.ts +95 -95
  20. package/src/@building/building.signature.ts +60 -60
  21. package/src/@building/building.tags.ts +23 -23
  22. package/src/@building/building.tracking.ts +67 -67
  23. package/src/@building/building.validate.ts +152 -151
  24. package/src/@core/core.clearEvents.ts +30 -30
  25. package/src/@core/core.createListener.ts +23 -23
  26. package/src/@core/core.getEvents.ts +23 -23
  27. package/src/@core/core.getNodes.ts +23 -23
  28. package/src/@core/core.getRandomEvent.ts +23 -23
  29. package/src/@core/core.getVersion.ts +23 -23
  30. package/src/@core/core.manualEvent.ts +38 -0
  31. package/src/@core/core.query.ts +38 -38
  32. package/src/@core/core.setNode.ts +80 -80
  33. package/src/@core/core.start.ts +60 -60
  34. package/src/@core/core.stop.ts +31 -31
  35. package/src/@dictionaries/dictionaries.actions.ts +27 -27
  36. package/src/@dictionaries/dictionaries.awips.ts +363 -363
  37. package/src/@dictionaries/dictionaries.cancellation.ts +30 -30
  38. package/src/@dictionaries/dictionaries.causes.ts +35 -35
  39. package/src/@dictionaries/dictionaries.correlations.ts +42 -42
  40. package/src/@dictionaries/dictionaries.enhanced.ts +66 -109
  41. package/src/@dictionaries/dictionaries.events.ts +82 -82
  42. package/src/@dictionaries/dictionaries.expressions.ts +28 -28
  43. package/src/@dictionaries/dictionaries.global.ts +24 -0
  44. package/src/@dictionaries/dictionaries.hail.ts +35 -35
  45. package/src/@dictionaries/dictionaries.icao.ts +258 -258
  46. package/src/@dictionaries/dictionaries.matches.ts +54 -35
  47. package/src/@dictionaries/dictionaries.products.ts +24 -24
  48. package/src/@dictionaries/dictionaries.records.ts +25 -25
  49. package/src/@dictionaries/dictionaries.severity.ts +27 -27
  50. package/src/@dictionaries/dictionaries.shapefiles.ts +35 -35
  51. package/src/@dictionaries/dictionaries.states.ts +71 -71
  52. package/src/@dictionaries/dictionaries.status.ts +30 -30
  53. package/src/@dictionaries/dictionaries.tags.ts +92 -92
  54. package/src/@dictionaries/dictionaries.testing.ts +24 -24
  55. package/src/@events/events.api.ts +116 -116
  56. package/src/@events/events.text.ts +84 -80
  57. package/src/@events/events.ugc.ts +89 -85
  58. package/src/@events/events.vtec.ts +86 -86
  59. package/src/@manager/manager.mkEvent.ts +97 -93
  60. package/src/@manager/manager.rmEvent.ts +56 -51
  61. package/src/@manager/manager.setHash.ts +35 -35
  62. package/src/@manager/manager.updateEvents.ts +32 -32
  63. package/src/@manager/manager.updateListener.ts +154 -154
  64. package/src/@manager/manager.updateNodes.ts +53 -53
  65. package/src/@modules/@database/database.broadcastify.ts +66 -66
  66. package/src/@modules/@database/database.cache.ts +49 -49
  67. package/src/@modules/@database/database.init.ts +58 -58
  68. package/src/@modules/@database/database.shapefiles.ts +92 -92
  69. package/src/@modules/@database/database.stanza.ts +46 -46
  70. package/src/@modules/@eas/eas.getCleanDescription.ts +91 -91
  71. package/src/@modules/@eas/eas.getFloatPCM16.ts +29 -29
  72. package/src/@modules/@eas/eas.getMergedPCM16.ts +32 -32
  73. package/src/@modules/@eas/eas.getPCM16.ts +52 -52
  74. package/src/@modules/@eas/eas.getPCMToFloat.ts +26 -26
  75. package/src/@modules/@eas/eas.getSampledPCM16.ts +36 -36
  76. package/src/@modules/@eas/eas.getTTS.ts +54 -54
  77. package/src/@modules/@eas/eas.getWavPCM16.ts +52 -52
  78. package/src/@modules/@eas/eas.setAFSK.ts +51 -51
  79. package/src/@modules/@eas/eas.setAsciiToBits.ts +31 -31
  80. package/src/@modules/@eas/eas.setAttentionTone.ts +40 -40
  81. package/src/@modules/@eas/eas.setEasTone.ts +151 -151
  82. package/src/@modules/@eas/eas.setNoise.ts +32 -32
  83. package/src/@modules/@eas/eas.setRadioEffect.ts +50 -50
  84. package/src/@modules/@eas/eas.setSameHeader.ts +44 -44
  85. package/src/@modules/@stanza/stanza.getAwipsType.ts +45 -45
  86. package/src/@modules/@stanza/stanza.validate.ts +49 -49
  87. package/src/@modules/@utilities/utilities.createHttp.ts +70 -70
  88. package/src/@modules/@utilities/utilities.getFormattedTime.ts +43 -43
  89. package/src/@modules/@utilities/utilities.getLatestIssuance.ts +32 -32
  90. package/src/@modules/@utilities/utilities.getMatched.ts +33 -33
  91. package/src/@modules/@utilities/utilities.getSettings.ts +25 -25
  92. package/src/@modules/@utilities/utilities.getShapeNearestPoint.ts +114 -114
  93. package/src/@modules/@utilities/utilities.setCronSchedule.ts +94 -94
  94. package/src/@modules/@utilities/utilities.setDebug.ts +38 -38
  95. package/src/@modules/@utilities/utilities.setEventEmit.ts +41 -41
  96. package/src/@modules/@utilities/utilities.setListener.ts +30 -30
  97. package/src/@modules/@utilities/utilities.setSettings.ts +42 -42
  98. package/src/@modules/@utilities/utilities.setSleep.ts +33 -33
  99. package/src/@modules/@utilities/utilities.setTimeoutAction.ts +62 -62
  100. package/src/@modules/@utilities/utilities.setWarning.ts +34 -34
  101. package/src/@modules/@xmpp/xmpp.xDeploy.ts +57 -57
  102. package/src/@modules/@xmpp/xmpp.xError.ts +26 -26
  103. package/src/@modules/@xmpp/xmpp.xOffline.ts +36 -36
  104. package/src/@modules/@xmpp/xmpp.xOnline.ts +45 -44
  105. package/src/@modules/@xmpp/xmpp.xReconnect.ts +64 -64
  106. package/src/@modules/@xmpp/xmpp.xStanza.ts +62 -62
  107. package/src/@parsers/@hvtec/hvtec.extract.ts +39 -39
  108. package/src/@parsers/@pvtec/pvtec.expires.ts +25 -25
  109. package/src/@parsers/@pvtec/pvtec.extract.ts +48 -48
  110. package/src/@parsers/@text/text.getDescriptionFromProduct.ts +52 -52
  111. package/src/@parsers/@text/text.getEmbed.ts +55 -55
  112. package/src/@parsers/@text/text.getPolygonFromProduct.ts +53 -32
  113. package/src/@parsers/@text/text.getTextFromProduct.ts +42 -42
  114. package/src/@parsers/@text/text.getXML.ts +60 -60
  115. package/src/@parsers/@ugc/ugc.coordinates.ts +110 -110
  116. package/src/@parsers/@ugc/ugc.expiry.ts +31 -31
  117. package/src/@parsers/@ugc/ugc.extract.ts +36 -36
  118. package/src/@parsers/@ugc/ugc.getCache.ts +23 -23
  119. package/src/@parsers/@ugc/ugc.header.ts +29 -29
  120. package/src/@parsers/@ugc/ugc.locations.ts +56 -56
  121. package/src/@parsers/@ugc/ugc.setCache.ts +27 -27
  122. package/src/@parsers/@ugc/ugc.zones.ts +51 -51
  123. package/src/@types/type.attributes.ts +28 -28
  124. package/src/@types/type.compiled.ts +34 -34
  125. package/src/@types/type.event.ts +69 -69
  126. package/src/@types/type.hash.ts +24 -24
  127. package/src/@types/type.hvtec.ts +25 -25
  128. package/src/@types/type.listener.ts +32 -32
  129. package/src/@types/type.properties.ts +77 -77
  130. package/src/@types/type.pvtec.ts +30 -30
  131. package/src/@types/type.settings.ts +84 -84
  132. package/src/@types/type.stanza.ts +37 -37
  133. package/src/@types/type.ugc.ts +24 -24
  134. package/src/bootstrap.ts +115 -115
  135. package/src/index.ts +74 -74
  136. package/test.js +92 -92
  137. package/tsconfig.json +13 -13
  138. package/tsup.config.ts +15 -15
  139. package/src/@core/core.createEvent.ts +0 -82
@@ -1,93 +1,93 @@
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 dict_tags: Record<string, string> = {
21
- "FROSTBITE AND HYPOTHERMIA ARE LIKELY": "Frostbite and Hypothermia Likely",
22
- "LICKELY BECOME SLICK AND HAZARDOUS": "Slick and Hazardous Roads",
23
- "SLIPPERY ROAD CONDITIONS": "Slippery Roads",
24
- "BLOWING SNOW WHICH COULD REDUCE VISIBILITY": "Blowing Snow Reducing Visibility",
25
- "TRAVEL COULD BE VERY DIFFICULT": "Difficult Travel Conditions",
26
- "DIFFICULT TRAVEL CONDITIONS": "Difficult Travel Conditions",
27
- "EXPECT DISRUPTIONS": "Expect Disruptions to Travel",
28
- "A LARGE AND EXTREMELY DANGEROUS TORNADO": "Large and Dangerous Tornado",
29
- "THIS IS A PARTICULARLY DANGEROUS SITUATION": "Particularly Dangerous Situation",
30
- "RADAR INDICATED ROTATION": "Radar Indicated Tornado",
31
- "WEATHER SPOTTERS CONFIRMED TORNADO": "Confirmed by Storm Spotters",
32
- "A SEVERE THUNDERSTORM CAPABLE OF PRODUCING A TORNADO": "Developing Tornado",
33
- "LAW ENFORCEMENT CONFIRMED TORNADO": "Reported by Law Enforcement",
34
- "A TORNADO IS ON THE GROUND": "Confirmed Tornado",
35
- "WEATHER SPOTTERS REPORTED FUNNEL CLOUD": "Confirmed Funnel Cloud by Storm Spotters",
36
- "PUBLIC CONFIRMED TORNADO": "Public reports of Tornado",
37
- "RADAR CONFIRMED": "Radar Confirmed",
38
- "TORNADO WAS REPORTED BRIEFLY ON THE GROUND": "Tornado no longer on ground",
39
- "SPOTTERS INDICATE THAT A FUNNEL CLOUD CONTINUES WITH THIS STORM": "Funnel Cloud Continues",
40
- "A TORNADO MAY DEVELOP AT ANY TIME": "Potentional still exists for Tornado to form",
41
- "LIFE-THREATENING SITUATION": "Life Threating Situation",
42
- "COMPLETE DESTRUCTION IS POSSIBLE": "Extremly Damaging Tornado",
43
- "POTENTIALLY DEADLY TORNADO": "Deadly Tornado",
44
- "RADAR INDICATED": "Radar Indicated",
45
- "HAIL DAMAGE TO VEHICLES IS EXPECTED": "Damaging to Vehicles",
46
- "EXPECT WIND DAMAGE": "Wind Damage",
47
- "FREQUENT LIGHTNING": "Frequent Lightning",
48
- "PEOPLE AND ANIMALS OUTDOORS WILL BE INJURED": "Capable of Injuring People and Animals",
49
- "TRAINED WEATHER SPOTTERS": "Confirmed by Storm Spotters",
50
- "SOURCE...PUBLIC": "Confirmed by Public",
51
- "SMALL CRAFT COULD BE DAMAGED": "Potential Damage to Small Craft",
52
- "A TORNADO WATCH REMAINS IN EFFECT": "Active Tornado Watch",
53
- "TENNIS BALL SIZE HAIL": "Tennis Ball Size Hail",
54
- "BASEBALL SIZE HAIL": "Baseball Size Hail",
55
- "GOLF BALL SIZE HAIL": "Golf Ball Size Hail",
56
- "QUARTER SIZE HAIL": "Quarter Size Hail",
57
- "PING PONG BALL SIZE HAIL": "Ping Pong Ball Size Hail",
58
- "NICKEL SIZE HAIL": "Nickel Size Hail",
59
- "DOPPLER RADAR.": "Confirmed by Radar",
60
- "DOPPLER RADAR AND AUTOMATED GAUGES.": "Confirmed by Radar and Gauges",
61
- "FLASH FLOODING CAUSED BY THUNDERSTORMS.": "Caused by Thunderstorm",
62
- "SOURCE...EMERGENCY MANAGEMENT.": "Confirmed by Emergency Management",
63
- "FLASH FLOODING CAUSED BY HEAVY RAIN.": "Caused by heavy rain",
64
- "SOURCE...LAW ENFORCEMENT REPORTED.": "Confirmed by Law Enforcement",
65
- "MINOR FLOODING IS OCCURING": "Minor Flooding Occurring",
66
- "VERY COLD TEMPERATURES CAN LEAD TO HYPOTHERMIA": "Hypothermia Risk",
67
- "SENSITIVE VEGETATION AND POSSIBLY DAMAGE UNPROTECTED OUTDOOR": "Vegetation and Outdoor Plumbing Risk",
68
- "RIP CURRENTS CAN SWEEP EVEN THE BEST SWIMMER": "Hazardous to All Swimmers",
69
- "HYPOTHERMIA IF PRECAUTIONS ARE NOT TAKEN.": "Hypothermia Risk",
70
- "FROSTBITE AND HYPOTHERMIA WILL OCCUR IF UNPROTECTED SKIN": "Frostbite and Hypothermia Risk on Unprotected Skin",
71
- "TEMPERATURES COULD CAUSE RUPTURED WATER PIPES": "Risk of Ruptured Water Pipes",
72
- "COULD RESULT IN HYPOTHERMIA OR FROSTBITE ON EXPOSED SKIN IF": "Hypothermia or Frostbite Risk on Exposed Skin",
73
- "WINDS WILL STRENGTHEN": "Strengthening Winds",
74
- "EXPECT ROADS TO RE-FREEZE": "Roads May Re-Freeze",
75
- "SLICK AND ICY SPOTS ON ROADS": "Slick and Icy Roads",
76
- "ICY PATCHES MAY BE MORE COMMON ON BRIDGES": "Icy Patches Likely on Bridges",
77
- "SLICK SPOTS ON UNTREATED ROADS": "Slick Spots on Untreated Roads",
78
- "TEMPERATURES ARE EXPECTED TO FALL BELOW FREEZING": "Temperatures Expected Below Freezing",
79
- "HAZARDOUS ROADWAYS AND BLACK ICE": "Hazardous Roadways and Black Ice",
80
- "SLOW DOWN AND ALLOW EXTRA TIME": "Slow Down and Allow Extra Time",
81
- "SHOULD EXERCISE CAUTION": "Should Exercise Caution",
82
- "LAKE EFFECT SNOW EXPECTED": "Lake Effect Snow Expected",
83
- "MODERATE LAKE EFFECT SNOWFALL RATES AND BLOWING SNOW": "Moderate Lake Effect Snowfall and Blowing Snow",
84
- "NO TSUNAMI THREAT": "No Active Tsunami Threat",
85
- "NO SIGNIFICANT TSUNAMI THREAT": "No Significant Tsunami Threat",
86
- "NO TSUNAMI IMPACTS ARE EXPECTED": "No Tsunami Impacts Expected",
87
- "A TSUNAMI THREAT EXISTS": "Tsunami Threat Exists",
88
- "TSUNAMI THREAT": "Active Tsunami Threat",
89
- "HEAT ILLNESSES": "Can cause heat illness",
90
- "WATCH POSSIBLE": "Watch Possible",
91
- "INTENSIFYING": "Intensifying",
92
- "CAPABLE OF PRODUCING A LANDSPOUT": "Landspout Possible",
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 dict_tags: Record<string, string> = {
21
+ "FROSTBITE AND HYPOTHERMIA ARE LIKELY": "Frostbite and Hypothermia Likely",
22
+ "LICKELY BECOME SLICK AND HAZARDOUS": "Slick and Hazardous Roads",
23
+ "SLIPPERY ROAD CONDITIONS": "Slippery Roads",
24
+ "BLOWING SNOW WHICH COULD REDUCE VISIBILITY": "Blowing Snow Reducing Visibility",
25
+ "TRAVEL COULD BE VERY DIFFICULT": "Difficult Travel Conditions",
26
+ "DIFFICULT TRAVEL CONDITIONS": "Difficult Travel Conditions",
27
+ "EXPECT DISRUPTIONS": "Expect Disruptions to Travel",
28
+ "A LARGE AND EXTREMELY DANGEROUS TORNADO": "Large and Dangerous Tornado",
29
+ "THIS IS A PARTICULARLY DANGEROUS SITUATION": "Particularly Dangerous Situation",
30
+ "RADAR INDICATED ROTATION": "Radar Indicated Tornado",
31
+ "WEATHER SPOTTERS CONFIRMED TORNADO": "Confirmed by Storm Spotters",
32
+ "A SEVERE THUNDERSTORM CAPABLE OF PRODUCING A TORNADO": "Developing Tornado",
33
+ "LAW ENFORCEMENT CONFIRMED TORNADO": "Reported by Law Enforcement",
34
+ "A TORNADO IS ON THE GROUND": "Confirmed Tornado",
35
+ "WEATHER SPOTTERS REPORTED FUNNEL CLOUD": "Confirmed Funnel Cloud by Storm Spotters",
36
+ "PUBLIC CONFIRMED TORNADO": "Public reports of Tornado",
37
+ "RADAR CONFIRMED": "Radar Confirmed",
38
+ "TORNADO WAS REPORTED BRIEFLY ON THE GROUND": "Tornado no longer on ground",
39
+ "SPOTTERS INDICATE THAT A FUNNEL CLOUD CONTINUES WITH THIS STORM": "Funnel Cloud Continues",
40
+ "A TORNADO MAY DEVELOP AT ANY TIME": "Potentional still exists for Tornado to form",
41
+ "LIFE-THREATENING SITUATION": "Life Threating Situation",
42
+ "COMPLETE DESTRUCTION IS POSSIBLE": "Extremly Damaging Tornado",
43
+ "POTENTIALLY DEADLY TORNADO": "Deadly Tornado",
44
+ "RADAR INDICATED": "Radar Indicated",
45
+ "HAIL DAMAGE TO VEHICLES IS EXPECTED": "Damaging to Vehicles",
46
+ "EXPECT WIND DAMAGE": "Wind Damage",
47
+ "FREQUENT LIGHTNING": "Frequent Lightning",
48
+ "PEOPLE AND ANIMALS OUTDOORS WILL BE INJURED": "Capable of Injuring People and Animals",
49
+ "TRAINED WEATHER SPOTTERS": "Confirmed by Storm Spotters",
50
+ "SOURCE...PUBLIC": "Confirmed by Public",
51
+ "SMALL CRAFT COULD BE DAMAGED": "Potential Damage to Small Craft",
52
+ "A TORNADO WATCH REMAINS IN EFFECT": "Active Tornado Watch",
53
+ "TENNIS BALL SIZE HAIL": "Tennis Ball Size Hail",
54
+ "BASEBALL SIZE HAIL": "Baseball Size Hail",
55
+ "GOLF BALL SIZE HAIL": "Golf Ball Size Hail",
56
+ "QUARTER SIZE HAIL": "Quarter Size Hail",
57
+ "PING PONG BALL SIZE HAIL": "Ping Pong Ball Size Hail",
58
+ "NICKEL SIZE HAIL": "Nickel Size Hail",
59
+ "DOPPLER RADAR.": "Confirmed by Radar",
60
+ "DOPPLER RADAR AND AUTOMATED GAUGES.": "Confirmed by Radar and Gauges",
61
+ "FLASH FLOODING CAUSED BY THUNDERSTORMS.": "Caused by Thunderstorm",
62
+ "SOURCE...EMERGENCY MANAGEMENT.": "Confirmed by Emergency Management",
63
+ "FLASH FLOODING CAUSED BY HEAVY RAIN.": "Caused by heavy rain",
64
+ "SOURCE...LAW ENFORCEMENT REPORTED.": "Confirmed by Law Enforcement",
65
+ "MINOR FLOODING IS OCCURING": "Minor Flooding Occurring",
66
+ "VERY COLD TEMPERATURES CAN LEAD TO HYPOTHERMIA": "Hypothermia Risk",
67
+ "SENSITIVE VEGETATION AND POSSIBLY DAMAGE UNPROTECTED OUTDOOR": "Vegetation and Outdoor Plumbing Risk",
68
+ "RIP CURRENTS CAN SWEEP EVEN THE BEST SWIMMER": "Hazardous to All Swimmers",
69
+ "HYPOTHERMIA IF PRECAUTIONS ARE NOT TAKEN.": "Hypothermia Risk",
70
+ "FROSTBITE AND HYPOTHERMIA WILL OCCUR IF UNPROTECTED SKIN": "Frostbite and Hypothermia Risk on Unprotected Skin",
71
+ "TEMPERATURES COULD CAUSE RUPTURED WATER PIPES": "Risk of Ruptured Water Pipes",
72
+ "COULD RESULT IN HYPOTHERMIA OR FROSTBITE ON EXPOSED SKIN IF": "Hypothermia or Frostbite Risk on Exposed Skin",
73
+ "WINDS WILL STRENGTHEN": "Strengthening Winds",
74
+ "EXPECT ROADS TO RE-FREEZE": "Roads May Re-Freeze",
75
+ "SLICK AND ICY SPOTS ON ROADS": "Slick and Icy Roads",
76
+ "ICY PATCHES MAY BE MORE COMMON ON BRIDGES": "Icy Patches Likely on Bridges",
77
+ "SLICK SPOTS ON UNTREATED ROADS": "Slick Spots on Untreated Roads",
78
+ "TEMPERATURES ARE EXPECTED TO FALL BELOW FREEZING": "Temperatures Expected Below Freezing",
79
+ "HAZARDOUS ROADWAYS AND BLACK ICE": "Hazardous Roadways and Black Ice",
80
+ "SLOW DOWN AND ALLOW EXTRA TIME": "Slow Down and Allow Extra Time",
81
+ "SHOULD EXERCISE CAUTION": "Should Exercise Caution",
82
+ "LAKE EFFECT SNOW EXPECTED": "Lake Effect Snow Expected",
83
+ "MODERATE LAKE EFFECT SNOWFALL RATES AND BLOWING SNOW": "Moderate Lake Effect Snowfall and Blowing Snow",
84
+ "NO TSUNAMI THREAT": "No Active Tsunami Threat",
85
+ "NO SIGNIFICANT TSUNAMI THREAT": "No Significant Tsunami Threat",
86
+ "NO TSUNAMI IMPACTS ARE EXPECTED": "No Tsunami Impacts Expected",
87
+ "A TSUNAMI THREAT EXISTS": "Tsunami Threat Exists",
88
+ "TSUNAMI THREAT": "Active Tsunami Threat",
89
+ "HEAT ILLNESSES": "Can cause heat illness",
90
+ "WATCH POSSIBLE": "Watch Possible",
91
+ "INTENSIFYING": "Intensifying",
92
+ "CAPABLE OF PRODUCING A LANDSPOUT": "Landspout Possible",
93
93
  }
@@ -1,25 +1,25 @@
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 dict_testing: string[] = [
21
- `This is a test message`,
22
- `Monitoring message only.`,
23
- `THIS_MESSAGE_IS_FOR_TEST_PURPOSES_ONLY`,
24
- "TEST MESSAGE"
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 dict_testing: string[] = [
21
+ `This is a test message`,
22
+ `Monitoring message only.`,
23
+ `THIS_MESSAGE_IS_FOR_TEST_PURPOSES_ONLY`,
24
+ "TEST MESSAGE"
25
25
  ]
@@ -1,117 +1,117 @@
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 { TypeStanzaCompiled } from "../@types/type.compiled"
21
- import { TypePVTEC } from "../@types/type.pvtec";
22
- import { dict_icao } from "../@dictionaries/dictionaries.icao";
23
- import { bootstrap } from "../bootstrap";
24
- import { getEventTracking } from "../@building/building.tracking";
25
- import { pvExtract } from "../@parsers/@pvtec/pvtec.extract"
26
- import { getEventTags } from "../@building/building.tags";
27
- import { getTextFromProduct } from "../@parsers/@text/text.getTextFromProduct";
28
- import { setDebug } from "../@modules/@utilities/utilities.setDebug";
29
-
30
- export const api = async (stanza: TypeStanzaCompiled): Promise<void> => {
31
- const messages = Object.values(JSON.parse(stanza.message).features) as any;
32
- for (const feature of messages) {
33
- const tick = performance.now();
34
- const pVtec = pvExtract(feature?.properties?.parameters?.VTEC?.[0]) ?? null as TypePVTEC[]
35
- bootstrap.cache.processed.push({
36
- type: `Feature`,
37
- geometry: {
38
- type: `Point`,
39
- coordinates: []
40
- },
41
- properties: {
42
- event: feature?.properties?.event ?? null,
43
- parent: feature?.properties?.event ?? null,
44
- status: feature?.properties?.messageType ?? null,
45
- issued: feature?.properties?.sent ? new Date(feature?.properties?.sent).toISOString() : null,
46
- expires: feature?.properties?.expires ? new Date(feature?.properties?.expires).toISOString() : null,
47
- locations: feature?.properties?.areaDesc ?? null,
48
- locations_array: feature?.properties?.areaDesc ? feature?.properties?.areaDesc.split(';') : [],
49
- description: feature?.properties?.description ?? null,
50
- attributes: feature?.properties?.attributes ?? {},
51
- geocode: {
52
- office: {
53
- office: pVtec ? pVtec?.[0]?.tracking.split(`.`)[0] : null,
54
- name: dict_icao[pVtec ? pVtec?.[0]?.tracking.split(`.`)[0] : null] ?? null,
55
- },
56
- organization: feature?.properties?.parameters?.WMOidentifier?.[0],
57
- ugc: feature?.properties?.geocode?.UGC ?? [],
58
- polygon: feature?.geometry?.coordinates.length > 0 ? Buffer.from(JSON.stringify([feature?.geometry?.coordinates[0]])).toString('base64') : null,
59
- polygon_generated: feature?.geometry?.coordinates.length > 0 ? true : false,
60
- },
61
- parameters: {
62
- tags: getEventTags(feature?.properties?.description),
63
- instructions: feature?.properties?.instruction ?? null,
64
- source: getTextFromProduct({ message: feature?.properties?.description, find: [`SOURCE...`], removal: [`.`]}) ?? null,
65
- hazards: getTextFromProduct({ message: feature?.properties?.description, find: [`HAZARD...`], removal: [`.`]}) ?? null,
66
- impacts: getTextFromProduct({ message: feature?.properties?.description, find: [`IMPACT...`], removal: [`.`]}) ?? null,
67
- estimated_hail_size: feature?.properties?.parameters?.maxHailSize?.[0] ?? null,
68
- estimated_wind_gusts: feature?.properties?.parameters?.maxWindGust?.[0] ?? null,
69
- damage_threat: feature?.properties?.parameters?.thunderstormDamageThreat?.[0] ?? null,
70
- tornado_threat: feature?.properties?.parameters?.tornadoDetection?.[0] ?? null,
71
- flood_threat: feature?.properties?.parameters?.floodDetection?.[0] ?? null,
72
- wind_threat: feature?.properties?.parameters?.windThreat?.[0] ?? null,
73
- hail_threat: feature?.properties?.parameters?.hailThreat?.[0] ?? null,
74
- },
75
- discussion_parameters: {
76
- discussion_number: getTextFromProduct({ message: feature?.properties?.description, find: [`Mesoscale Discussion `], removal: [`Mesoscale Discussion`, `Number`, `...`] })?.toString()?.padStart(4, "0") ?? null,
77
- discussion_concerning: getTextFromProduct({ message: feature?.properties?.description, find: [`Concerning...`] }) ?? null,
78
- discussion_max_tornado: getTextFromProduct({ message: feature?.properties?.description, find: [`MOST PROBABLE PEAK TORNADO INTENSITY...`] }) ?? null,
79
- discussion_max_hail: getTextFromProduct({ message: feature?.properties?.description, find: [`MOST PROBABLE PEAK HAIL SIZE...`] }) ?? null,
80
- discussion_max_wind: getTextFromProduct({ message: feature?.properties?.description, find: [`MOST PROBABLE PEAK WIND GUST...`] }) ?? null,
81
- discussion_watch_issuance: getTextFromProduct({ message: feature?.properties?.description, find: [`Probability of Watch Issuance...`], removal: [`percent`]}) ?? null,
82
- },
83
- watch_parameters: {
84
- watch_number: (pVtec?.[0]?.is_watch) && (getTextFromProduct({ message: feature?.properties?.description, find: [`ITIES FOR`, `UPDATE FOR`, `Watch Number `], removal: [`%`, `<`, `:`] })?.replace(/(WT|WS|)/g, '')?.trim()?.toString()?.padStart(4, "0") ?? pVtec?.[0]?.tracking?.slice(-4)?.toString()?.padStart(4, "0") ?? null),
85
- watch_type: feature?.properties?.description.includes(`TORNADO WATCH`) ? `Tornado` : feature?.properties?.description.includes(`SEVERE`) ? `Severe` : null,
86
- additional_tornadoes_probability: getTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 2 OR MORE TORNADOES`], removal: [`%`, `<`, `:`] }) ?? null,
87
- strong_tornadoes_probability: getTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 1 OR MORE STRONG /EF2-EF5/ TORNADOES`], removal: [`%`, `<`, `:`] }) ?? null,
88
- severe_wind_probability: getTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 10 OR MORE SEVERE WIND EVENTS`], removal: [`%`, `<`, `:`] }) ?? null,
89
- severe_hail_probability: getTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 10 OR MORE SEVERE HAIL EVENTS`], removal: [`%`, `<`, `:`] }) ?? null,
90
- hail_2in_probability: getTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 1 OR MORE HAIL EVENTS >= 2 INCHES`], removal: [`%`, `<`, `:`] }) ?? null,
91
- combined_hail_wind_probability: getTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 6 OR MORE COMBINED SEVERE HAIL/WIND EVENTS`], removal: [`%`, `<`, `:`] }) ?? null,
92
- max_hail_in: getTextFromProduct({ message: feature?.properties?.description, find: [`MAX HAIL /INCHES/`], removal: [`%`, `<`, `:`] }) ?? null,
93
- max_wind_surface: getTextFromProduct({ message: feature?.properties?.description, find: [`MAX WIND GUSTS SURFACE /KNOTS/`], removal: [`%`, `<`, `:`] }) ?? null,
94
- max_tops_x100feet: getTextFromProduct({ message: feature?.properties?.description, find: [`MAX TOPS /X 100 FEET/`], removal: [`%`, `<`, `:`] }) ?? null,
95
- pds_watch: (getTextFromProduct({ message: feature?.properties?.description, find: [`PARTICULARLY DANGEROUS SITUATION`], removal: [`%`, `<`, `:`] }) === `YES`)
96
- },
97
- metadata: {
98
- ms: performance.now() - tick,
99
- source: `events.api`,
100
- tracking: getEventTracking({ type: `API`, organization: { wmoidentifier: feature?.properties?.parameters?.WMOidentifier?.[0], featureId: feature?.id}, vtec: pVtec?.[0]}),
101
- header: `ZCZC-ATMOSX-${feature?.properties?.parameters?.WMOidentifier}`,
102
- vtec: pVtec?.[0],
103
- hvtec: null,
104
- raw: feature?.properties?.description,
105
- history: [
106
- {
107
- description: feature?.properties?.description,
108
- issued: feature?.properties?.sent ? new Date(feature?.properties?.sent).toISOString() : null,
109
- status: feature?.properties?.messageType ?? null,
110
- }
111
- ]
112
- }
113
- }
114
- })
115
- setDebug({ title: `@events.api`, message: `Event process took ${performance.now() - tick} ms` })
116
- }
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 { TypeStanzaCompiled } from "../@types/type.compiled"
21
+ import { TypePVTEC } from "../@types/type.pvtec";
22
+ import { dict_icao } from "../@dictionaries/dictionaries.icao";
23
+ import { bootstrap } from "../bootstrap";
24
+ import { getEventTracking } from "../@building/building.tracking";
25
+ import { pvExtract } from "../@parsers/@pvtec/pvtec.extract"
26
+ import { getEventTags } from "../@building/building.tags";
27
+ import { getTextFromProduct } from "../@parsers/@text/text.getTextFromProduct";
28
+ import { setDebug } from "../@modules/@utilities/utilities.setDebug";
29
+
30
+ export const api = async (stanza: TypeStanzaCompiled): Promise<void> => {
31
+ const messages = Object.values(JSON.parse(stanza.message).features) as any;
32
+ for (const feature of messages) {
33
+ const tick = performance.now();
34
+ const pVtec = pvExtract(feature?.properties?.parameters?.VTEC?.[0]) ?? null as TypePVTEC[]
35
+ bootstrap.cache.processed.push({
36
+ type: `Feature`,
37
+ geometry: {
38
+ type: `Point`,
39
+ coordinates: []
40
+ },
41
+ properties: {
42
+ event: feature?.properties?.event ?? null,
43
+ parent: feature?.properties?.event ?? null,
44
+ status: feature?.properties?.messageType ?? null,
45
+ issued: feature?.properties?.sent ? new Date(feature?.properties?.sent).toISOString() : null,
46
+ expires: feature?.properties?.expires ? new Date(feature?.properties?.expires).toISOString() : null,
47
+ locations: feature?.properties?.areaDesc ?? null,
48
+ locations_array: feature?.properties?.areaDesc ? feature?.properties?.areaDesc.split(';') : [],
49
+ description: feature?.properties?.description ?? null,
50
+ attributes: feature?.properties?.attributes ?? {},
51
+ geocode: {
52
+ office: {
53
+ office: pVtec ? pVtec?.[0]?.tracking.split(`.`)[0] : null,
54
+ name: dict_icao[pVtec ? pVtec?.[0]?.tracking.split(`.`)[0] : null] ?? null,
55
+ },
56
+ organization: feature?.properties?.parameters?.WMOidentifier?.[0],
57
+ ugc: feature?.properties?.geocode?.UGC ?? [],
58
+ polygon: feature?.geometry?.coordinates.length > 0 ? Buffer.from(JSON.stringify([feature?.geometry?.coordinates[0]])).toString('base64') : null,
59
+ polygon_generated: feature?.geometry?.coordinates.length > 0 ? true : false,
60
+ },
61
+ parameters: {
62
+ tags: getEventTags(feature?.properties?.description),
63
+ instructions: feature?.properties?.instruction ?? null,
64
+ source: getTextFromProduct({ message: feature?.properties?.description, find: [`SOURCE...`], removal: [`.`]}) ?? null,
65
+ hazards: getTextFromProduct({ message: feature?.properties?.description, find: [`HAZARD...`], removal: [`.`]}) ?? null,
66
+ impacts: getTextFromProduct({ message: feature?.properties?.description, find: [`IMPACT...`], removal: [`.`]}) ?? null,
67
+ estimated_hail_size: feature?.properties?.parameters?.maxHailSize?.[0] ?? null,
68
+ estimated_wind_gusts: feature?.properties?.parameters?.maxWindGust?.[0] ?? null,
69
+ damage_threat: feature?.properties?.parameters?.thunderstormDamageThreat?.[0] ?? null,
70
+ tornado_threat: feature?.properties?.parameters?.tornadoDetection?.[0] ?? null,
71
+ flood_threat: feature?.properties?.parameters?.floodDetection?.[0] ?? null,
72
+ wind_threat: feature?.properties?.parameters?.windThreat?.[0] ?? null,
73
+ hail_threat: feature?.properties?.parameters?.hailThreat?.[0] ?? null,
74
+ },
75
+ discussion_parameters: {
76
+ discussion_number: getTextFromProduct({ message: feature?.properties?.description, find: [`Mesoscale Discussion `], removal: [`Mesoscale Discussion`, `Number`, `...`] })?.toString()?.padStart(4, "0") ?? null,
77
+ discussion_concerning: getTextFromProduct({ message: feature?.properties?.description, find: [`Concerning...`] }) ?? null,
78
+ discussion_max_tornado: getTextFromProduct({ message: feature?.properties?.description, find: [`MOST PROBABLE PEAK TORNADO INTENSITY...`] }) ?? null,
79
+ discussion_max_hail: getTextFromProduct({ message: feature?.properties?.description, find: [`MOST PROBABLE PEAK HAIL SIZE...`] }) ?? null,
80
+ discussion_max_wind: getTextFromProduct({ message: feature?.properties?.description, find: [`MOST PROBABLE PEAK WIND GUST...`] }) ?? null,
81
+ discussion_watch_issuance: getTextFromProduct({ message: feature?.properties?.description, find: [`Probability of Watch Issuance...`], removal: [`percent`]}) ?? null,
82
+ },
83
+ watch_parameters: {
84
+ watch_number: (pVtec?.[0]?.is_watch) && (getTextFromProduct({ message: feature?.properties?.description, find: [`ITIES FOR`, `UPDATE FOR`, `Watch Number `], removal: [`%`, `<`, `:`] })?.replace(/(WT|WS|)/g, '')?.trim()?.toString()?.padStart(4, "0") ?? pVtec?.[0]?.tracking?.slice(-4)?.toString()?.padStart(4, "0") ?? null),
85
+ watch_type: feature?.properties?.description.includes(`TORNADO WATCH`) ? `Tornado` : feature?.properties?.description.includes(`SEVERE`) ? `Severe` : null,
86
+ additional_tornadoes_probability: getTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 2 OR MORE TORNADOES`], removal: [`%`, `<`, `:`] }) ?? null,
87
+ strong_tornadoes_probability: getTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 1 OR MORE STRONG /EF2-EF5/ TORNADOES`], removal: [`%`, `<`, `:`] }) ?? null,
88
+ severe_wind_probability: getTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 10 OR MORE SEVERE WIND EVENTS`], removal: [`%`, `<`, `:`] }) ?? null,
89
+ severe_hail_probability: getTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 10 OR MORE SEVERE HAIL EVENTS`], removal: [`%`, `<`, `:`] }) ?? null,
90
+ hail_2in_probability: getTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 1 OR MORE HAIL EVENTS >= 2 INCHES`], removal: [`%`, `<`, `:`] }) ?? null,
91
+ combined_hail_wind_probability: getTextFromProduct({ message: feature?.properties?.description, find: [`PROB OF 6 OR MORE COMBINED SEVERE HAIL/WIND EVENTS`], removal: [`%`, `<`, `:`] }) ?? null,
92
+ max_hail_in: getTextFromProduct({ message: feature?.properties?.description, find: [`MAX HAIL /INCHES/`], removal: [`%`, `<`, `:`] }) ?? null,
93
+ max_wind_surface: getTextFromProduct({ message: feature?.properties?.description, find: [`MAX WIND GUSTS SURFACE /KNOTS/`], removal: [`%`, `<`, `:`] }) ?? null,
94
+ max_tops_x100feet: getTextFromProduct({ message: feature?.properties?.description, find: [`MAX TOPS /X 100 FEET/`], removal: [`%`, `<`, `:`] }) ?? null,
95
+ pds_watch: (getTextFromProduct({ message: feature?.properties?.description, find: [`PARTICULARLY DANGEROUS SITUATION`], removal: [`%`, `<`, `:`] }) === `YES`)
96
+ },
97
+ metadata: {
98
+ ms: performance.now() - tick,
99
+ source: `events.api`,
100
+ tracking: getEventTracking({ type: `API`, organization: { wmoidentifier: feature?.properties?.parameters?.WMOidentifier?.[0], featureId: feature?.id}, vtec: pVtec?.[0]}),
101
+ header: `ZCZC-ATMOSX-${feature?.properties?.parameters?.WMOidentifier}`,
102
+ vtec: pVtec?.[0],
103
+ hvtec: null,
104
+ raw: feature?.properties?.description,
105
+ history: [
106
+ {
107
+ description: feature?.properties?.description,
108
+ issued: feature?.properties?.sent ? new Date(feature?.properties?.sent).toISOString() : null,
109
+ status: feature?.properties?.messageType ?? null,
110
+ }
111
+ ]
112
+ }
113
+ }
114
+ })
115
+ setDebug({ title: `@events.api`, message: `Event process took ${performance.now() - tick} ms` })
116
+ }
117
117
  }