@atmosx/event-product-parser 3.0.0 → 3.0.2

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 (121) hide show
  1. package/README.md +307 -5
  2. package/dist/cjs/index.cjs +10253 -262
  3. package/dist/esm/index.mjs +10250 -262
  4. package/dist/index.d.mts +238 -0
  5. package/dist/index.d.ts +238 -0
  6. package/package.json +4 -3
  7. package/src/@building/building.clean.ts +1 -1
  8. package/src/@building/building.create.ts +1 -1
  9. package/src/@building/building.enhance.ts +1 -1
  10. package/src/@building/building.geometry.ts +7 -1
  11. package/src/@building/building.headers.ts +1 -1
  12. package/src/@building/building.office.ts +1 -1
  13. package/src/@building/building.polygon.ts +1 -1
  14. package/src/@building/building.properties.ts +1 -1
  15. package/src/@building/building.signature.ts +11 -27
  16. package/src/@building/building.tags.ts +1 -1
  17. package/src/@building/building.tracking.ts +1 -1
  18. package/src/@building/building.validate.ts +19 -4
  19. package/src/@core/{core.callback.ts → core.clearEvents.ts} +9 -16
  20. package/src/@core/{core.listener.ts → core.createListener.ts} +2 -2
  21. package/src/@core/core.getEvents.ts +1 -1
  22. package/src/@core/core.getNodes.ts +1 -1
  23. package/src/@core/core.getRandomEvent.ts +25 -0
  24. package/src/@core/core.getVersion.ts +25 -0
  25. package/src/@core/core.setNode.ts +2 -2
  26. package/src/@core/core.start.ts +12 -5
  27. package/src/@core/core.stop.ts +1 -1
  28. package/src/@dictionaries/dictionaries.betterEventNames.ts +5 -1
  29. package/src/@dictionaries/dictionaries.eventActions.ts +1 -1
  30. package/src/@dictionaries/dictionaries.eventAwipAbreviations.ts +2 -2
  31. package/src/@dictionaries/dictionaries.eventCancelMessages.ts +2 -1
  32. package/src/@dictionaries/dictionaries.eventCauses.ts +1 -1
  33. package/src/@dictionaries/dictionaries.eventProducts.ts +1 -1
  34. package/src/@dictionaries/dictionaries.eventRecords.ts +1 -1
  35. package/src/@dictionaries/dictionaries.eventSeverity.ts +1 -1
  36. package/src/@dictionaries/dictionaries.eventStatus.ts +1 -1
  37. package/src/@dictionaries/dictionaries.eventTags.ts +1 -1
  38. package/src/@dictionaries/dictionaries.eventTypes.ts +1 -1
  39. package/src/@dictionaries/dictionaries.eventsOffshore.ts +1 -1
  40. package/src/@dictionaries/dictionaries.hailStrings.ts +3 -1
  41. package/src/@dictionaries/dictionaries.officeICAOs.ts +1 -1
  42. package/src/@dictionaries/dictionaries.regExp.ts +1 -1
  43. package/src/@dictionaries/dictionaries.shapefileLinks.ts +1 -1
  44. package/src/@dictionaries/dictionaries.statusCorrelationText.ts +14 -12
  45. package/src/@dictionaries/{dictionaries.test_signatures.ts → dictionaries.testSignatures.ts} +3 -2
  46. package/src/@dictionaries/dictionaries.transcribedMessageReplacements.ts +1 -1
  47. package/src/@events/events.api.ts +1 -1
  48. package/src/@events/events.text.ts +5 -3
  49. package/src/@events/events.ugc.ts +3 -3
  50. package/src/@events/events.vtec.ts +5 -5
  51. package/src/@manager/manager.mkEvent.ts +54 -38
  52. package/src/@manager/manager.rmEvent.ts +6 -1
  53. package/src/@manager/manager.setHash.ts +2 -2
  54. package/src/@manager/manager.updateEvents.ts +35 -0
  55. package/src/@manager/manager.updateNodes.ts +10 -6
  56. package/src/@manager/manager.updateWebhooks.ts +50 -0
  57. package/src/@modules/@database/database.cache.ts +1 -1
  58. package/src/@modules/@database/database.init.ts +1 -1
  59. package/src/@modules/@database/database.shapefiles.ts +2 -3
  60. package/src/@modules/@database/database.stanza.ts +2 -1
  61. package/src/@modules/@eas/eas.getFloatPCM16.ts +29 -0
  62. package/src/@modules/@eas/eas.getMergedPCM16.ts +32 -0
  63. package/src/@modules/@eas/eas.getPCM16.ts +52 -0
  64. package/src/@modules/@eas/eas.getPCMToFloat.ts +26 -0
  65. package/src/@modules/@eas/eas.getSampledPCM16.ts +36 -0
  66. package/src/@modules/@eas/eas.getWavPCM16.ts +52 -0
  67. package/src/@modules/@eas/eas.setAFSK.ts +52 -0
  68. package/src/@modules/@eas/eas.setAsciiToBits.ts +32 -0
  69. package/src/@modules/@eas/eas.setAttentionTone.ts +40 -0
  70. package/src/@modules/@eas/eas.setEasTone.ts +137 -0
  71. package/src/@modules/@eas/eas.setNoise.ts +31 -0
  72. package/src/@modules/@eas/eas.setRadioEffect.ts +49 -0
  73. package/src/@modules/@eas/eas.setSameHeader.ts +45 -0
  74. package/src/@modules/@stanza/stanza.getAwipsType.ts +1 -1
  75. package/src/@modules/@stanza/stanza.validate.ts +1 -1
  76. package/src/@modules/@utilities/utilities.createHttp.ts +17 -7
  77. package/src/@modules/@utilities/utilities.createWebhook.ts +100 -0
  78. package/src/@modules/@utilities/utilities.getFormattedTime.ts +1 -1
  79. package/src/@modules/@utilities/utilities.getSettings.ts +1 -1
  80. package/src/@modules/@utilities/utilities.getShapeNearestPoint.ts +1 -1
  81. package/src/@modules/@utilities/utilities.setCronSchedule.ts +31 -4
  82. package/src/@modules/@utilities/utilities.setEventEmit.ts +1 -1
  83. package/src/@modules/@utilities/utilities.setListener.ts +3 -3
  84. package/src/@modules/@utilities/utilities.setSettings.ts +1 -1
  85. package/src/@modules/@utilities/utilities.setSleep.ts +3 -3
  86. package/src/@modules/@utilities/utilities.setTimeoutAction.ts +4 -4
  87. package/src/@modules/@utilities/utilities.setWarning.ts +3 -3
  88. package/src/@modules/@xmpp/xmpp.xDeploy.ts +2 -2
  89. package/src/@modules/@xmpp/xmpp.xError.ts +1 -10
  90. package/src/@modules/@xmpp/xmpp.xOffline.ts +2 -2
  91. package/src/@modules/@xmpp/xmpp.xOnline.ts +3 -19
  92. package/src/@modules/@xmpp/xmpp.xReconnect.ts +7 -2
  93. package/src/@modules/@xmpp/xmpp.xStanza.ts +3 -3
  94. package/src/@parsers/@hvtec/hvtec.extract.ts +1 -1
  95. package/src/@parsers/@pvtec/pvtec.expires.ts +1 -1
  96. package/src/@parsers/@pvtec/pvtec.extract.ts +3 -4
  97. package/src/@parsers/@text/text.getDescriptionFromProduct.ts +1 -1
  98. package/src/@parsers/@text/text.getPolygonFromProduct.ts +1 -1
  99. package/src/@parsers/@text/text.getTextFromProduct.ts +1 -1
  100. package/src/@parsers/@text/text.getXML.ts +1 -1
  101. package/src/@parsers/@ugc/ugc.coordinates.ts +1 -1
  102. package/src/@parsers/@ugc/ugc.expiry.ts +1 -1
  103. package/src/@parsers/@ugc/ugc.extract.ts +1 -1
  104. package/src/@parsers/@ugc/ugc.header.ts +1 -1
  105. package/src/@parsers/@ugc/ugc.locations.ts +1 -1
  106. package/src/@parsers/@ugc/ugc.zones.ts +1 -1
  107. package/src/@types/type.event.ts +13 -12
  108. package/src/@types/type.properties.ts +1 -1
  109. package/src/@types/types.attributes.ts +1 -1
  110. package/src/@types/types.compiled.ts +1 -1
  111. package/src/@types/types.hash.ts +1 -1
  112. package/src/@types/types.hvtec.ts +1 -1
  113. package/src/@types/types.pvtec.ts +2 -1
  114. package/src/@types/types.settings.ts +10 -5
  115. package/src/@types/types.stanza.ts +1 -1
  116. package/src/@types/types.ugc.ts +1 -1
  117. package/src/@types/types.webhook.ts +26 -0
  118. package/src/bootstrap.ts +7 -4
  119. package/src/index.ts +14 -14
  120. package/test.js +29 -18
  121. package/tsup.config.ts +1 -0
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -20,9 +20,10 @@
20
20
 
