@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.
- package/README.md +307 -5
- package/dist/cjs/index.cjs +10253 -262
- package/dist/esm/index.mjs +10250 -262
- package/dist/index.d.mts +238 -0
- package/dist/index.d.ts +238 -0
- package/package.json +4 -3
- package/src/@building/building.clean.ts +1 -1
- package/src/@building/building.create.ts +1 -1
- package/src/@building/building.enhance.ts +1 -1
- package/src/@building/building.geometry.ts +7 -1
- package/src/@building/building.headers.ts +1 -1
- package/src/@building/building.office.ts +1 -1
- package/src/@building/building.polygon.ts +1 -1
- package/src/@building/building.properties.ts +1 -1
- package/src/@building/building.signature.ts +11 -27
- package/src/@building/building.tags.ts +1 -1
- package/src/@building/building.tracking.ts +1 -1
- package/src/@building/building.validate.ts +19 -4
- package/src/@core/{core.callback.ts → core.clearEvents.ts} +9 -16
- package/src/@core/{core.listener.ts → core.createListener.ts} +2 -2
- package/src/@core/core.getEvents.ts +1 -1
- package/src/@core/core.getNodes.ts +1 -1
- package/src/@core/core.getRandomEvent.ts +25 -0
- package/src/@core/core.getVersion.ts +25 -0
- package/src/@core/core.setNode.ts +2 -2
- package/src/@core/core.start.ts +12 -5
- package/src/@core/core.stop.ts +1 -1
- package/src/@dictionaries/dictionaries.betterEventNames.ts +5 -1
- package/src/@dictionaries/dictionaries.eventActions.ts +1 -1
- package/src/@dictionaries/dictionaries.eventAwipAbreviations.ts +2 -2
- package/src/@dictionaries/dictionaries.eventCancelMessages.ts +2 -1
- package/src/@dictionaries/dictionaries.eventCauses.ts +1 -1
- package/src/@dictionaries/dictionaries.eventProducts.ts +1 -1
- package/src/@dictionaries/dictionaries.eventRecords.ts +1 -1
- package/src/@dictionaries/dictionaries.eventSeverity.ts +1 -1
- package/src/@dictionaries/dictionaries.eventStatus.ts +1 -1
- package/src/@dictionaries/dictionaries.eventTags.ts +1 -1
- package/src/@dictionaries/dictionaries.eventTypes.ts +1 -1
- package/src/@dictionaries/dictionaries.eventsOffshore.ts +1 -1
- package/src/@dictionaries/dictionaries.hailStrings.ts +3 -1
- package/src/@dictionaries/dictionaries.officeICAOs.ts +1 -1
- package/src/@dictionaries/dictionaries.regExp.ts +1 -1
- package/src/@dictionaries/dictionaries.shapefileLinks.ts +1 -1
- package/src/@dictionaries/dictionaries.statusCorrelationText.ts +14 -12
- package/src/@dictionaries/{dictionaries.test_signatures.ts → dictionaries.testSignatures.ts} +3 -2
- package/src/@dictionaries/dictionaries.transcribedMessageReplacements.ts +1 -1
- package/src/@events/events.api.ts +1 -1
- package/src/@events/events.text.ts +5 -3
- package/src/@events/events.ugc.ts +3 -3
- package/src/@events/events.vtec.ts +5 -5
- package/src/@manager/manager.mkEvent.ts +54 -38
- package/src/@manager/manager.rmEvent.ts +6 -1
- package/src/@manager/manager.setHash.ts +2 -2
- package/src/@manager/manager.updateEvents.ts +35 -0
- package/src/@manager/manager.updateNodes.ts +10 -6
- package/src/@manager/manager.updateWebhooks.ts +50 -0
- package/src/@modules/@database/database.cache.ts +1 -1
- package/src/@modules/@database/database.init.ts +1 -1
- package/src/@modules/@database/database.shapefiles.ts +2 -3
- package/src/@modules/@database/database.stanza.ts +2 -1
- package/src/@modules/@eas/eas.getFloatPCM16.ts +29 -0
- package/src/@modules/@eas/eas.getMergedPCM16.ts +32 -0
- package/src/@modules/@eas/eas.getPCM16.ts +52 -0
- package/src/@modules/@eas/eas.getPCMToFloat.ts +26 -0
- package/src/@modules/@eas/eas.getSampledPCM16.ts +36 -0
- package/src/@modules/@eas/eas.getWavPCM16.ts +52 -0
- package/src/@modules/@eas/eas.setAFSK.ts +52 -0
- package/src/@modules/@eas/eas.setAsciiToBits.ts +32 -0
- package/src/@modules/@eas/eas.setAttentionTone.ts +40 -0
- package/src/@modules/@eas/eas.setEasTone.ts +137 -0
- package/src/@modules/@eas/eas.setNoise.ts +31 -0
- package/src/@modules/@eas/eas.setRadioEffect.ts +49 -0
- package/src/@modules/@eas/eas.setSameHeader.ts +45 -0
- package/src/@modules/@stanza/stanza.getAwipsType.ts +1 -1
- package/src/@modules/@stanza/stanza.validate.ts +1 -1
- package/src/@modules/@utilities/utilities.createHttp.ts +17 -7
- package/src/@modules/@utilities/utilities.createWebhook.ts +100 -0
- package/src/@modules/@utilities/utilities.getFormattedTime.ts +1 -1
- package/src/@modules/@utilities/utilities.getSettings.ts +1 -1
- package/src/@modules/@utilities/utilities.getShapeNearestPoint.ts +1 -1
- package/src/@modules/@utilities/utilities.setCronSchedule.ts +31 -4
- package/src/@modules/@utilities/utilities.setEventEmit.ts +1 -1
- package/src/@modules/@utilities/utilities.setListener.ts +3 -3
- package/src/@modules/@utilities/utilities.setSettings.ts +1 -1
- package/src/@modules/@utilities/utilities.setSleep.ts +3 -3
- package/src/@modules/@utilities/utilities.setTimeoutAction.ts +4 -4
- package/src/@modules/@utilities/utilities.setWarning.ts +3 -3
- package/src/@modules/@xmpp/xmpp.xDeploy.ts +2 -2
- package/src/@modules/@xmpp/xmpp.xError.ts +1 -10
- package/src/@modules/@xmpp/xmpp.xOffline.ts +2 -2
- package/src/@modules/@xmpp/xmpp.xOnline.ts +3 -19
- package/src/@modules/@xmpp/xmpp.xReconnect.ts +7 -2
- package/src/@modules/@xmpp/xmpp.xStanza.ts +3 -3
- package/src/@parsers/@hvtec/hvtec.extract.ts +1 -1
- package/src/@parsers/@pvtec/pvtec.expires.ts +1 -1
- package/src/@parsers/@pvtec/pvtec.extract.ts +3 -4
- package/src/@parsers/@text/text.getDescriptionFromProduct.ts +1 -1
- package/src/@parsers/@text/text.getPolygonFromProduct.ts +1 -1
- package/src/@parsers/@text/text.getTextFromProduct.ts +1 -1
- package/src/@parsers/@text/text.getXML.ts +1 -1
- package/src/@parsers/@ugc/ugc.coordinates.ts +1 -1
- package/src/@parsers/@ugc/ugc.expiry.ts +1 -1
- package/src/@parsers/@ugc/ugc.extract.ts +1 -1
- package/src/@parsers/@ugc/ugc.header.ts +1 -1
- package/src/@parsers/@ugc/ugc.locations.ts +1 -1
- package/src/@parsers/@ugc/ugc.zones.ts +1 -1
- package/src/@types/type.event.ts +13 -12
- package/src/@types/type.properties.ts +1 -1
- package/src/@types/types.attributes.ts +1 -1
- package/src/@types/types.compiled.ts +1 -1
- package/src/@types/types.hash.ts +1 -1
- package/src/@types/types.hvtec.ts +1 -1
- package/src/@types/types.pvtec.ts +2 -1
- package/src/@types/types.settings.ts +10 -5
- package/src/@types/types.stanza.ts +1 -1
- package/src/@types/types.ugc.ts +1 -1
- package/src/@types/types.webhook.ts +26 -0
- package/src/bootstrap.ts +7 -4
- package/src/index.ts +14 -14
- package/test.js +29 -18
- 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,
|
|
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 {
|
|
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
|
-
|
|
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
|
|
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,
|
|
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,16 @@
|
|
|
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";
|
|
21
|
+
import { setEventEmit } from "../@modules/@utilities/utilities.setEventEmit";
|
|
24
22
|
|
|
25
23
|
|
|
26
|
-
export const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
})
|
|
34
|
-
if (response.error) return;
|
|
35
|
-
createEvent({
|
|
36
|
-
message: response.message,
|
|
37
|
-
isNWWS: false
|
|
24
|
+
export const clearEvents = (): void => {
|
|
25
|
+
bootstrap.cache.events.features = [];
|
|
26
|
+
bootstrap.cache.hashes = [];
|
|
27
|
+
setEventEmit({
|
|
28
|
+
event: `onEventCache`,
|
|
29
|
+
metadata: bootstrap.cache.events,
|
|
30
|
+
message: `Manually cleared event cache.`
|
|
38
31
|
})
|
|
39
32
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| |
|
|
9
9
|
|_|
|
|
10
10
|
|
|
11
|
-
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx,
|
|
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,6 @@
|
|
|
19
19
|
|
|
20
20
|
import { setListener } from "../@modules/@utilities/utilities.setListener";
|
|
21
21
|
|
|
22
|
-
export const
|
|
22
|
+
export const createListener = (event: string, callback: () => void) => {
|
|
23
23
|
setListener({event, callback})
|
|
24
24
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| |
|
|
9
9
|
|_|
|
|
10
10
|
|
|
11
|
-
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx,
|
|
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,
|
|
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
|
|
@@ -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 getRandomEvent = (): any => {
|
|
24
|
+
return bootstrap.cache.events.features[Math.floor(Math.random() * bootstrap.cache.events.features.length)]
|
|
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,
|
|
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: `
|
|
75
|
+
event: `onNodeAdd`,
|
|
76
76
|
metadata: {
|
|
77
77
|
type: `node-add`,
|
|
78
78
|
node: nodes[nodes.length - 1]
|
package/src/@core/core.start.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| |
|
|
9
9
|
|_|
|
|
10
10
|
|
|
11
|
-
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx,
|
|
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,8 +25,9 @@ import { xDeploy } from "../@modules/@xmpp/xmpp.xDeploy"
|
|
|
25
25
|
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
|
+
import { updateNode } from "../@manager/manager.updateNodes";
|
|
29
|
+
import { updateEvents } from "../@manager/manager.updateEvents";
|
|
28
30
|
import { Cron } from "croner";
|
|
29
|
-
import { updateNodes } from "../@manager/manager.updateNodes";
|
|
30
31
|
|
|
31
32
|
export const startService = async (settings: TypeSettings): Promise<void> => {
|
|
32
33
|
if (!bootstrap.isReady) {
|
|
@@ -44,11 +45,17 @@ export const startService = async (settings: TypeSettings): Promise<void> => {
|
|
|
44
45
|
})();
|
|
45
46
|
}
|
|
46
47
|
await setCronSchedule()
|
|
47
|
-
|
|
48
|
+
let scheduleInterval = !settings.EnableWireService ? settings.NationalWeatherServiceSettings.CallbackInterval : 1;
|
|
49
|
+
if (!settings.EnableWireService && scheduleInterval < 15) {
|
|
50
|
+
setWarning({ message: `Schedule Interval of ${scheduleInterval} seconds is too low, setting to 15 seconds` })
|
|
51
|
+
bootstrap.settings.NationalWeatherServiceSettings.CallbackInterval = 15;
|
|
52
|
+
scheduleInterval = 15;
|
|
53
|
+
}
|
|
48
54
|
bootstrap.cron = new Cron(`*/${scheduleInterval} * * * * *`, async () => {
|
|
49
55
|
await setCronSchedule();
|
|
50
56
|
})
|
|
51
|
-
bootstrap.cron = new Cron(
|
|
52
|
-
await
|
|
57
|
+
bootstrap.cron = new Cron(`* * * * * *`, async () => {
|
|
58
|
+
await updateNode();
|
|
59
|
+
await updateEvents();
|
|
53
60
|
})
|
|
54
61
|
}
|
package/src/@core/core.stop.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| |
|
|
9
9
|
|_|
|
|
10
10
|
|
|
11
|
-
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
@@ -23,18 +23,20 @@ type TypeCorrelations = {
|
|
|
23
23
|
isCancel: boolean
|
|
24
24
|
isUpdate: boolean
|
|
25
25
|
isIssued: boolean
|
|
26
|
+
isStatement: boolean
|
|
26
27
|
}
|
|
27
28
|
|
|
28
29
|
export const statusCorrelationText: TypeCorrelations[] = [
|
|
29
|
-
{type: "
|
|
30
|
-
{type: "
|
|
31
|
-
{type: "
|
|
32
|
-
{type: "
|
|
33
|
-
{type: "
|
|
34
|
-
{type: "
|
|
35
|
-
{type: "
|
|
36
|
-
{type: "
|
|
37
|
-
{type: "
|
|
38
|
-
{type: "
|
|
39
|
-
{type: "
|
|
30
|
+
{type: "Statement", name: "Statement", isCancel: false, isUpdate: false, isIssued: true, isStatement: true},
|
|
31
|
+
{type: "Update", name: "Updated", isCancel: false, isUpdate: true, isIssued: false, isStatement: false},
|
|
32
|
+
{type: "Cancel", name: "Cancelled", isCancel: true, isUpdate: false, isIssued: false, isStatement: false},
|
|
33
|
+
{type: "Alert", name: "Issued", isCancel: false, isUpdate: false, isIssued: true, isStatement: false},
|
|
34
|
+
{type: "Updated", name: "Updated", isCancel: false, isUpdate: true, isIssued: false, isStatement: false},
|
|
35
|
+
{type: "Expired", name: "Expired", isCancel: true, isUpdate: false, isIssued: false, isStatement: false},
|
|
36
|
+
{type: "Issued", name: "Issued", isCancel: false, isUpdate: false, isIssued: true, isStatement: false},
|
|
37
|
+
{type: "Extended", name: "Extended", isCancel: false, isUpdate: true, isIssued: false, isStatement: false},
|
|
38
|
+
{type: "Correction", name: "Correction", isCancel: false, isUpdate: true, isIssued: false, isStatement: false},
|
|
39
|
+
{type: "Upgraded", name: "Upgraded", isCancel: false, isUpdate: true, isIssued: false, isStatement: false},
|
|
40
|
+
{type: "Cancelled", name: "Cancelled", isCancel: true, isUpdate: false, isIssued: false, isStatement: false},
|
|
41
|
+
{type: "Routine", name: "Routine", isCancel: false, isUpdate: true, isIssued: false, isStatement: false},
|
|
40
42
|
]
|
package/src/@dictionaries/{dictionaries.test_signatures.ts → dictionaries.testSignatures.ts}
RENAMED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| |
|
|
9
9
|
|_|
|
|
10
10
|
|
|
11
|
-
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx,
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
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
|
|
@@ -41,8 +41,10 @@ export const text = async (stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
41
41
|
const issued = new Date(attributes.issue)
|
|
42
42
|
const expires = new Date(issued.getTime() + 12 * 60 * 60 * 1000)
|
|
43
43
|
let event = Object.keys(eventsOffshore).find(event => message.toLowerCase().includes(event.toLowerCase()));
|
|
44
|
+
let isStatement = false;
|
|
44
45
|
if (!event) {
|
|
45
46
|
event = stanza.getType.type.split(`-`).map(word => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join(` `)
|
|
47
|
+
isStatement = true;
|
|
46
48
|
}
|
|
47
49
|
processed.push({
|
|
48
50
|
type: `Feature`,
|
|
@@ -53,9 +55,9 @@ export const text = async (stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
53
55
|
properties: {
|
|
54
56
|
event: event,
|
|
55
57
|
parent: event,
|
|
56
|
-
status: `Issued`,
|
|
58
|
+
status: isStatement ? `Statement` : `Issued`,
|
|
57
59
|
issued: (!isNaN(issued.getTime())) ? issued.toISOString() : new Date().toISOString(),
|
|
58
|
-
expires: (!isNaN(expires.getTime())) ? expires.toISOString() : new Date(Date.now() + 60 * 60 * 1000).toISOString(),
|
|
60
|
+
expires: isStatement ? new Date(issued.getTime() + 5 * 1000).toISOString() : (!isNaN(expires.getTime())) ? expires.toISOString() : new Date(Date.now() + 60 * 60 * 1000).toISOString(),
|
|
59
61
|
...props,
|
|
60
62
|
metadata: {
|
|
61
63
|
ms: performance.now() - tick,
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
| |
|
|
9
9
|
|_|
|
|
10
10
|
|
|
11
|
-
Created with ♥ by the AtmosphericX Team (KiyoWx, StarflightWx,
|
|
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
|
|
@@ -41,7 +41,7 @@ export const ugc = async (stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
41
41
|
if (ugc != null ) {
|
|
42
42
|
const props = properties({ message, attributes, ugc: ugc })
|
|
43
43
|
const issued = new Date(attributes.issue)
|
|
44
|
-
const expires = new Date(
|
|
44
|
+
const expires = new Date(ugc.expires).toISOString()
|
|
45
45
|
const header = getEventHeader({properties: props, getType: stanza.getType })
|
|
46
46
|
let event = Object.keys(eventsOffshore).find(event => message.toLowerCase().includes(event.toLowerCase()));
|
|
47
47
|
if (!event) {
|
|
@@ -58,7 +58,7 @@ export const ugc = async (stanza: TypeStanzaCompiled): Promise<void> => {
|
|
|
58
58
|
parent: event,
|
|
59
59
|
status: `Issued`,
|
|
60
60
|
issued: (!isNaN(issued.getTime())) ? issued.toISOString() : new Date().toISOString(),
|
|
61
|
-
expires: (!isNaN(expires.getTime())) ? expires
|
|
61
|
+
expires: (!isNaN(new Date(ugc.expires).getTime())) ? expires : new Date(Date.now() + 60 * 60 * 1000).toISOString(),
|
|
62
62
|
...props,
|
|
63
63
|
metadata: {
|
|
64
64
|
ms: performance.now() - tick,
|