@atmosx/event-product-parser 3.0.63 → 3.0.75

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (164) hide show
  1. package/.github/docs/docs-functions.md +1 -1
  2. package/.github/docs/docs-general-configurations.md +1 -11
  3. package/.github/docs/docs-integrations.md +3 -2
  4. package/README.md +4 -4
  5. package/dist/cjs/index.cjs +3590 -623
  6. package/dist/esm/index.mjs +3589 -624
  7. package/package.json +11 -4
  8. package/src/bootstrap.ts +50 -33
  9. package/src/{@building → building}/CreateEvent.ts +10 -10
  10. package/src/{@building → building}/GetCleanedEvent.ts +2 -2
  11. package/src/{@building → building}/GetEventAttachments.ts +12 -10
  12. package/src/building/GetEventDirection.ts +28 -0
  13. package/src/{@building → building}/GetEventEnhancedName.ts +5 -6
  14. package/src/{@building → building}/GetEventGeometry.ts +19 -13
  15. package/src/{@building → building}/GetEventHeader.ts +4 -4
  16. package/src/{@building → building}/GetEventNodes.ts +16 -14
  17. package/src/{@building → building}/GetEventOffice.ts +5 -5
  18. package/src/building/GetEventPopulation.ts +58 -0
  19. package/src/{@building → building}/GetEventProperties.ts +23 -18
  20. package/src/{@building → building}/GetEventSignature.ts +8 -8
  21. package/src/{@building → building}/GetEventTags.ts +3 -3
  22. package/src/{@core/CreateListener.ts → building/GetEventTheme.ts} +8 -6
  23. package/src/{@building → building}/GetEventTracking.ts +6 -6
  24. package/src/{@modules/@eas/GenerateEASMessage.ts → components/audio/GenerateAudioMessage.ts} +32 -33
  25. package/src/{@modules/@eas → components/audio/components}/GetCleanDescription.ts +2 -2
  26. package/src/{@modules/@eas → components/audio/components}/GetFloatPCM16.ts +2 -2
  27. package/src/{@modules/@eas → components/audio/components}/GetMergedPCM16.ts +2 -2
  28. package/src/{@modules/@eas → components/audio/components}/GetPCM16.ts +2 -2
  29. package/src/{@modules/@eas → components/audio/components}/GetPCMToFloat.ts +2 -2
  30. package/src/{@modules/@eas → components/audio/components}/GetSampledPCM16.ts +2 -2
  31. package/src/{@modules/@eas → components/audio/components}/GetTTS.ts +5 -3
  32. package/src/{@modules/@eas → components/audio/components}/GetWavPCM16.ts +2 -2
  33. package/src/{@modules/@eas → components/audio/components}/SetAFSK.ts +2 -2
  34. package/src/{@modules/@eas → components/audio/components}/SetAsciiToBits.ts +2 -2
  35. package/src/{@modules/@eas → components/audio/components}/SetAttentionTone.ts +2 -2
  36. package/src/{@modules/@eas → components/audio/components}/SetNoise.ts +4 -4
  37. package/src/{@modules/@eas → components/audio/components}/SetRadioEffect.ts +4 -4
  38. package/src/{@modules/@eas → components/audio/components}/SetSameHeader.ts +5 -5
  39. package/src/{@modules/@utilities/SetWarning.ts → components/database/CreateQuery.ts} +18 -13
  40. package/src/{@modules/@database → components/database}/GetCachedEvents.ts +14 -9
  41. package/src/components/database/ImportBoundaries.ts +168 -0
  42. package/src/{@modules/@database → components/database}/ImportBroadcastify.ts +8 -17
  43. package/src/components/database/ImportCities.ts +87 -0
  44. package/src/{@modules/@database → components/database}/ImportShapefiles.ts +14 -16
  45. package/src/{@modules/@database → components/database}/ImportStanza.ts +13 -17
  46. package/src/components/database/InitializeDatabase.ts +71 -0
  47. package/src/components/images/GenerateGraphic.ts +242 -0
  48. package/src/components/images/components/CreateRectangle.ts +22 -0
  49. package/src/components/images/components/CreateText.ts +22 -0
  50. package/src/components/images/modules/CreateSVG.ts +37 -0
  51. package/src/components/images/modules/GetGeographicalBoundaries.ts +72 -0
  52. package/src/components/images/modules/GetGeographicalCities.ts +58 -0
  53. package/src/components/images/modules/GetGeographicalEvents.ts +48 -0
  54. package/src/components/images/modules/GetGeometryBounds.ts +82 -0
  55. package/src/components/images/modules/GetParsedBoundary.ts +58 -0
  56. package/src/components/images/modules/GetSVGPath.ts +53 -0
  57. package/src/components/images/modules/NormalizePolygon.ts +57 -0
  58. package/src/{@modules/@stanza → components/stanza}/GetAwipsType.ts +4 -4
  59. package/src/{@modules/@stanza → components/stanza}/ValidateStanza.ts +6 -6
  60. package/src/{@modules/@utilities → components/utilities}/CreateHttp.ts +2 -2
  61. package/src/{@parsers/@text → components/utilities}/GetEmbededText.ts +6 -4
  62. package/src/{@modules/@utilities → components/utilities}/GetFormattedTime.ts +2 -2
  63. package/src/{@modules/@utilities → components/utilities}/GetLatestIssuance.ts +2 -2
  64. package/src/{@modules/@utilities → components/utilities}/GetMatched.ts +2 -2
  65. package/src/{@modules/@utilities → components/utilities}/GetShapeNearestPoint.ts +2 -2
  66. package/src/{@parsers/@text → components/utilities}/GetStringText.ts +7 -7
  67. package/src/components/utilities/GetUnionPolygon.ts +36 -0
  68. package/src/{@modules/@utilities → components/utilities}/QueueManager.ts +2 -2
  69. package/src/{@modules/@utilities → components/utilities}/SetCronSchedule.ts +37 -25
  70. package/src/{@modules/@utilities → components/utilities}/SetDebug.ts +4 -4
  71. package/src/{@modules/@utilities → components/utilities}/SetEventEmit.ts +8 -7
  72. package/src/{@modules/@utilities → components/utilities}/SetSettings.ts +4 -4
  73. package/src/{@modules/@utilities → components/utilities}/SetSleep.ts +2 -2
  74. package/src/{@modules/@utilities → components/utilities}/SetTimeoutAction.ts +3 -3
  75. package/src/components/utilities/SetWarning.ts +47 -0
  76. package/src/{@modules/@xmpp → components/xmpp}/DeployXMPP.ts +12 -12
  77. package/src/{@modules/@xmpp → components/xmpp}/ErrorXMPP.ts +3 -3
  78. package/src/{@modules/@xmpp → components/xmpp}/OfflineXMPP.ts +4 -4
  79. package/src/{@modules/@xmpp → components/xmpp}/OnlineXMPP.ts +5 -5
  80. package/src/{@modules/@xmpp → components/xmpp}/ReconnectXMPP.ts +6 -6
  81. package/src/{@modules/@xmpp → components/xmpp}/StanzaXMPP.ts +8 -8
  82. package/src/{@core → core}/ClearEvents.ts +4 -4
  83. package/src/{@core → core}/GetEvents.ts +3 -3
  84. package/src/{@core → core}/GetNodes.ts +3 -3
  85. package/src/{@core → core}/GetRandomEvent.ts +3 -3
  86. package/src/{@core → core}/GetVersion.ts +3 -3
  87. package/src/{@core → core}/ManualEvent.ts +6 -6
  88. package/src/{@core → core}/QueryStanza.ts +9 -8
  89. package/src/{@core → core}/SetNode.ts +5 -5
  90. package/src/{@core → core}/StartService.ts +13 -12
  91. package/src/{@core → core}/StopService.ts +3 -3
  92. package/src/{@enums → enums}/AWIPS.ts +2 -2
  93. package/src/{@enums → enums}/Actions.ts +2 -2
  94. package/src/{@enums → enums}/Cancellation.ts +2 -2
  95. package/src/{@enums → enums}/Causes.ts +2 -2
  96. package/src/{@enums → enums}/Correlations.ts +2 -2
  97. package/src/{@enums → enums}/Enhanced.ts +4 -3
  98. package/src/{@enums → enums}/Events.ts +2 -2
  99. package/src/{@enums → enums}/Expressions.ts +2 -2
  100. package/src/{@enums → enums}/GlobalFilter.ts +2 -2
  101. package/src/{@enums → enums}/Hail.ts +2 -2
  102. package/src/{@enums → enums}/ICAO.ts +2 -2
  103. package/src/{@enums → enums}/Matches.ts +8 -3
  104. package/src/{@enums → enums}/Products.ts +2 -2
  105. package/src/{@enums → enums}/Records.ts +2 -2
  106. package/src/{@enums → enums}/Severity.ts +2 -2
  107. package/src/{@enums → enums}/Shapefiles.ts +2 -2
  108. package/src/{@enums → enums}/States.ts +68 -4
  109. package/src/{@enums → enums}/Status.ts +2 -2
  110. package/src/{@enums → enums}/Strings.ts +2 -2
  111. package/src/{@enums → enums}/Tags.ts +8 -3
  112. package/src/{@enums → enums}/Testing.ts +2 -2
  113. package/src/enums/Themes.ts +70 -0
  114. package/src/{@events → events}/ParseAPI.ts +28 -17
  115. package/src/{@events → events}/ParseText.ts +13 -11
  116. package/src/{@events → events}/ParseUGC.ts +15 -14
  117. package/src/{@events → events}/ParseVTEC.ts +18 -16
  118. package/src/index.ts +49 -32
  119. package/src/{@manager → manager}/MakeEvents.ts +16 -28
  120. package/src/{@manager → manager}/RemoveEvent.ts +9 -9
  121. package/src/{@manager → manager}/SetHash.ts +5 -5
  122. package/src/{@manager → manager}/UpdateEvents.ts +6 -6
  123. package/src/{@manager → manager}/UpdateNode.ts +6 -6
  124. package/src/{@manager → manager}/ValidateEvents.ts +31 -20
  125. package/src/{@parsers/@hvtec → parsers/hvtec}/HVExtract.ts +7 -7
  126. package/src/{@parsers/@text → parsers/text}/GetDescriptionFromProduct.ts +3 -3
  127. package/src/parsers/text/GetPolygonFromProduct.ts +71 -0
  128. package/src/{@parsers/@text → parsers/text}/GetTextFromProduct.ts +2 -2
  129. package/src/{@parsers/@ugc → parsers/ugc}/GetCache.ts +4 -4
  130. package/src/{@parsers/@ugc → parsers/ugc}/GetExpiry.ts +2 -2
  131. package/src/{@parsers/@ugc → parsers/ugc}/GetHeader.ts +3 -3
  132. package/src/{@parsers/@ugc → parsers/ugc}/GetLocations.ts +9 -9
  133. package/src/parsers/ugc/GetZonePolygon.ts +73 -0
  134. package/src/{@parsers/@ugc → parsers/ugc}/GetZones.ts +2 -2
  135. package/src/{@parsers/@ugc → parsers/ugc}/SetCache.ts +4 -4
  136. package/src/{@parsers/@ugc → parsers/ugc}/UGCExtract.ts +9 -9
  137. package/src/{@parsers/@vtec → parsers/vtec}/GetExpiry.ts +2 -2
  138. package/src/{@parsers/@vtec → parsers/vtec}/VTECExtract.ts +9 -9
  139. package/src/{@types-lower → static}/Attributes.ts +2 -3
  140. package/src/{@types-lower → static}/Event.ts +7 -6
  141. package/src/{@types-lower → static}/Properties.ts +17 -4
  142. package/src/{@types-lower → static}/Stanza.ts +3 -3
  143. package/src/{@tasks → tasks}/CreateTasks.ts +40 -34
  144. package/src/{@tasks → tasks}/TaskGenerateJSON.ts +2 -2
  145. package/src/{@tasks → tasks}/TaskGenerateText.ts +2 -2
  146. package/src/{@tasks → tasks}/TaskSendNTFY.ts +29 -25
  147. package/src/{@tasks → tasks}/TaskSendWebhook.ts +22 -15
  148. package/src/{@types → types}/Actions.ts +3 -3
  149. package/src/{@types → types}/HVTEC.ts +2 -2
  150. package/src/{@types → types}/Hash.ts +2 -2
  151. package/src/types/Nodes.ts +29 -0
  152. package/src/{@types → types}/Settings.ts +17 -8
  153. package/src/{@types → types}/StanzaCompiled.ts +3 -3
  154. package/src/{@types → types}/UGC.ts +2 -2
  155. package/src/{@types → types}/VTEC.ts +2 -2
  156. package/tools/build.js +2 -0
  157. package/tsconfig.json +25 -18
  158. package/src/@modules/@database/InitializeDatabase.ts +0 -59
  159. package/src/@modules/@utilities/GetSettings.ts +0 -25
  160. package/src/@modules/@utilities/SetListener.ts +0 -30
  161. package/src/@parsers/@text/GetPolygonFromProduct.ts +0 -53
  162. package/src/@parsers/@text/GetXML.ts +0 -61
  163. package/src/@parsers/@ugc/GetZonePolygon.ts +0 -111
  164. package/src/@tasks/TaskGenerateAudio.ts +0 -34