21
21
  import { TypeSettings } from "../../@types/types.settings";
22
22
  import { xReconnect } from "../@xmpp/xmpp.xReconnect"
23
- import { callback } from "../../@core/core.callback"
24
23
  import { bootstrap } from "../../bootstrap";
25
- import { updateNodes } from "../../@manager/manager.updateNodes";
24
+ import { createHttp } from "./utilities.createHttp";
25
+ import { createEvent } from "../../@building/building.create";
26
+ import { setEventEmit } from "./utilities.setEventEmit";
26
27
 
27
28
  export const setCronSchedule = async (): Promise<void> => {
28
29
  const settings = bootstrap.settings as TypeSettings;
@@ -31,7 +32,33 @@ export const setCronSchedule = async (): Promise<void> => {
31
32
  void xReconnect(settings.NOAAWeatherWireServiceSettings.ReconnectionSettings.ReconnectionInterval)
32
33
  }
33
34
  } else {
34
- await callback();
35
+ const response = await createHttp({
36
+ url: settings.NationalWeatherServiceSettings.EventsEndpoint,
37
+ headers: {
38
+ "User-Agent": "@atmosx/event-product-parser"
39
+ }
40
+ })
41
+ if (response.error) {
42
+ return setEventEmit({
43
+ event: `onServiceStatus`,
44
+ metadata: {
45
+ type: "fetch-api",
46
+ message: `Failed to fetch latest events from National Weather Service API - ${response.message}`,
47
+ data: {},
48
+ error: true
49
+ },
50
+ })
51
+ }
52
+ setEventEmit({
53
+ event: `onServiceStatus`,
54
+ metadata: {
55
+ message: `Fetched latest events from National Weather Service API`,
56
+ data: {},
57
+ type: "fetch-api",
58
+ error: false
59
+ },
60
+ })
61
+ createEvent({ message: response.message, isNWWS: false })
35
62
  }
