@atmosx/event-product-parser 3.0.0 → 3.0.1

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 (119) hide show
  1. package/README.md +299 -5
  2. package/dist/cjs/index.cjs +10188 -237
  3. package/dist/esm/index.mjs +10186 -237
  4. package/dist/index.d.mts +235 -0
  5. package/dist/index.d.ts +235 -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 +9 -26
  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.getEvents.ts +1 -1
  20. package/src/@core/core.getNodes.ts +1 -1
  21. package/src/@core/{core.callback.ts → core.getRandomEvent.ts} +3 -17
  22. package/src/@core/core.getVersion.ts +25 -0
  23. package/src/@core/core.listener.ts +1 -1
  24. package/src/@core/core.setNode.ts +2 -2
  25. package/src/@core/core.start.ts +9 -4
  26. package/src/@core/core.stop.ts +1 -1
  27. package/src/@dictionaries/dictionaries.betterEventNames.ts +5 -1
  28. package/src/@dictionaries/dictionaries.eventActions.ts +1 -1
  29. package/src/@dictionaries/dictionaries.eventAwipAbreviations.ts +2 -2
  30. package/src/@dictionaries/dictionaries.eventCancelMessages.ts +2 -1
  31. package/src/@dictionaries/dictionaries.eventCauses.ts +1 -1
  32. package/src/@dictionaries/dictionaries.eventProducts.ts +1 -1
  33. package/src/@dictionaries/dictionaries.eventRecords.ts +1 -1
  34. package/src/@dictionaries/dictionaries.eventSeverity.ts +1 -1
  35. package/src/@dictionaries/dictionaries.eventStatus.ts +1 -1
  36. package/src/@dictionaries/dictionaries.eventTags.ts +1 -1
  37. package/src/@dictionaries/dictionaries.eventTypes.ts +1 -1
  38. package/src/@dictionaries/dictionaries.eventsOffshore.ts +1 -1
  39. package/src/@dictionaries/dictionaries.hailStrings.ts +3 -1
  40. package/src/@dictionaries/dictionaries.officeICAOs.ts +1 -1
  41. package/src/@dictionaries/dictionaries.regExp.ts +1 -1
  42. package/src/@dictionaries/dictionaries.shapefileLinks.ts +1 -1
  43. package/src/@dictionaries/dictionaries.statusCorrelationText.ts +1 -1
  44. package/src/@dictionaries/{dictionaries.test_signatures.ts → dictionaries.testSignatures.ts} +3 -2
  45. package/src/@dictionaries/dictionaries.transcribedMessageReplacements.ts +1 -1
  46. package/src/@events/events.api.ts +1 -1
  47. package/src/@events/events.text.ts +1 -1
  48. package/src/@events/events.ugc.ts +1 -1
  49. package/src/@events/events.vtec.ts +5 -5
  50. package/src/@manager/manager.mkEvent.ts +54 -38
  51. package/src/@manager/manager.rmEvent.ts +3 -1
  52. package/src/@manager/manager.setHash.ts +2 -2
  53. package/src/@manager/manager.updateNodes.ts +10 -6
  54. package/src/@manager/manager.updateWebhooks.ts +50 -0
  55. package/src/@modules/@database/database.cache.ts +1 -1
  56. package/src/@modules/@database/database.init.ts +1 -1
  57. package/src/@modules/@database/database.shapefiles.ts +2 -3
  58. package/src/@modules/@database/database.stanza.ts +2 -1
  59. package/src/@modules/@eas/eas.getFloatPCM16.ts +29 -0
  60. package/src/@modules/@eas/eas.getMergedPCM16.ts +32 -0
  61. package/src/@modules/@eas/eas.getPCM16.ts +52 -0
  62. package/src/@modules/@eas/eas.getPCMToFloat.ts +26 -0
  63. package/src/@modules/@eas/eas.getSampledPCM16.ts +36 -0
  64. package/src/@modules/@eas/eas.getWavPCM16.ts +52 -0
  65. package/src/@modules/@eas/eas.setAFSK.ts +52 -0
  66. package/src/@modules/@eas/eas.setAsciiToBits.ts +32 -0
  67. package/src/@modules/@eas/eas.setAttentionTone.ts +40 -0
  68. package/src/@modules/@eas/eas.setEasTone.ts +137 -0
  69. package/src/@modules/@eas/eas.setNoise.ts +31 -0
  70. package/src/@modules/@eas/eas.setRadioEffect.ts +49 -0
  71. package/src/@modules/@eas/eas.setSameHeader.ts +45 -0
  72. package/src/@modules/@stanza/stanza.getAwipsType.ts +1 -1
  73. package/src/@modules/@stanza/stanza.validate.ts +1 -1
  74. package/src/@modules/@utilities/utilities.createHttp.ts +17 -7
  75. package/src/@modules/@utilities/utilities.createWebhook.ts +100 -0
  76. package/src/@modules/@utilities/utilities.getFormattedTime.ts +1 -1
  77. package/src/@modules/@utilities/utilities.getSettings.ts +1 -1
  78. package/src/@modules/@utilities/utilities.getShapeNearestPoint.ts +1 -1
  79. package/src/@modules/@utilities/utilities.setCronSchedule.ts +31 -4
  80. package/src/@modules/@utilities/utilities.setEventEmit.ts +1 -1
  81. package/src/@modules/@utilities/utilities.setListener.ts +3 -3
  82. package/src/@modules/@utilities/utilities.setSettings.ts +1 -1
  83. package/src/@modules/@utilities/utilities.setSleep.ts +3 -3
  84. package/src/@modules/@utilities/utilities.setTimeoutAction.ts +4 -4
  85. package/src/@modules/@utilities/utilities.setWarning.ts +3 -3
  86. package/src/@modules/@xmpp/xmpp.xDeploy.ts +2 -2
  87. package/src/@modules/@xmpp/xmpp.xError.ts +1 -10
  88. package/src/@modules/@xmpp/xmpp.xOffline.ts +2 -2
  89. package/src/@modules/@xmpp/xmpp.xOnline.ts +3 -19
  90. package/src/@modules/@xmpp/xmpp.xReconnect.ts +7 -2
  91. package/src/@modules/@xmpp/xmpp.xStanza.ts +3 -3
  92. package/src/@parsers/@hvtec/hvtec.extract.ts +1 -1
  93. package/src/@parsers/@pvtec/pvtec.expires.ts +1 -1
  94. package/src/@parsers/@pvtec/pvtec.extract.ts +3 -4
  95. package/src/@parsers/@text/text.getDescriptionFromProduct.ts +1 -1
  96. package/src/@parsers/@text/text.getPolygonFromProduct.ts +1 -1
  97. package/src/@parsers/@text/text.getTextFromProduct.ts +1 -1
  98. package/src/@parsers/@text/text.getXML.ts +1 -1
  99. package/src/@parsers/@ugc/ugc.coordinates.ts +1 -1
  100. package/src/@parsers/@ugc/ugc.expiry.ts +1 -1
  101. package/src/@parsers/@ugc/ugc.extract.ts +1 -1
  102. package/src/@parsers/@ugc/ugc.header.ts +1 -1
  103. package/src/@parsers/@ugc/ugc.locations.ts +1 -1
  104. package/src/@parsers/@ugc/ugc.zones.ts +1 -1
  105. package/src/@types/type.event.ts +12 -12
  106. package/src/@types/type.properties.ts +1 -1
  107. package/src/@types/types.attributes.ts +1 -1
  108. package/src/@types/types.compiled.ts +1 -1
  109. package/src/@types/types.hash.ts +1 -1
  110. package/src/@types/types.hvtec.ts +1 -1
  111. package/src/@types/types.pvtec.ts +2 -1
  112. package/src/@types/types.settings.ts +10 -5
  113. package/src/@types/types.stanza.ts +1 -1
  114. package/src/@types/types.ugc.ts +1 -1
  115. package/src/@types/types.webhook.ts +26 -0
  116. package/src/bootstrap.ts +7 -4
  117. package/src/index.ts +11 -12
  118. package/test.js +29 -18
  119. 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
