@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
@@ -0,0 +1,129 @@
1
+ /*
2
+ _ _ _ __ __
3
+ /\ | | | | (_) \ \ / /
4
+ / \ | |_ _ __ ___ ___ ___ _ __ | |__ ___ _ __ _ ___ \ V /
5
+ / /\ \| __| '_ ` _ \ / _ \/ __| '_ \| '_ \ / _ \ '__| |/ __| > <
6
+ / ____ \ |_| | | | | | (_) \__ \ |_) | | | | __/ | | | (__ / . \
7
+ /_/ \_\__|_| |_| |_|\___/|___/ .__/|_| |_|\___|_| |_|\___/_/ \_\
8
+ | |
9
+ |_|
10
+
11
+ Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
12
+ Discord: https://atmosphericx-discord.scriptkitty.cafe
13
+ Ko-Fi: https://ko-fi.com/k3yomi
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
+
16
+ Independent Package: @atmosx/event-product-parser
17
+
18
+ */
19
+
20
+ import { TypeStanzaCompiled } from "Types/StanzaCompiled"
21
+ import { TypeVTEC } from "Types/VTEC"
22
+ import { EnumICAO } from "@Enums/ICAO"
23
+ import { Bootstrap } from "@Bootstrap"
24
+ import { GetEventTracking } from "@Building/GetEventTracking"
25
+ import { VTECExtract } from "@ParsingVTEC/VTECExtract"
26
+ import { GetEventTags } from "@Building/GetEventTags"
27
+ import { GetEventTheme } from "@Building/GetEventTheme"
28
+ import { GetEventDirection } from "@Building/GetEventDirection"
29
+ import { GetTextFromProduct } from "@ParsingText/GetTextFromProduct"
30
+ import { SetDebug } from "@Utilities/SetDebug"
31
+
32
+ export const ParseAPI = async (Stanza: TypeStanzaCompiled): Promise<void> => {
33
+ const messages = Object.values(JSON.parse(Stanza.Message).features) as any;
34
+ for (const feature of messages) {
35
+ const tick = performance.now();
36
+ const VTEC = VTECExtract(feature?.properties?.parameters?.VTEC?.[0]) ?? null as TypeVTEC[]
37
+ Bootstrap.Cache.Parsed.push({
38
+ type: `Feature`,
39
+ geometry: {
40
+ type: `Polygon`,
41
+ coordinates: []
42
+ },
43
+ properties: {
44
+ event: feature?.properties?.event ?? null,
45
+ parent: feature?.properties?.event ?? null,
46
+ status: feature?.properties?.messageType ?? null,
47
+ issued: feature?.properties?.sent ? new Date(feature?.properties?.sent).toISOString() : null,
48
+ expires: feature?.properties?.expires ? new Date(feature?.properties?.expires).toISOString() : null,
49
+ locations: feature?.properties?.areaDesc ?? null,
50
+ locations_array: feature?.properties?.areaDesc ? feature?.properties?.areaDesc.split('; ') : [],
51
+ regions: [...new Set(
52
+ feature?.properties?.geocode?.UGC?.map((ugc: string) => ugc.match(/^([A-Z]{2})[CZ](\d{3})$/)?.[1])
53
+ .filter(Boolean) ?? []
54
+ )] as string[],
55
+ regions_string: (() => {
56
+ const abbrs = [...new Set(feature?.properties?.geocode?.UGC?.map((l: string) => l.match(/^([A-Z]{2})[CZ](\d{3})$/)?.[1]).filter(Boolean) ?? [])];
57
+ return abbrs.length ? abbrs.join(`-`) : null;
58
+ })(),
59
+ description: feature?.properties?.description ?? null,
60
+ attributes: feature?.properties?.attributes ?? {},
61
+ theme: GetEventTheme(feature?.properties?.event),
62
+ geocode: {
63
+ office: {
64
+ office: VTEC ? VTEC?.[0]?.Tracking.split(`.`)[0] : null,
65
+ name: EnumICAO[VTEC ? VTEC?.[0]?.Tracking.split(`.`)[0] : null] ?? null,
66
+ },
67
+ organization: feature?.properties?.parameters?.WMOidentifier?.[0],
68
+ ugc: feature?.properties?.geocode?.UGC ?? [],
69
+ polygon: feature?.geometry?.coordinates.length > 0 ? Buffer.from(JSON.stringify([feature?.geometry?.coordinates[0]])).toString('base64') : null,
70
+ polygon_generated: feature?.geometry?.coordinates.length > 0 ? true : false,
71
+ },
72
+ parameters: {
73
+ tags: GetEventTags(feature?.properties?.description),
74
+ instructions: feature?.properties?.instruction ?? null,
75
+ source: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`SOURCE...`], Removal: [`.`]}) ?? null,
76
+ hazards: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`HAZARD...`], Removal: [`.`]}) ?? null,
77
+ impacts: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`IMPACT...`], Removal: [`.`]}) ?? null,
78
+ estimated_hail_size: feature?.properties?.parameters?.maxHailSize?.[0] ?? null,
79
+ estimated_wind_gusts: feature?.properties?.parameters?.maxWindGust?.[0] ?? null,
80
+ direction: GetEventDirection(feature?.properties?.description) ?? null,
81
+ damage_threat: feature?.properties?.parameters?.thunderstormDamageThreat?.[0] ?? null,
82
+ tornado_threat: feature?.properties?.parameters?.tornadoDetection?.[0] ?? null,
83
+ flood_threat: feature?.properties?.parameters?.flashFloodDamageThreat?.[0] ?? null,
84
+ wind_threat: feature?.properties?.parameters?.windThreat?.[0] ?? null,
85
+ hail_threat: feature?.properties?.parameters?.hailThreat?.[0] ?? null,
86
+ },
87
+ discussion_parameters: {
88
+ discussion_number: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`Mesoscale Discussion `], Removal: [`Mesoscale Discussion`, `Number`, `...`] })?.toString()?.padStart(4, "0") ?? null,
89
+ discussion_concerning: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`Concerning...`] }) ?? null,
90
+ discussion_max_tornado: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`MOST PROBABLE PEAK TORNADO INTENSITY...`] }) ?? null,
91
+ discussion_max_hail: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`MOST PROBABLE PEAK HAIL SIZE...`] }) ?? null,
92
+ discussion_max_wind: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`MOST PROBABLE PEAK WIND GUST...`] }) ?? null,
93
+ discussion_watch_issuance: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`Probability of Watch Issuance...`], Removal: [`percent`]}) ?? null,
94
+ },
95
+ watch_parameters: {
96
+ watch_number: (VTEC?.[0]?.Watch) && (GetTextFromProduct({ Message: feature?.properties?.description, Find: [`ITIES FOR`, `UPDATE FOR`, `Watch Number `], Removal: [`%`, `<`, `:`] })?.replace(/(WT|WS|)/g, '')?.trim()?.toString()?.padStart(4, "0") ?? VTEC?.[0]?.Tracking?.slice(-4)?.toString()?.padStart(4, "0") ?? null),
97
+ watch_type: feature?.properties?.description.includes(`TORNADO WATCH`) ? `Tornado` : feature?.properties?.description.includes(`SEVERE`) ? `Severe` : null,
98
+ additional_tornadoes_probability: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`PROB OF 2 OR MORE TORNADOES`], Removal: [`%`, `<`, `:`] }) ?? null,
99
+ strong_tornadoes_probability: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`PROB OF 1 OR MORE STRONG /EF2-EF5/ TORNADOES`], Removal: [`%`, `<`, `:`] }) ?? null,
100
+ severe_wind_probability: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`PROB OF 10 OR MORE SEVERE WIND EVENTS`], Removal: [`%`, `<`, `:`] }) ?? null,
101
+ severe_hail_probability: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`PROB OF 10 OR MORE SEVERE HAIL EVENTS`], Removal: [`%`, `<`, `:`] }) ?? null,
102
+ hail_2in_probability: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`PROB OF 1 OR MORE HAIL EVENTS >= 2 INCHES`], Removal: [`%`, `<`, `:`] }) ?? null,
103
+ combined_hail_wind_probability: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`PROB OF 6 OR MORE COMBINED SEVERE HAIL/WIND EVENTS`], Removal: [`%`, `<`, `:`] }) ?? null,
104
+ max_hail_in: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`MAX HAIL /INCHES/`], Removal: [`%`, `<`, `:`] }) ?? null,
105
+ max_wind_surface: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`MAX WIND GUSTS SURFACE /KNOTS/`], Removal: [`%`, `<`, `:`] }) ?? null,
106
+ max_tops_x100feet: GetTextFromProduct({ Message: feature?.properties?.description, Find: [`MAX TOPS /X 100 FEET/`], Removal: [`%`, `<`, `:`] }) ?? null,
107
+ pds_watch: (GetTextFromProduct({ Message: feature?.properties?.description, Find: [`PARTICULARLY DANGEROUS SITUATION`], Removal: [`%`, `<`, `:`] }) === `YES`)
108
+ },
109
+ metadata: {
110
+ ms: performance.now() - tick,
111
+ source: `events.api`,
112
+ tracking: GetEventTracking({ Type: `API`, WMO: { Identifier: feature?.properties?.parameters?.WMOidentifier?.[0], ID: feature?.id}, VTEC: VTEC?.[0]}),
113
+ header: `ZCZC-ATMOSX-${feature?.properties?.parameters?.WMOidentifier}`,
114
+ vtec: VTEC?.[0],
115
+ hvtec: null,
116
+ raw: feature?.properties?.description,
117
+ history: [
118
+ {
119
+ description: feature?.properties?.description,
120
+ issued: feature?.properties?.sent ? new Date(feature?.properties?.sent).toISOString() : null,
121
+ status: feature?.properties?.messageType ?? null,
122
+ }
123
+ ]
124
+ }
125
+ }
126
+ })
127
+ SetDebug({ Title: `ParseAPI`, Message: `${Math.round(performance.now() - tick)}ms` })
128
+ }
129
+ }
@@ -11,45 +11,52 @@
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 { TypeAttributes } from "../@types/types.attributes";
21
- import { TypeStanzaCompiled } from "../@types/types.compiled"
22
- import { TypeEvent } from "../@types/type.event";
23
- import { properties } from "../@building/building.properties";
24
- import { getEventHeader } from "../@building/building.headers";
25
- import { eventsMatchText } from "../@dictionaries/dictionaries.eventsMatchText";
26
- import { getEventTracking } from "../@building/building.tracking";
27
- import { validateEvents } from "../@building/building.validate";
20
+ import { TypeAttributes } from "StaticTypes/Attributes"
21
+ import { TypeStanzaCompiled } from "Types/StanzaCompiled"
22
+ import { EnumMatches } from "@Enums/Matches"
23
+ import { Bootstrap } from "@Bootstrap"
24
+ import { GetEventProperties } from "@Building/GetEventProperties"
25
+ import { GetEventHeader } from "@Building/GetEventHeader"
26
+ import { GetEventTracking } from "@Building/GetEventTracking"
27
+ import { GetEventTheme } from "@Building/GetEventTheme"
28
+ import { SetDebug } from "@Utilities/SetDebug"
28
29
 