36
63
  }
37
64
 
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -19,12 +19,12 @@
19
19
 
20
20
  import { bootstrap } from "../../bootstrap"
21
21
 
22
- interface ImportOptions {
22
+ interface SetListenerOptions {
23
23
  event: string,
24
24
  callback: () => void
25
25
  }
26
26
 
27
- export const setListener = (options: ImportOptions): (() => void) => {
27
+ export const setListener = (options: SetListenerOptions): (() => void) => {
28
28
  bootstrap.listener.on(options.event, options.callback)
29
29
  return () => { void bootstrap.listener.off(options.event, options.callback) };
30
30
  }
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -18,11 +18,11 @@
18
18
 
19
19
  */
20
20
 
21
- interface ImportOptions {
21
+ interface SetSleepOptions {
22
22
  timeout: number
23
23
  }
24
24
 
25
- export const setSleep = async (options: ImportOptions): Promise<void> => {
25
+ export const setSleep = async (options: SetSleepOptions): Promise<void> => {
26
26
  return new Promise((resolve) => {
27
27
  setTimeout(() => {
28
28
  resolve();
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -19,20 +19,20 @@
19
19
 
20
20
  import { bootstrap } from "../../bootstrap"
21
21
 
22
- interface ImportOptions {
22
+ interface SetTimeoutActionOptions {
23
23
  identifier: string
24
24
  addTime?: boolean
25
25
  max?: number
26
26
  interval: number
27
27
  }
28
28
 
29
- type ExportOptions = {
29
+ type SetTimeoutActionResponse = {
30
30
  limited: boolean
31
31
  remaining?: number
32
32
  response?: string
33
33
  }
34
34
 
35
- export const setTimeoutAction = (options: ImportOptions): ExportOptions => {
35
+ export const setTimeoutAction = (options: SetTimeoutActionOptions): SetTimeoutActionResponse => {
36
36
  let target = bootstrap?.ratelimits?.[options?.identifier];
37
37
  if (!target) {
38
38
  bootstrap.ratelimits[options?.identifier] = [];
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -20,12 +20,12 @@
20
20
  import { bootstrap } from "../../bootstrap"
21
21
  import { TypeSettings } from "../../@types/types.settings";
22
22
 
23
- interface ImportOptions {
23
+ interface SetWarningOptions {
24
24
  title?: string
25
25
  message: string
26
26
  }
27
27
 
28
- export const setWarning = (options: ImportOptions): void => {
28
+ export const setWarning = (options: SetWarningOptions): void => {
29
29
  const settings = bootstrap.settings as TypeSettings;
30
30
  bootstrap.listener.emit(`log`, `${options.title ?? `[${bootstrap.ansi_colors.YELLOW}ATMOSX-PARSER${bootstrap.ansi_colors.RESET}]`} ${options.message}`)
31
31
  if (settings.EnableJournal) {
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -46,7 +46,7 @@ export const xDeploy = async (): Promise<void> => {
46
46
  await session.start()
47
47
  } catch (error) {
48
48
  setEventEmit({
49
- event: `onXMPPStatus`,
49
+ event: `onServiceStatus`,
50
50
  metadata: {
51
51
  message: `Error occured while starting XMPP Session: ${error}`,
52
52
  data: {},
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -25,14 +25,5 @@ export const xError = () => {
25
25
  bootstrap.session_xmpp.on(`error`, async (error: Error) => {
26
26
  bootstrap.cache.isConnected = false;
27
27
  bootstrap.cache.sigHault = true;
28
- setEventEmit({
29
- event: `onXMPPStatus`,
30
- metadata: {
31
- message: `Client has recieved an error`,
32
- data: {},
33
- type: `error`,
34
- error: true
35
- },
36
- })
37
28
  })
38
29
  }
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -26,7 +26,7 @@ export const xOffline = () => {
26
26
  bootstrap.cache.isConnected = false;
27
27
  bootstrap.cache.sigHault = true;
28
28
  setEventEmit({
29
- event: `onXMPPStatus`,
29
+ event: `onServiceStatus`,
30
30
  metadata: {
31
31
  message: `Client has gone offline`,
32
32
  data: {},
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -24,32 +24,16 @@ import { setEventEmit } from '../@utilities/utilities.setEventEmit';
24
24
  export const xOnline = () => {
25
25
  const settings = bootstrap.settings;
26
26
  bootstrap.session_xmpp.on(`online`, async (address: string) => {
27
- const tick = Date.now();
28
- if (bootstrap.cache.lastConnect && tick - bootstrap.cache.lastConnect > 10e3) {
29
- bootstrap.cache.sigHault = true;
30
- setEventEmit({
31
- event: `onXMPPStatus`,
32
- metadata: {
33
- message: `The XMPP Client is attempting to reconnect too fast, this may be due to network instability and this reconnect request has been throttled. We will attempt to reconnect when all connections have been killed`,
34
- data: {},
35
- type: `offline`,
36
- error: true
37
- },
38
- })
39
- await setSleep({timeout: 2e3})
40
- bootstrap.session_xmpp.stop().catch(() => {});
41
- return;
42
- }
43
27
  bootstrap.cache.sigHault = false;
44
28
  bootstrap.cache.isConnected = true;
45
- bootstrap.cache.lastConnect = tick;
29
+ bootstrap.cache.tReconnects = 0;
46
30
  const nickname = settings.NOAAWeatherWireServiceSettings.CredentialSettings.Nickname;
47
31
  bootstrap.session_xmpp.send(xml('presence', {
48
32
  to: `nwws@conference.nwws-oi.weather.gov/${nickname}`,
49
33
  xmlns: 'http://jabber.org/protocol/muc',
50
34
  }))
51
35
  setEventEmit({
52
- event: `onXMPPStatus`,
36
+ event: `onServiceStatus`,
53
37
  metadata: {
54
38
  message: `Succesfully connected to NOAA Weather Wire Service as "${nickname}"`,
55
39
  data: {},
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -25,6 +25,11 @@ import { setWarning } from "../@utilities/utilities.setWarning";
25
25
  export const xReconnect = async (interval: number): Promise<void> => {
26
26
  const settings = bootstrap.settings as TypeSettings;
27
27
  const lastStanza = Date.now() - bootstrap.cache.lastStanza
28
+ if (interval < 15) {
29
+ setWarning({ message: `Reconnection Interval of ${interval} seconds is too low, setting to 15 seconds` })
30
+ interval = 15;
31
+ bootstrap.settings.NOAAWeatherWireServiceSettings.ReconnectionSettings.ReconnectionInterval = 15;
32
+ }
28
33
  const reconnectThreshold = interval * 1e3
29
34
  if ((!bootstrap.cache.isConnected && !bootstrap.cache.sigHault) || !bootstrap.session_xmpp) {
30
35
  return;
@@ -36,7 +41,7 @@ export const xReconnect = async (interval: number): Promise<void> => {
36
41
  bootstrap.cache.tReconnects += 1;
37
42
  try {
38
43
  setEventEmit({
39
- event: `onXMPPStatus`,
44
+ event: `onServiceStatus`,
40
45
  metadata: {
41
46
  message: `Attempting to reconnect to XMPP Service (Reconnect Attempt ${bootstrap.cache.tReconnects})`,
42
47
  data: {
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -29,7 +29,7 @@ export const xStanza = () => {
29
29
  const msgFrom = stanza?.attrs?.from ?? ``
30
30
  const msgType = stanza?.attrs?.type ?? ``
31
31
  setEventEmit({
32
- event: `onXMPPStatus`,
32
+ event: `onServiceStatus`,
33
33
  metadata: {
34
34
  message: stanza,
35
35
  from: msgFrom,
@@ -50,7 +50,7 @@ export const xStanza = () => {
50
50
  const getOccupant = msgFrom.split(`/`).slice(1).join(`/`)
51
51
  const getAvailability = msgType === `unavailable`
52
52
  setEventEmit({
53
- event: `onXMPPStatus`,
53
+ event: `onServiceStatus`,
54
54
  metadata: {
55
55
  message: `Occupant ${getOccupant} has ${getAvailability ? `left` : `joined`} the room`,
56
56
  data: {},
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -40,9 +40,8 @@ export const pvExtract = (message: string): TypePVTEC[] | null => {
40
40
  status: eventStatus[sub[1]],
41
41
  organization: message.match(regExp.wmo)?.[0] ?? null,
42
42
  expires: getExpiry(dates),
43
- prediction_center:
44
- (sub[4] == `A` || sub[4] == `Y`) &&
45
- (sub[3] == `TO` || sub[3] == `SV`)
43
+ is_watch: (sub[4] == `A` || sub[4] == `Y`) && (sub[3] == `TO` || sub[3] == `SV`),
44
+ prediction_center: sub[2] == `KWNS`
46
45
  ? true : false
47
46
  })
48
47
  }
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -19,6 +19,7 @@
19
19
 
20
20
  import { TypeEventProperties as BaseTypeEventProperties } from "./type.properties";
21
21
  import { TypeHVTEC } from "../@types/types.hvtec";
22
+ import { TypePVTEC } from "./types.pvtec";
22
23
 
23
24
  export type TypeEvent = {
24
25
  type: string
@@ -37,6 +38,7 @@ export type TypeEvent = {
37
38
  is_updated?: boolean
38
39
  is_expired?: boolean
39
40
  is_test?: boolean
41
+ is_statement?: boolean
40
42
  }
41
43
  metadata: {
42
44
  ms: number
@@ -44,19 +46,18 @@ export type TypeEvent = {
44
46
  tracking: string
45
47
  hash?: string
46
48
  header: string
47
- vtec: string
49
+ vtec: TypePVTEC | null
48
50
  hvtec: TypeHVTEC[]
49
51
  nodes?: {
50
- updated: number
51
- node: {
52
- id?: string | number
53
- coordinates: [number, number]
54
- nearest: [number, number]
55
- miles: number | null
56
- kilometers: number | null
57
- proximity: boolean
58
- }[]
59
- }
52
+ id?: string | number
53
+ coordinates: [number, number]
54
+ nearest: [number, number]
55
+ miles: number | null
56
+ kilometers: number | null
57
+ proximity: boolean
58
+ }[],
59
+ filtered_proximity?: boolean
60
+ updated?: number
60
61
  history: {
61
62
  description: string
62
63
  issued: string
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -8,7 +8,7 @@
8
8
  | |
9
9
  |_|
10
10
 
11
- Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, Everwatch1, & CJ Ziegler)
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
14
  Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
@@ -25,5 +25,6 @@ export type TypePVTEC = {
25
25
  status: string
26
26
  organization: string
27
27
  expires: string
28
+ is_watch: boolean
28
29
  prediction_center: boolean
29
30
  }