@atmosx/event-product-parser 3.0.42 → 3.0.46
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 +70 -22
- package/SUPPORTED_EVENTS.md +369 -0
- package/dist/cjs/index.cjs +1990 -1758
- package/dist/esm/index.mjs +1560 -1329
- package/dist/index.d.mts +44 -20
- package/dist/index.d.ts +44 -20
- package/package.json +1 -1
- package/src/@building/building.attachments.ts +42 -0
- package/src/@building/building.create.ts +2 -2
- package/src/@building/building.enhance.ts +8 -4
- package/src/@building/building.geometry.ts +1 -1
- package/src/@building/building.headers.ts +1 -1
- package/src/@building/building.office.ts +4 -4
- package/src/@building/building.properties.ts +15 -13
- package/src/@building/building.signature.ts +11 -11
- package/src/@building/building.tags.ts +2 -2
- package/src/@building/building.tracking.ts +6 -6
- package/src/@building/building.validate.ts +5 -3
- package/src/@core/core.createEvent.ts +82 -0
- package/src/@core/core.query.ts +1 -1
- package/src/@core/core.start.ts +1 -1
- package/src/@dictionaries/{dictionaries.eventActions.ts → dictionaries.actions.ts} +1 -1
- package/src/@dictionaries/{dictionaries.eventAwipAbreviations.ts → dictionaries.awips.ts} +1 -1
- package/src/@dictionaries/{dictionaries.eventCancelMessages.ts → dictionaries.cancellation.ts} +1 -1
- package/src/@dictionaries/{dictionaries.eventCauses.ts → dictionaries.causes.ts} +1 -1
- package/src/@dictionaries/{dictionaries.statusCorrelationText.ts → dictionaries.correlations.ts} +1 -1
- package/src/@dictionaries/{dictionaries.betterEventNames.ts → dictionaries.enhanced.ts} +13 -2
- package/src/@dictionaries/{dictionaries.eventTypes.ts → dictionaries.events.ts} +1 -1
- package/src/@dictionaries/{dictionaries.regExp.ts → dictionaries.expressions.ts} +1 -1
- package/src/@dictionaries/{dictionaries.hailStrings.ts → dictionaries.hail.ts} +4 -1
- package/src/@dictionaries/{dictionaries.officeICAOs.ts → dictionaries.icao.ts} +1 -1
- package/src/@dictionaries/{dictionaries.eventsMatchText.ts → dictionaries.matches.ts} +1 -1
- package/src/@dictionaries/{dictionaries.eventProducts.ts → dictionaries.products.ts} +1 -1
- package/src/@dictionaries/{dictionaries.eventRecords.ts → dictionaries.records.ts} +1 -1
- package/src/@dictionaries/{dictionaries.eventSeverity.ts → dictionaries.severity.ts} +1 -1
- package/src/@dictionaries/{dictionaries.shapefileLinks.ts → dictionaries.shapefiles.ts} +1 -1
- package/src/@dictionaries/{dictionaries.eventStatus.ts → dictionaries.status.ts} +1 -1
- package/src/@dictionaries/{dictionaries.eventTags.ts → dictionaries.tags.ts} +1 -1
- package/src/@dictionaries/{dictionaries.testSignatures.ts → dictionaries.test.ts} +3 -2
- package/src/@events/events.api.ts +19 -14
- package/src/@events/events.text.ts +5 -4
- package/src/@events/events.ugc.ts +5 -4
- package/src/@events/events.vtec.ts +5 -4
- package/src/@manager/manager.mkEvent.ts +4 -4
- package/src/@manager/manager.rmEvent.ts +3 -2
- package/src/@manager/manager.setHash.ts +1 -1
- package/src/@manager/manager.updateListener.ts +124 -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 +3 -3
- package/src/@modules/@database/database.stanza.ts +2 -2
- package/src/@modules/@eas/eas.getCleanDescription.ts +91 -0
- package/src/@modules/@eas/eas.getTTS.ts +54 -0
- package/src/@modules/@eas/eas.setEasTone.ts +40 -30
- package/src/@modules/@stanza/stanza.getAwipsType.ts +3 -3
- package/src/@modules/@stanza/stanza.validate.ts +5 -5
- package/src/@modules/@utilities/utilities.getLatestIssuance.ts +32 -0
- package/src/@modules/@utilities/utilities.getSettings.ts +1 -1
- package/src/@modules/@utilities/utilities.setCronSchedule.ts +30 -2
- package/src/@modules/@utilities/utilities.setSettings.ts +1 -1
- package/src/@modules/@utilities/utilities.setWarning.ts +1 -1
- package/src/@modules/@xmpp/xmpp.xDeploy.ts +1 -1
- package/src/@modules/@xmpp/xmpp.xReconnect.ts +1 -1
- package/src/@modules/@xmpp/xmpp.xStanza.ts +1 -1
- package/src/@parsers/@hvtec/hvtec.extract.ts +9 -9
- package/src/@parsers/@pvtec/pvtec.extract.ts +13 -13
- package/src/@parsers/@text/text.getDescriptionFromProduct.ts +2 -2
- package/src/@parsers/@text/text.getEmbed.ts +60 -0
- package/src/@parsers/@ugc/ugc.extract.ts +1 -1
- package/src/@parsers/@ugc/ugc.header.ts +3 -3
- package/src/@types/{types.compiled.ts → type.compiled.ts} +1 -1
- package/src/@types/type.event.ts +6 -4
- package/src/@types/{types.webhook.ts → type.listener.ts} +11 -6
- package/src/@types/type.properties.ts +10 -8
- package/src/@types/{types.settings.ts → type.settings.ts} +7 -5
- package/src/bootstrap.ts +7 -5
- package/src/index.ts +3 -2
- package/test.js +19 -19
- package/src/@dictionaries/dictionaries.transcribedMessageReplacements.ts +0 -68
- package/src/@manager/manager.createWebhook.ts +0 -117
- package/src/@manager/manager.updateWebhooks.ts +0 -49
- /package/src/@types/{types.attributes.ts → type.attributes.ts} +0 -0
- /package/src/@types/{types.hash.ts → type.hash.ts} +0 -0
- /package/src/@types/{types.hvtec.ts → type.hvtec.ts} +0 -0
- /package/src/@types/{types.pvtec.ts → type.pvtec.ts} +0 -0
- /package/src/@types/{types.stanza.ts → type.stanza.ts} +0 -0
- /package/src/@types/{types.ugc.ts → type.ugc.ts} +0 -0
|
@@ -1,49 +0,0 @@
|
|
|
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 { createWebhook } from "./manager.createWebhook";
|
|
21
|
-
import { TypeEvent } from "../@types/type.event";
|
|
22
|
-
import { TypeWebhook } from "../@types/types.webhook";
|
|
23
|
-
import { bootstrap } from "../bootstrap"
|
|
24
|
-
|
|
25
|
-
export const updateWebhooks = async (event: TypeEvent): Promise<void> => {
|
|
26
|
-
const settings = bootstrap.settings;
|
|
27
|
-
const webhooks = settings.WebhookSettings as TypeWebhook[];
|
|
28
|
-
const eventName = event.properties.event;
|
|
29
|
-
for (const socket of webhooks) {
|
|
30
|
-
const events = socket.events;
|
|
31
|
-
if (!events || events.length === 0) {
|
|
32
|
-
await createWebhook({ webhook: socket, event });
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
const matched = events.some(pattern => {
|
|
36
|
-
if (!pattern) return false;
|
|
37
|
-
if (pattern === "*" || pattern === eventName) return true;
|
|
38
|
-
if (pattern.includes("*")) {
|
|
39
|
-
const regex = "^" +
|
|
40
|
-
pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*") + "$";
|
|
41
|
-
return new RegExp(regex).test(eventName);
|
|
42
|
-
}
|
|
43
|
-
return false;
|
|
44
|
-
});
|
|
45
|
-
if (matched) {
|
|
46
|
-
await createWebhook({ webhook: socket, event });
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|