29
- export const text = async (stanza: TypeStanzaCompiled): Promise<void> => {
30
- let processed: TypeEvent[] = [];
31
- const getMessages = stanza?.message
30
+ export const ParseText = async (Stanza: TypeStanzaCompiled): Promise<void> => {
31
+ const getMessages = Stanza?.Message
32
32
  ?.split(/(?=\$\$)/g)
33
33
  ?.map(message => message.trim())
34
34
  ?.filter(message => message && message !== "$$");
35
35
  if (!getMessages || getMessages?.length == 0 ) return;
36
36
  for (const message of getMessages) {
37
37
  const tick = performance.now();
38
- const attributes = stanza?.attributes as TypeAttributes
39
- const props = properties({ message, attributes })
40
- const header = getEventHeader({properties: props, getType: stanza.getType})
38
+ const attributes = Stanza?.Attributes as TypeAttributes
39
+ const props = GetEventProperties({ Message: message, Attributes: attributes })
40
+ const header = GetEventHeader({ Properties: props, VTEC: null, Type: Stanza.Type })
41
41
  const issued = new Date(attributes.issue)
42
42
  const expires = new Date(issued.getTime() + 12 * 60 * 60 * 1000)
43
- let event = Object.keys(eventsMatchText).find(event => message.toLowerCase().includes(event.toLowerCase()));
44
- let isStatement = false;
43
+ const matches = EnumMatches[Stanza.Type.Prefix]?.find(match => match.match.test(message.toUpperCase()));
44
+
45
+ let event = matches?.label;
46
+ let isStatement = matches?.statement ?? false;
47
+
45
48
  if (!event) {
46
- event = stanza.getType.type.split(`-`).map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(` `)
49
+ event = Stanza.Type.Type;
50
+ if (!Stanza.Type.Discovered) {
51
+ event += ` (AWIPSID)`
52
+ }
47
53
  isStatement = true;
48
54
  }
49
- processed.push({
55
+
56
+ Bootstrap.Cache.Parsed.push({
50
57
  type: `Feature`,
51
58
  geometry: {
52
- type: `Point`,
59
+ type: `Polygon`,
53
60
  coordinates: []
54
61
  },
55
62
  properties: {
@@ -58,14 +65,16 @@ export const text = async (stanza: TypeStanzaCompiled): Promise<void> => {
58
65
  status: isStatement ? `Statement` : `Issued`,
59
66
  issued: (!isNaN(issued.getTime())) ? issued.toISOString() : new Date().toISOString(),
60
67
  expires: isStatement ? new Date(issued.getTime() + 120 * 1000).toISOString() : (!isNaN(expires.getTime())) ? expires.toISOString() : new Date(Date.now() + 60 * 60 * 1000).toISOString(),
68
+ theme: GetEventTheme(event),
61
69
  ...props,
62
70
  metadata: {
63
71
  ms: performance.now() - tick,
64
72
  source: `events.text`,
65
- tracking: getEventTracking({ type: `RAW`, stanza, attributes, properties: props }),
73
+ tracking: GetEventTracking({ Type: `RAW`, Stanza, Attributes: attributes, Properties: props }),
66
74
  header: header,
67
75
  vtec: null,
68
76
  hvtec: null,
77
+ raw: message,
69
78
  history: [
70
79
  {
71
80
  description: props.description,
@@ -76,6 +85,6 @@ export const text = async (stanza: TypeStanzaCompiled): Promise<void> => {
76
85
  }
77
86
  }
78
87
  })
88
+ SetDebug({ Title: `ParseText`, Message: `${Math.round(performance.now() - tick)}ms` })
79
89
  }
80
- validateEvents(processed)
81
90
  }
@@ -11,48 +11,56 @@
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 { TypeAttributes } from "../@types/types.attributes";
21
- import { TypeStanzaCompiled } from "../@types/types.compiled"
22
- import { TypeEvent } from "../@types/type.event";
23
- import { eventsMatchText } from "../@dictionaries/dictionaries.eventsMatchText";
24
- import { ugcExtract } from "../@parsers/@ugc/ugc.extract";
25
- import { properties } from "../@building/building.properties";
26
- import { getEventHeader } from "../@building/building.headers";
27
- import { getEventTracking } from "../@building/building.tracking";
28
- import { validateEvents } from "../@building/building.validate";
20
+ import { TypeAttributes } from "StaticTypes/Attributes"
21
+ import { TypeStanzaCompiled } from "Types/StanzaCompiled"
22
+ import { EnumMatches } from "@Enums/Matches"
23
+ import { Bootstrap } from "@Bootstrap"
24
+ import { UGCExtract } from "@ParsingUGC/UGCExtract"
25
+ import { GetEventProperties } from "@Building/GetEventProperties"
26
+ import { GetEventHeader } from "@Building/GetEventHeader"
27
+ import { GetEventTracking } from "@Building/GetEventTracking"
28
+ import { GetEventTheme } from "@Building/GetEventTheme"
29
+ import { SetDebug } from "@Utilities/SetDebug"
29
30
 
30
- export const ugc = async (stanza: TypeStanzaCompiled): Promise<void> => {
31
- let processed: TypeEvent[] = [];
32
- const getMessages = stanza?.message
31
+ export const ParseUGC = async (Stanza: TypeStanzaCompiled): Promise<void> => {
32
+ const getMessages = Stanza?.Message
33
33
  ?.split(/(?=\$\$)/g)
34
34
  ?.map(message => message.trim())
35
35
  ?.filter(message => message && message !== "$$");
36
36
  if (!getMessages || getMessages?.length == 0 ) return;
37
37
  for (const message of getMessages) {
38
38
  const tick = performance.now();
39
- const attributes = stanza?.attributes as TypeAttributes
40
- const ugc = await ugcExtract(message)
39
+ const attributes = Stanza?.Attributes as TypeAttributes
40
+ const ugc = await UGCExtract(message)
41
+
41
42
  if (ugc != null ) {
42
- const props = properties({ message, attributes, ugc: ugc })
43
+ const props = GetEventProperties({ Message: message, Attributes: attributes, UGC: ugc })
43
44
  const issued = new Date(attributes.issue)
44
- const expires = new Date(ugc.expires)
45
- const header = getEventHeader({properties: props, getType: stanza.getType })
46
- let event = Object.keys(eventsMatchText).find(event => message.toLowerCase().includes(event.toLowerCase()));
47
- let isStatement = false;
45
+ const expires = new Date(ugc.Expires)
46
+ const header = GetEventHeader({ Properties: props, VTEC: null, Type: Stanza.Type })
47
+ const matches = EnumMatches[Stanza.Type.Prefix]?.find(match => match.match.test(message.toUpperCase()));
48
+
49
+ let event = matches?.label;
50
+ let isStatement = matches?.statement ?? false;
51
+
48
52
  if (!event) {
49
- event = stanza.getType.type.split(`-`).map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(` `)
53
+ event = Stanza.Type.Type;
54
+ if (!Stanza.Type.Discovered) {
55
+ event += ` (AWIPSID)`
56
+ }
50
57
  isStatement = true;
51
58
  }
52
- processed.push({
59
+
60
+ Bootstrap.Cache.Parsed.push({
53
61
  type: `Feature`,
54
62
  geometry: {
55
- type: `Point`,
63
+ type: `Polygon`,
56
64
  coordinates: []
57
65
  },
58
66
  properties: {
@@ -61,14 +69,16 @@ export const ugc = async (stanza: TypeStanzaCompiled): Promise<void> => {
61
69
  status: isStatement ? `Statement` : `Issued`,
62
70
  issued: (!isNaN(issued.getTime())) ? issued.toISOString() : new Date().toISOString(),
63
71
  expires: isStatement ? new Date(issued.getTime() + 120 * 1000).toISOString() : (!isNaN(expires.getTime())) ? expires.toISOString() : new Date(Date.now() + 60 * 60 * 1000).toISOString(),
72
+ theme: GetEventTheme(event),
64
73
  ...props,
65
74
  metadata: {
66
75
  ms: performance.now() - tick,
67
76
  source: `events.ugc`,
68
- tracking: getEventTracking({ type: `RAW`, stanza, attributes, properties: props }),
77
+ tracking: GetEventTracking({ Type: `RAW`, Stanza, Attributes: attributes, Properties: props }),
69
78
  header: header,
70
79
  vtec: null,
71
80
  hvtec: null,
81
+ raw: message,
72
82
  history: [
73
83
  {
74
84
  description: props.description,
@@ -79,7 +89,7 @@ export const ugc = async (stanza: TypeStanzaCompiled): Promise<void> => {
79
89
  }
80
90
  }
81
91
  })
92
+ SetDebug({ Title: `ParseUGC`, Message: `${Math.round(performance.now() - tick)}ms` })
82
93
  }
83
94
  }
84
- validateEvents(processed)
85
95
  }
@@ -0,0 +1,88 @@
1
+ /*
2
+ _ _ _ __ __
3
+ /\ | | | | (_) \ \ / /
4
+ / \ | |_ _ __ ___ ___ ___ _ __ | |__ ___ _ __ _ ___ \ V /
5
+ / /\ \| __| '_ ` _ \ / _ \/ __| '_ \| '_ \ / _ \ '__| |/ __| > <
6
+ / ____ \ |_| | | | | | (_) \__ \ |_) | | | | __/ | | | (__ / . \
7
+ /_/ \_\__|_| |_| |_|\___/|___/ .__/|_| |_|\___|_| |_|\___/_/ \_\
8
+ | |
9
+ |_|
10
+
11
+ Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
12
+ Discord: https://atmosphericx-discord.scriptkitty.cafe
13
+ Ko-Fi: https://ko-fi.com/k3yomi
14
+ Documentation: https://atmosphericx.scriptkitty.cafe/documentation
15
+
16
+ Independent Package: @atmosx/event-product-parser
17
+
18
+ */
19
+
20
+ import { TypeAttributes } from "StaticTypes/Attributes"
21
+ import { TypeStanzaCompiled } from "Types/StanzaCompiled"
22
+ import { TypeVTEC } from "Types/VTEC"
23
+ import { TypeHVTEC } from "Types/HVTEC"
24
+ import { Bootstrap } from "@Bootstrap"
25
+ import { VTECExtract } from "@ParsingVTEC/VTECExtract"
26
+ import { HVExtract } from "@ParsingHVTEC/HVExtract"
27
+ import { UGCExtract } from "@ParsingUGC/UGCExtract"
28
+ import { GetEventProperties } from "@Building/GetEventProperties"
29
+ import { GetEventHeader } from "@Building/GetEventHeader"
30
+ import { GetEventTracking } from "@Building/GetEventTracking"
31
+ import { GetEventTheme } from "@Building/GetEventTheme"
32
+ import { SetDebug } from "@Utilities/SetDebug"
33
+
34
+ export const ParseVTEC = async (Stanza: TypeStanzaCompiled): Promise<void> => {
35
+ const getMessages = Stanza?.Message
36
+ ?.split(/(?=\$\$)/g)
37
+ ?.map(message => message.trim())
38
+ ?.filter(message => message && message !== "$$");
39
+ if (!getMessages || getMessages?.length == 0 ) return;
40
+ for (const message of getMessages) {
41
+ const tick = performance.now();
42
+ const attributes = Stanza?.Attributes as TypeAttributes
43
+ const VTEC = VTECExtract(message) as TypeVTEC[];
44
+ const hVTEC = HVExtract(message) as TypeHVTEC[];
45
+ const ugc = await UGCExtract(message)
46
+ if (VTEC != null && ugc != null ) {
47
+ for (const vtec of VTEC) {
48
+ const props = GetEventProperties({ Message: message, Attributes: attributes, UGC: ugc, VTEC: vtec })
49
+ const header = GetEventHeader({ Properties: props, VTEC: vtec, Type: Stanza.Type })
50
+ const issued = new Date(attributes.issue)?? new Date()
51
+ const expires = new Date(vtec.Expires)
52
+ Bootstrap.Cache.Parsed.push({
53
+ type: `Feature`,
54
+ geometry: {
55
+ type: `Polygon`,
56
+ coordinates: []
57
+ },
58
+ properties: {
59
+ event: vtec.Event,
60
+ parent: vtec.Event,
61
+ status: vtec.Status,
62
+ issued: (!isNaN(issued.getTime())) ? issued.toISOString() : new Date().toISOString(),
63
+ expires: (!isNaN(expires.getTime())) ? expires.toISOString() : ugc.Expires ?? new Date(issued.getTime() + 60 * 60 * 1000).toISOString(),
64
+ theme: GetEventTheme(vtec.Event),
65
+ ...props,
66
+ metadata: {
67
+ ms: performance.now() - tick,
68
+ source: `events.vtec`,
69
+ tracking: GetEventTracking({ Type: `VTEC`, Stanza, Attributes: attributes, Properties: props, VTEC: vtec }),
70
+ header: header,
71
+ vtec: vtec,
72
+ hvtec: hVTEC,
73
+ raw: message,
74
+ history: [
75
+ {
76
+ description: props.description,
77
+ issued: (!isNaN(issued.getTime())) ? issued.toISOString() : new Date().toISOString(),
78
+ status: vtec.Status
79
+ }
80
+ ]
81
+ }
82
+ }
83
+ })
84
+ SetDebug({ Title: `ParseVTEC`, Message: `${Math.round(performance.now() - tick)}ms` })
85
+ }
86
+ }
87
+ }
88
+ }
package/src/index.ts CHANGED
@@ -11,62 +11,84 @@
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/types.settings'
21
- import { setSettings } from "./@modules/@utilities/utilities.setSettings"
22
- import { getEventGeometry } from "./@building/building.geometry";
23
- import { getCleanedEvent } from "./@building/building.clean"
24
- import { setEventEmit } from './@modules/@utilities/utilities.setEventEmit';
25
- import { setWarning } from './@modules/@utilities/utilities.setWarning';
26
- import { createListener } from "./@core/core.createListener"
27
- import { startService } from "./@core/core.start"
28
- import { stopService } from "./@core/core.stop"
29
- import { setEasTone } from './@modules/@eas/eas.setEasTone';
30
- import { setNode } from "./@core/core.setNode"
31
- import { getEvents } from "./@core/core.getEvents"
32
- import { getNodes } from "./@core/core.getNodes"
33
- import { getRandomEvent } from './@core/core.getRandomEvent';
34
- import { clearEvents } from './@core/core.clearEvents';
20
+ import { TypeSettings } from "Types/Settings"
21
+ import { Bootstrap } from "@Bootstrap"
22
+ import { GetEventGeometry } from "@Building/GetEventGeometry"
23
+ import { GetCleanedEvent } from "@Building/GetCleanedEvent"
24
+ import { SetSettings } from "@Utilities/SetSettings"
25
+ import { SetEventEmit } from "@Utilities/SetEventEmit"
26
+ import { SetWarning } from "@Utilities/SetWarning"
27
+ import { GenerateAudioMessage } from "@Audio/GenerateAudioMessage"
28
+ import { GenerateGraphic } from "@Image/GenerateGraphic"
29
+ import { SetNode } from "@Core/SetNode"
30
+ import { GetEvents } from "@Core/GetEvents"
31
+ import { GetNodes } from "@Core/GetNodes"
32
+ import { ManualEvent } from "@Core/ManualEvent"
33
+ import { GetRandomEvent } from "@Core/GetRandomEvent"
34
+ import { QueryStanza } from "@Core/QueryStanza"
35
+ import { ClearEvents } from "@Core/ClearEvents"
36
+ import { StartService } from "@Core/StartService"
37
+ import { StopService } from "@Core/StopService"
38
+ import { GetVersion } from "@Core/GetVersion"
39
+
35
40
 
36
41
  export class Manager {
37
- constructor(settings: TypeSettings) { this.trycatch(); startService(settings) }
42
+ public constructor(settings: TypeSettings) {
43
+ this.ErrorHandler(); StartService(settings)
44
+ }
38
45
 
39
- on(event: string, callback: () => void) {
40
- createListener(event, callback)
46
+ public on(event: string, callback: () => void) {
47
+ Bootstrap.Listener.on(event, callback)
48
+ return () => { void Bootstrap.Listener.off(event, callback) };
41
49
  }
42
50
 
43
- trycatch() {
44
- process.on('uncaughtException', (err: any) => {
45
- const ignored = ['ETIMEDOUT', 'ECONNRESET', 'EHOSTUNREACH', 'ENOTFOUND', 'ECONNREFUSED', 'EPIPE', 'EADDRINUSE', 'EALREADY', 'EACCES', 'EAGAIN', 'EHOSTDOWN', 'STARTTLS_FAILURE'];
46
- if (ignored.includes(err?.code)) {
47
- setEventEmit({
48
- event: `onServiceStatus`,
49
- metadata: {
50
- message: `Ignored Critical Error: ${err?.code ?? 'Unknown error code'}. This may indicate a connection issue. Attempting to continue...`,
51
- data: {},
52
- type: `error`,
53
- error: true
51
+ private ErrorHandler() {
52
+ process.on('uncaughtException', (error: any) => {
53
+ const _IGNORED = [
54
+ 'ETIMEDOUT',
55
+ 'ECONNRESET',
56
+ 'EHOSTUNREACH',
57
+ 'ENOTFOUND',
58
+ 'ECONNREFUSED',
59
+ 'EPIPE',
60
+ 'EADDRINUSE',
61
+ 'EALREADY',
62
+ 'EACCES',
63
+ 'EAGAIN',
64
+ 'EHOSTDOWN',
65
+ 'STARTTLS_FAILURE'
66
+ ];
67
+ if (_IGNORED.includes(error?.code)) {
68
+ SetEventEmit({
69
+ Event: `onServiceStatus`,
70
+ Metadata: {
71
+ Message: `Ignored Critical Error: ${error?.code ?? 'Unknown error code'}. This may indicate a connection issue. Attempting to continue...`,
72
+ Data: {},
73
+ Type: `error`,
74
+ Error: true
54
75
  }
55
76
  })
56
- return;
57
77
  }
58
- setWarning({message: `Uncaught Exception: ${err instanceof Error ? err.stack || err.message : String(err)}`})
78
+ console.log(`Uncaught Exception: ${error instanceof Error ? error.stack ?? error.message : String(error)}`);
79
+ SetWarning({Message: `Uncaught Exception: ${error instanceof Error ? error.stack ?? error.message : String(error)}`})
59
80
  })
60
81
  }
61
82
  }
62
83
 
63
84
  export default Manager;
64
- export type { TypeEvent } from './@types/type.event';
85
+ export type { TypeEvent } from "StaticTypes/Event"
65
86
  export {
66
- setSettings, getEventGeometry,
67
- getCleanedEvent, stopService, clearEvents,
68
- startService, setNode, getRandomEvent,
69
- getEvents, getNodes, setEasTone
87
+ SetSettings, GetEventGeometry, ManualEvent,
88
+ GetCleanedEvent, StopService, ClearEvents,
89
+ StartService, SetNode, GetRandomEvent, GetVersion,
90
+ GetEvents, GetNodes, GenerateAudioMessage, GenerateGraphic,
91
+ QueryStanza
70
92
  }
71
93
 
72
94