@@ -11,13 +11,13 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { Bootstrap } from "@bootstrap"
20
+ import { Bootstrap } from "@Bootstrap"
21
21
 
22
22
  export const ErrorXMPP = () => {
23
23
  Bootstrap.Session.on(`error`, async () => {
@@ -11,14 +11,14 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { Bootstrap } from "@bootstrap"
21
- import { SetEventEmit } from "@utilities/SetEventEmit"
20
+ import { Bootstrap } from "@Bootstrap"
21
+ import { SetEventEmit } from "@Utilities/SetEventEmit"
22
22
 
23
23
  export const OfflineXMPP = () => {
24
24
  Bootstrap.Session.on(`offline`, async () => {
@@ -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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { Bootstrap } from "@bootstrap"
21
- import { SetEventEmit } from "@utilities/SetEventEmit"
22
- import { xml } from "@xmpp/client"
20
+ import { Bootstrap } from "@Bootstrap"
21
+ import { SetEventEmit } from "@Utilities/SetEventEmit"
22
+ import { xml } from "@XMPP/client"
23
23
 
24
24
  export const OnlineXMPP = () => {
25
25
  const settings = Bootstrap.Settings;
@@ -11,16 +11,16 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { TypeSettings } from "types/Settings"
21
- import { Bootstrap } from "@bootstrap"
22
- import { SetEventEmit } from "@utilities/SetEventEmit"
23
- import { SetWarning } from "@utilities/SetWarning"
20
+ import { TypeSettings } from "Types/Settings"
21
+ import { Bootstrap } from "@Bootstrap"
22
+ import { SetEventEmit } from "@Utilities/SetEventEmit"
23
+ import { SetWarning } from "@Utilities/SetWarning"
24
24
 
25
25
  export const ReconnectXMPP = async (interval: number): Promise<void> => {
26
26
  const settings = Bootstrap.Settings as TypeSettings;
@@ -11,18 +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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { TypeStanza } from "types-lower/Stanza"
21
- import { Bootstrap } from "@bootstrap"
22
- import { ValidateStanza } from "@stanza/ValidateStanza"
23
- import { CreateEvent } from "@building/CreateEvent"
24
- import { ImportStanza } from "@database/ImportStanza"
25
- import { SetEventEmit } from "@utilities/SetEventEmit"
20
+ import { TypeStanza } from "StaticTypes/Stanza"
21
+ import { Bootstrap } from "@Bootstrap"
22
+ import { ValidateStanza } from "@Stanza/ValidateStanza"
23
+ import { CreateEvent } from "@Building/CreateEvent"
24
+ import { ImportStanza } from "@Database/ImportStanza"
25
+ import { SetEventEmit } from "@Utilities/SetEventEmit"
26
26
 
27
27
  export const StanzaXMPP = () => {
28
28
  Bootstrap.Session.on(`stanza`, async (stanza: TypeStanza) => {
@@ -11,14 +11,14 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { Bootstrap } from "@bootstrap"
21
- import { SetEventEmit } from "@utilities/SetEventEmit"
20
+ import { Bootstrap } from "@Bootstrap"
21
+ import { SetEventEmit } from "@Utilities/SetEventEmit"
22
22
 
23
23
  export const ClearEvents = (): void => {
24
24
  Bootstrap.Cache.Events.features = [];
@@ -11,13 +11,13 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { Bootstrap } from "@bootstrap"
20
+ import { Bootstrap } from "@Bootstrap"
21
21
 
22
22
  export const GetEvents = (): any => {
23
23
  return Bootstrap.Cache.Events
@@ -11,13 +11,13 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { Bootstrap } from "@bootstrap"
20
+ import { Bootstrap } from "@Bootstrap"
21
21
 
22
22
  export const GetNodes = (): any => {
23
23
  return Bootstrap.Cache.Nodes
@@ -11,13 +11,13 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { Bootstrap } from "@bootstrap"
20
+ import { Bootstrap } from "@Bootstrap"
21
21
 
22
22
  export const GetRandomEvent = (): any => {
23
23
  return Bootstrap.Cache.Events.features[Math.floor(Math.random() * Bootstrap.Cache.Events.features.length)]
@@ -11,13 +11,13 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { Bootstrap } from "@bootstrap"
20
+ import { Bootstrap } from "@Bootstrap"
21
21
 
22
22
  export const GetVersion = (): any => {
23
23
  return Bootstrap.Version
@@ -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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { EnumExpressions } from "@enums/Expressions"
21
- import { GetAwipsType } from "@stanza/GetAwipsType"
22
- import { CreateEvent } from "@building/CreateEvent"
20
+ import { EnumExpressions } from "@Enums/Expressions"
21
+ import { GetAwipsType } from "@Stanza/GetAwipsType"
22
+ import { CreateEvent } from "@Building/CreateEvent"
23
23
 
24
24
  interface CreateEventOptions {
25
25
  Message: string
@@ -49,7 +49,7 @@ export const ManualEvent = async ({ Message, Awipsid }: CreateEventOptions): Pro
49
49
  CapAreaDescription: isCapAreaDescription,
50
50
  Ignored: false,
51
51
  NWWS: true,
52
- getType
52
+ Type: getType,
53
53
  }
54
54
  await CreateEvent(result);
55
55
  }
@@ -11,14 +11,14 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { TypeStanza } from "types-lower/Stanza"
21
- import { Bootstrap } from "@bootstrap"
20
+ import { TypeStanza } from "StaticTypes/Stanza"
21
+ import { CreateQuery } from "@Database/CreateQuery"
22
22
 
23
23
  interface QueryStanzaOptions {
24
24
  Search: string
@@ -31,9 +31,10 @@ type QueryStanza = {
31
31
  }
32
32
 
33
33
  export const QueryStanza = async ({ Search, Max }: QueryStanzaOptions): Promise<TypeStanza[]> => {
34
- const get = await Bootstrap.Database.prepare(
35
- `SELECT * FROM stanzas WHERE stanza LIKE ? LIMIT ?`)
36
- .all(`%${Search}%`, Max ?? 100) as QueryStanza[];
37
- const events = get.map((row) => JSON.parse(row.stanza));
34
+ const query = CreateQuery({
35
+ Query: `SELECT * FROM stanzas WHERE stanza LIKE ? LIMIT ?`,
36
+ Parameters: [`%${Search}%`, Max ?? 100]
37
+ }) as QueryStanza[];
38
+ const events = query.map((row) => JSON.parse(row.stanza));
38
39
  return events as TypeStanza[];
39
40
  }
@@ -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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { Bootstrap } from "@bootstrap"
21
- import { SetWarning } from "@utilities/SetWarning"
22
- import { SetEventEmit } from "@utilities/SetEventEmit"
20
+ import { Bootstrap } from "@Bootstrap"
21
+ import { SetWarning } from "@Utilities/SetWarning"
22
+ import { SetEventEmit } from "@Utilities/SetEventEmit"
23
23
 
24
24
  interface GetNodeOptions {
25
25
  Identifier: string
@@ -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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
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"
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
30
  import { Cron } from "croner"
31
31
 
32
32
  export const StartService = async (configurations: TypeSettings): Promise<void> => {
@@ -38,6 +38,7 @@ export const StartService = async (configurations: TypeSettings): Promise<void>
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();
@@ -11,13 +11,13 @@
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19
 
20
- import { Bootstrap } from "@bootstrap"
20
+ import { Bootstrap } from "@Bootstrap"
21
21
 
22
22
  export const StopService = async (): Promise<void> => {
23
23
  if (Bootstrap.Ready) {
@@ -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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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 (TPROB)": { tornado: `POSSIBLE` },
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
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: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
15
 
16
- Internal Package: @atmosx/event-product-parser
16
+ Independent Package: @atmosx/event-product-parser
17
17
 
18
18
  */
19
19