@@ -26,7 +26,7 @@ import { getEventSignature } from "./building.signature"
26
26
  import { mkEvent } from "../@manager/manager.mkEvent";
27
27
  import { rmEvent } from "../@manager/manager.rmEvent";
28
28
  import { getEventGeometry } from "./building.geometry";
29
- import { updateNodes } from "../@manager/manager.updateNodes";
29
+ import { updateNode } from "../@manager/manager.updateNodes";
30
30
  import { setEventEmit } from "../@modules/@utilities/utilities.setEventEmit";
31
31
 
32
32
  export const validateEvents = async (events: TypeEvent[]): Promise<void> => {
@@ -53,16 +53,31 @@ export const validateEvents = async (events: TypeEvent[]): Promise<void> => {
53
53
  filteredProperties.metadata = filteredProperties.metadata ?? {} as any;
54
54
  filteredProperties.metadata.hash = createHash("sha256").update(JSON.stringify(filteredProperties)).digest("hex")
55
55
 
56
+ setEventEmit({ event: `onProductType${enhancedEventName.replace(/\s+/g, '')}`, metadata: define });
57
+
56
58
  if (properties.status_metadata.is_test) {
57
59
  setEventEmit({ event: `onTestProduct`, metadata: define })
58
60
  if (bools?.IgnoreTestProducts) return false;
59
61
  }
62
+
60
63
  if (properties.status_metadata.is_expired) {
61
64
  setEventEmit({ event: `onExpiredProduct`, metadata: define })
62
65
  rmEvent(define)
63
66
  return false;
64
67
  }
65
- setEventEmit({ event: `onProductType${enhancedEventName.replace(/\s+/g, '')}`, metadata: define });
68
+
69
+ if (properties.metadata?.vtec?.is_watch) {
70
+ const isSPC = properties.metadata?.vtec?.prediction_center;
71
+ setEventEmit({ event: isSPC ? `onStormPredictionWatch` : `onNonStormPredictionWatch`, metadata: define })
72
+ if (bools?.SPCWatchesOnly && !isSPC) {
73
+ return false;
74
+ }
75
+ if ((!bools?.SPCWatchesOnly) && isSPC) {
76
+ return false
77
+ }
78
+ }
79
+
80
+
66
81
  for (const key in sets) {
67
82
  const setting = sets[key]
68
83
  if (key === 'ListeningEvents' && setting.size > 0 && !setting.has(define.properties.event.toLowerCase())) {
@@ -123,7 +138,7 @@ export const validateEvents = async (events: TypeEvent[]): Promise<void> => {
123
138
  await mkEvent(event)
124
139
  }
125
140
  }
126
- await updateNodes()
141
+ await updateNode()
127
142
  setEventEmit({
128
143
  event: `onEventCache`,
129
144
  metadata: bootstrap.cache.events,
@@ -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
@@ -17,23 +17,9 @@
17
17
 
18
18
  */
19
19
 
20
- import { createEvent } from "../@building/building.create";
21
- import { createHttp } from "../@modules/@utilities/utilities.createHttp";
22
- import { TypeSettings } from "../@types/types.settings";
23
20
  import { bootstrap } from "../bootstrap";
24
21
 
25
22
 
26
- export const callback = async (): Promise<void> => {
27
- const settings = bootstrap.settings as TypeSettings;
28
- const response = await createHttp({
29
- url: settings.NationalWeatherServiceSettings.EventsEndpoint,
30
- headers: {
31
- "User-Agent": "@atmosx/event-product-parser"
32
- }
33
- })
34
- if (response.error) return;
35
- createEvent({
36
- message: response.message,
37
- isNWWS: false
38
- })
23
+ export const getRandomEvent = (): any => {
24
+ return bootstrap.cache.events.features[Math.floor(Math.random() * bootstrap.cache.events.features.length)]
39
25
  }
@@ -0,0 +1,25 @@
1
+ /*
2
+ _ _ _ __ __
3
+ /\ | | | | (_) \ \ / /
4
+ / \ | |_ _ __ ___ ___ ___ _ __ | |__ ___ _ __ _ ___ \ V /
5
+ / /\ \| __| '_ ` _ \ / _ \/ __| '_ \| '_ \ / _ \ '__| |/ __| > <
6
+ / ____ \ |_| | | | | | (_) \__ \ |_) | | | | __/ | | | (__ / . \
7
+ /_/ \_\__|_| |_| |_|\___/|___/ .__/|_| |_|\___|_| |_|\___/_/ \_\
8
+ | |
9
+ |_|
10
+
11
+ Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx, & CJ Ziegler)
12
+ Discord: https://atmosphericx-discord.scriptkitty.cafe
13
+ Ko-Fi: https://ko-fi.com/k3yomi
14
+ Documentation: http://localhost/documentation | https://atmosphericx.scriptkitty.cafe/documentation
15
+
16
+ Internal Package: @atmosx/event-product-parser
17
+
18
+ */
19
+
20
+ import { bootstrap } from "../bootstrap";
21
+
22
+
23
+ export const getVersion = (): any => {
24
+ return bootstrap.version
25
+ }
@@ -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
@@ -72,7 +72,7 @@ export const setNode = (options: GetAddChaserOptions) => {
72
72
  }
73
73
  });
74
74
  return setEventEmit({
75
- event: `onNodeUpdate`,
75
+ event: `onNodeAdd`,
76
76
  metadata: {
77
77
  type: `node-add`,
78
78
  node: nodes[nodes.length - 1]
@@ -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 @@ import { initializeDatabase } from "../@modules/@database/database.init";
26
26
  import { getCachedEvents } from "../@modules/@database/database.cache";
27
27
  import { setCronSchedule } from "../@modules/@utilities/utilities.setCronSchedule";
28
28
  import { Cron } from "croner";
29
- import { updateNodes } from "../@manager/manager.updateNodes";
29
+ import { updateNode } from "../@manager/manager.updateNodes";
30
30
 
31
31
  export const startService = async (settings: TypeSettings): Promise<void> => {
32
32
  if (!bootstrap.isReady) {
@@ -44,11 +44,16 @@ export const startService = async (settings: TypeSettings): Promise<void> => {
44
44
  })();
45
45
  }
46
46
  await setCronSchedule()
47
- const scheduleInterval = !settings.EnableWireService ? settings.NationalWeatherServiceSettings.CallbackInterval : 5;
47
+ let scheduleInterval = !settings.EnableWireService ? settings.NationalWeatherServiceSettings.CallbackInterval : 1;
48
+ if (!settings.EnableWireService && scheduleInterval < 15) {
49
+ setWarning({ message: `Schedule Interval of ${scheduleInterval} seconds is too low, setting to 15 seconds` })
50
+ bootstrap.settings.NationalWeatherServiceSettings.CallbackInterval = 15;
51
+ scheduleInterval = 15;
52
+ }
48
53
  bootstrap.cron = new Cron(`*/${scheduleInterval} * * * * *`, async () => {
49
54
  await setCronSchedule();
50
55
  })
51
56
  bootstrap.cron = new Cron(`*/1 * * * * *`, async () => {
52
- await updateNodes();
57
+ await updateNode();
53
58
  })
54
59
  }
@@ -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
@@ -33,6 +33,10 @@ export const betterEventNames: Record<string, Record<string, EnhancedEventType>>
33
33
  description: "particularly dangerous situation",
34
34
  damage: `CONSIDERABLE`
35
35
  },
36
+ "Radar Confirmed Tornado Warning": {
37
+ description: "source...radar confirmed tornado.",
38
+ tornado: `OBSERVED`
39
+ },
36
40
  "Confirmed Tornado Warning": {
37
41
  tornado: `OBSERVED`
38
42
  },
@@ -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
@@ -318,7 +318,7 @@ export const eventAwipAbreviations: Record<string, string> = {
318
318
  TOE: `telephone-outage-emergency`,
319
319
  TOR: `tornado-warning`,
320
320
  TPT: `temperature-precipitation-table`,
321
- TSU: `tsunami-watch-warning`,
321
+ TSU: `tsunami-watch`,
322
322
  TUV: `ultraviolet-index`,
323
323
  TVL: `travelers-forecast`,
324
324
  TWB: `transcribed-weather-broadcast`,
@@ -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,6 +18,7 @@
18
18
  */
19
19
 
20
20
  export const eventCancelMessages: string[] = [
21
+ "has been cancelled",
21
22
  "subsided sufficiently for the advisory to be cancelled",
22
23
  "has been cancelled",
23
24
  "will be allowed to expire",
@@ -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
@@ -18,6 +18,8 @@
18
18
  */
19
19
 
20
20
  export const hailStrings: Record<string, string> = {
21
+ ".75": "Penny",
22
+ ".88": "Nickel",
21
23
  "0.75": "Penny",
22
24
  "0.88": "Nickel",
23
25
  "1.00": "Quarter",
@@ -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
@@ -17,7 +17,8 @@
17
17
 
18
18
  */
19
19
 
20
- export const test_signatures: string[] = [
20
+ export const testSignatures: string[] = [
21
21
  `This is a test message`,
22
+ `Monitoring message only.`,
22
23
  `THIS_MESSAGE_IS_FOR_TEST_PURPOSES_ONLY`
23
24
  ]
@@ -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
@@ -40,8 +40,8 @@ export const vtec = async (stanza: TypeStanzaCompiled): Promise<void> => {
40
40
  for (const message of getMessages) {
41
41
  const tick = performance.now();
42
42
  const attributes = stanza?.attributes as TypeAttributes
43
- const pVtec = await pvExtract(message) as TypePVTEC[];
44
- const hVtec = await hvExtract(message) as TypeHVTEC[];
43
+ const pVtec = pvExtract(message) as TypePVTEC[];
44
+ const hVtec = hvExtract(message) as TypeHVTEC[];
45
45
  const ugc = await ugcExtract(message)
46
46
  if (pVtec != null && ugc != null ) {
47
47
  for (const pv of pVtec) {
@@ -61,14 +61,14 @@ export const vtec = async (stanza: TypeStanzaCompiled): Promise<void> => {
61
61
  parent: pv.event,
62
62
  status: pv.status,
63
63
  issued: (!isNaN(issued.getTime())) ? issued.toISOString() : new Date().toISOString(),
64
- expires: (!isNaN(expires.getTime())) ? expires.toISOString() : new Date(Date.now() + 60 * 60 * 1000).toISOString(),
64
+ expires: (!isNaN(expires.getTime())) ? expires.toISOString() : ugc.expires ?? new Date(issued.getTime() + 60 * 60 * 1000).toISOString(),
65
65
  ...props,
66
66
  metadata: {
67
67
  ms: performance.now() - tick,
68
68
  source: `events.vtec`,
69
69
  tracking: getEventTracking({ type: `VTEC`, stanza, attributes, properties: props, vtec }),
70
70
  header: header,
71
- vtec: pv.vtec,
71
+ vtec: pv,
72
72
  hvtec: hVtec,
73
73
  history: [
74
74
  {