@atmosx/event-product-parser 3.0.46 → 3.0.47
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 +12 -1
- package/dist/cjs/index.cjs +381 -206
- package/dist/esm/index.mjs +381 -206
- package/dist/index.d.mts +12 -1
- package/dist/index.d.ts +12 -1
- package/package.json +1 -1
- package/src/@building/building.attachments.ts +47 -6
- package/src/@building/building.properties.ts +1 -0
- package/src/@building/building.signature.ts +1 -1
- package/src/@core/core.createEvent.ts +1 -0
- package/src/@dictionaries/dictionaries.cancellation.ts +1 -0
- package/src/@dictionaries/dictionaries.expressions.ts +1 -0
- package/src/@dictionaries/dictionaries.states.ts +72 -0
- package/src/@events/events.api.ts +1 -0
- package/src/@manager/manager.updateListener.ts +105 -66
- package/src/@modules/@database/database.broadcastify.ts +67 -0
- package/src/@modules/@database/database.init.ts +14 -1
- package/src/@modules/@database/database.shapefiles.ts +1 -4
- package/src/@modules/@utilities/utilities.createHttp.ts +56 -47
- package/src/@modules/@utilities/utilities.setCronSchedule.ts +1 -0
- package/src/@modules/@xmpp/xmpp.xReconnect.ts +1 -1
- package/src/@parsers/@text/text.getEmbed.ts +0 -2
- package/src/@types/type.event.ts +1 -1
- package/src/@types/type.listener.ts +1 -1
- package/src/@types/type.properties.ts +1 -0
- package/src/@types/type.settings.ts +7 -1
- package/src/bootstrap.ts +7 -1
- package/test.js +12 -4
- /package/src/@dictionaries/{dictionaries.test.ts → dictionaries.testing.ts} +0 -0
package/dist/esm/index.mjs
CHANGED
|
@@ -10491,7 +10491,7 @@ var require_form_data = __commonJS({
|
|
|
10491
10491
|
import path from "path";
|
|
10492
10492
|
import { EventEmitter } from "events";
|
|
10493
10493
|
var bootstrap = {
|
|
10494
|
-
version: `3.0.
|
|
10494
|
+
version: `3.0.47`,
|
|
10495
10495
|
isReady: true,
|
|
10496
10496
|
ratelimits: {},
|
|
10497
10497
|
session_xmpp: null,
|
|
@@ -10547,6 +10547,11 @@ var bootstrap = {
|
|
|
10547
10547
|
CallbackInterval: 15,
|
|
10548
10548
|
EventsEndpoint: `https://api.weather.gov/alerts/active`
|
|
10549
10549
|
},
|
|
10550
|
+
BroadcastifySettings: {
|
|
10551
|
+
BroadcastifyAttachments: true,
|
|
10552
|
+
BroadcastifyDatabase: `https://scriptkitty.cafe/ftp/@atmosphericx/assets/broadcastify.json`,
|
|
10553
|
+
BroadcastifyTags: [`Ham`, `Air`, `Fire`, `Public Safety`, `Weather`, `EMS`, `Police`, `Rail`]
|
|
10554
|
+
},
|
|
10550
10555
|
ListenerSettings: [],
|
|
10551
10556
|
GlobalSettings: {
|
|
10552
10557
|
EventManagement: true,
|
|
@@ -10569,6 +10574,7 @@ var bootstrap = {
|
|
|
10569
10574
|
},
|
|
10570
10575
|
ArchiveSettings: {
|
|
10571
10576
|
TTL: 60,
|
|
10577
|
+
EventDirectory: null,
|
|
10572
10578
|
TextDirectory: null,
|
|
10573
10579
|
EasDirectory: null,
|
|
10574
10580
|
EasToneout: null
|
|
@@ -13587,6 +13593,7 @@ var xError = () => {
|
|
|
13587
13593
|
|
|
13588
13594
|
// src/@dictionaries/dictionaries.expressions.ts
|
|
13589
13595
|
var dict_expressions = {
|
|
13596
|
+
location: new RegExp(/^([A-Za-z.\-' ]+),\s*([A-Z]{2})$/),
|
|
13590
13597
|
pvtec: new RegExp(`[OTEX].(NEW|CON|EXT|EXA|EXB|UPG|CAN|EXP|COR|ROU).[A-Z]{4}.[A-Z]{2}.[WAYSFON].[0-9]{4}.[0-9]{6}T[0-9]{4}Z-[0-9]{6}T[0-9]{4}Z`, "g"),
|
|
13591
13598
|
hvtec: new RegExp(`[a-zA-Z0-9]{4}.[A-Z0-9].[A-Z]{2}.[0-9]{6}T[0-9]{4}Z.[0-9]{6}T[0-9]{4}Z.[0-9]{6}T[0-9]{4}Z.[A-Z]{2}`, "imu"),
|
|
13592
13599
|
wmo: new RegExp(`[A-Z0-9]{6}\\s[A-Z]{4}\\s\\d{6}`, "imu"),
|
|
@@ -14394,54 +14401,55 @@ var getEventTags = (message) => {
|
|
|
14394
14401
|
|
|
14395
14402
|
// src/@building/building.properties.ts
|
|
14396
14403
|
var properties = (options) => {
|
|
14397
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V;
|
|
14404
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X;
|
|
14398
14405
|
const organization = (_b = (_a = options.message.match(dict_expressions.wmo)) == null ? void 0 : _a[0]) != null ? _b : null;
|
|
14399
14406
|
const polygons = getPolygonFromProduct(options.message);
|
|
14400
14407
|
const properties2 = {
|
|
14401
14408
|
locations: (_e = (_d = (_c = options == null ? void 0 : options.ugc) == null ? void 0 : _c.locations) == null ? void 0 : _d.join(`; `)) != null ? _e : null,
|
|
14402
|
-
|
|
14409
|
+
locations_array: (_g = (_f = options == null ? void 0 : options.ugc) == null ? void 0 : _f.locations) != null ? _g : [],
|
|
14410
|
+
description: getDescriptionFromProduct({ message: options.message, handle: (_i = (_h = options == null ? void 0 : options.pVtec) == null ? void 0 : _h.vtec) != null ? _i : null }),
|
|
14403
14411
|
attributes: options.attributes,
|
|
14404
14412
|
geocode: {
|
|
14405
14413
|
office: getEventOffice({ attributes: options.attributes, organization, pVtec: options.pVtec }),
|
|
14406
14414
|
organization,
|
|
14407
|
-
ugc: (
|
|
14415
|
+
ugc: (_k = (_j = options == null ? void 0 : options.ugc) == null ? void 0 : _j.zones) != null ? _k : [],
|
|
14408
14416
|
polygon: polygons.length > 0 ? Buffer.from(JSON.stringify([polygons])).toString("base64") : null,
|
|
14409
14417
|
polygon_generated: polygons.length > 0 ? true : false
|
|
14410
14418
|
},
|
|
14411
14419
|
parameters: {
|
|
14412
14420
|
tags: getEventTags(options.message),
|
|
14413
|
-
instructions: (
|
|
14414
|
-
source: (
|
|
14415
|
-
hazards: (
|
|
14416
|
-
impacts: (
|
|
14417
|
-
estimated_hail_size: (
|
|
14418
|
-
estimated_wind_gusts: (
|
|
14419
|
-
damage_threat: (
|
|
14420
|
-
tornado_threat: (
|
|
14421
|
-
flood_threat: (
|
|
14422
|
-
wind_threat: (
|
|
14423
|
-
hail_threat: (
|
|
14421
|
+
instructions: (_l = getTextFromProduct({ message: options.message, find: [`For your protection`, `do not`, `use extreme caution`], append: `...`, removal: [`.`] })) != null ? _l : null,
|
|
14422
|
+
source: (_m = getTextFromProduct({ message: options.message, find: [`SOURCE...`], removal: [`.`] })) != null ? _m : null,
|
|
14423
|
+
hazards: (_n = getTextFromProduct({ message: options.message, find: [`HAZARD...`], removal: [`.`] })) != null ? _n : null,
|
|
14424
|
+
impacts: (_o = getTextFromProduct({ message: options.message, find: [`IMPACT...`], removal: [`.`] })) != null ? _o : null,
|
|
14425
|
+
estimated_hail_size: (_p = getTextFromProduct({ message: options.message, find: [`MAX HAIL SIZE...`, `HAIL...`], removal: ["in"] })) != null ? _p : null,
|
|
14426
|
+
estimated_wind_gusts: (_q = getTextFromProduct({ message: options.message, find: [`MAX WIND GUST...`, `WIND...`] })) != null ? _q : null,
|
|
14427
|
+
damage_threat: (_r = getTextFromProduct({ message: options.message, find: [`DAMAGE THREAT...`], removal: [] })) != null ? _r : null,
|
|
14428
|
+
tornado_threat: (_s = getTextFromProduct({ message: options.message, find: [`TORNADO...`, `WATERSPOUT...`] })) != null ? _s : null,
|
|
14429
|
+
flood_threat: (_t = getTextFromProduct({ message: options.message, find: [`FLASH FLOOD...`] })) != null ? _t : null,
|
|
14430
|
+
wind_threat: (_u = getTextFromProduct({ message: options.message, find: [`WIND THREAT...`] })) != null ? _u : null,
|
|
14431
|
+
hail_threat: (_v = getTextFromProduct({ message: options.message, find: [`HAIL THREAT...`], removal: [] })) != null ? _v : null
|
|
14424
14432
|
},
|
|
14425
14433
|
discussion_parameters: {
|
|
14426
|
-
discussion_number: (
|
|
14427
|
-
discussion_concerning: (
|
|
14428
|
-
discussion_max_tornado: (
|
|
14429
|
-
discussion_max_hail: (
|
|
14430
|
-
discussion_max_wind: (
|
|
14431
|
-
discussion_watch_issuance: (
|
|
14434
|
+
discussion_number: (_y = (_x = (_w = getTextFromProduct({ message: options.message, find: [`Mesoscale Discussion `], removal: [`Mesoscale Discussion`, `Number`, `...`] })) == null ? void 0 : _w.toString()) == null ? void 0 : _x.padStart(4, "0")) != null ? _y : null,
|
|
14435
|
+
discussion_concerning: (_z = getTextFromProduct({ message: options.message, find: [`Concerning...`] })) != null ? _z : null,
|
|
14436
|
+
discussion_max_tornado: (_A = getTextFromProduct({ message: options.message, find: [`MOST PROBABLE PEAK TORNADO INTENSITY...`] })) != null ? _A : null,
|
|
14437
|
+
discussion_max_hail: (_B = getTextFromProduct({ message: options.message, find: [`MOST PROBABLE PEAK HAIL SIZE...`] })) != null ? _B : null,
|
|
14438
|
+
discussion_max_wind: (_C = getTextFromProduct({ message: options.message, find: [`MOST PROBABLE PEAK WIND GUST...`] })) != null ? _C : null,
|
|
14439
|
+
discussion_watch_issuance: (_D = getTextFromProduct({ message: options.message, find: [`Probability of Watch Issuance...`], removal: [`percent`] })) != null ? _D : null
|
|
14432
14440
|
},
|
|
14433
14441
|
watch_parameters: {
|
|
14434
|
-
watch_number: ((
|
|
14442
|
+
watch_number: ((_E = options == null ? void 0 : options.pVtec) == null ? void 0 : _E.is_watch) && ((_O = (_N = (_I = (_H = (_G = (_F = getTextFromProduct({ message: options.message, find: [`ITIES FOR`, `UPDATE FOR`, `Watch Number `], removal: [`%`, `<`, `:`] })) == null ? void 0 : _F.replace(/(WT|WS|)/g, "")) == null ? void 0 : _G.trim()) == null ? void 0 : _H.toString()) == null ? void 0 : _I.padStart(4, "0")) != null ? _N : (_M = (_L = (_K = (_J = options == null ? void 0 : options.pVtec) == null ? void 0 : _J.tracking) == null ? void 0 : _K.slice(-4)) == null ? void 0 : _L.toString()) == null ? void 0 : _M.padStart(4, "0")) != null ? _O : null),
|
|
14435
14443
|
watch_type: options.message.includes(`TORNADO WATCH`) ? `Tornado` : (options == null ? void 0 : options.message.includes(`SEVERE`)) ? `Severe` : null,
|
|
14436
|
-
additional_tornadoes_probability: (
|
|
14437
|
-
strong_tornadoes_probability: (
|
|
14438
|
-
severe_wind_probability: (
|
|
14439
|
-
severe_hail_probability: (
|
|
14440
|
-
hail_2in_probability: (
|
|
14441
|
-
combined_hail_wind_probability: (
|
|
14442
|
-
max_hail_in: (
|
|
14443
|
-
max_wind_surface: (
|
|
14444
|
-
max_tops_x100feet: (
|
|
14444
|
+
additional_tornadoes_probability: (_P = getTextFromProduct({ message: options.message, find: [`PROB OF 2 OR MORE TORNADOES`], removal: [`%`, `<`, `:`] })) != null ? _P : null,
|
|
14445
|
+
strong_tornadoes_probability: (_Q = getTextFromProduct({ message: options.message, find: [`PROB OF 1 OR MORE STRONG /EF2-EF5/ TORNADOES`], removal: [`%`, `<`, `:`] })) != null ? _Q : null,
|
|
14446
|
+
severe_wind_probability: (_R = getTextFromProduct({ message: options.message, find: [`PROB OF 10 OR MORE SEVERE WIND EVENTS`], removal: [`%`, `<`, `:`] })) != null ? _R : null,
|
|
14447
|
+
severe_hail_probability: (_S = getTextFromProduct({ message: options.message, find: [`PROB OF 10 OR MORE SEVERE HAIL EVENTS`], removal: [`%`, `<`, `:`] })) != null ? _S : null,
|
|
14448
|
+
hail_2in_probability: (_T = getTextFromProduct({ message: options.message, find: [`PROB OF 1 OR MORE HAIL EVENTS >= 2 INCHES`], removal: [`%`, `<`, `:`] })) != null ? _T : null,
|
|
14449
|
+
combined_hail_wind_probability: (_U = getTextFromProduct({ message: options.message, find: [`PROB OF 6 OR MORE COMBINED SEVERE HAIL/WIND EVENTS`], removal: [`%`, `<`, `:`] })) != null ? _U : null,
|
|
14450
|
+
max_hail_in: (_V = getTextFromProduct({ message: options.message, find: [`MAX HAIL /INCHES/`], removal: [`%`, `<`, `:`] })) != null ? _V : null,
|
|
14451
|
+
max_wind_surface: (_W = getTextFromProduct({ message: options.message, find: [`MAX WIND GUSTS SURFACE /KNOTS/`], removal: [`%`, `<`, `:`] })) != null ? _W : null,
|
|
14452
|
+
max_tops_x100feet: (_X = getTextFromProduct({ message: options.message, find: [`MAX TOPS /X 100 FEET/`], removal: [`%`, `<`, `:`] })) != null ? _X : null,
|
|
14445
14453
|
pds_watch: getTextFromProduct({ message: options.message, find: [`PARTICULARLY DANGEROUS SITUATION`], removal: [`%`, `<`, `:`] }) === `YES` ? true : null
|
|
14446
14454
|
}
|
|
14447
14455
|
};
|
|
@@ -14659,6 +14667,7 @@ var dict_cancellation = [
|
|
|
14659
14667
|
"has been cancelled",
|
|
14660
14668
|
"subsided sufficiently for the advisory to be cancelled",
|
|
14661
14669
|
"has been cancelled",
|
|
14670
|
+
"no tsunami threat from a nearby earthquake",
|
|
14662
14671
|
"will be allowed to expire",
|
|
14663
14672
|
"has diminished",
|
|
14664
14673
|
"and no longer",
|
|
@@ -14667,7 +14676,7 @@ var dict_cancellation = [
|
|
|
14667
14676
|
"has weakened below severe"
|
|
14668
14677
|
];
|
|
14669
14678
|
|
|
14670
|
-
// src/@dictionaries/dictionaries.
|
|
14679
|
+
// src/@dictionaries/dictionaries.testing.ts
|
|
14671
14680
|
var dict_testing = [
|
|
14672
14681
|
`This is a test message`,
|
|
14673
14682
|
`Monitoring message only.`,
|
|
@@ -15207,7 +15216,7 @@ var setEasTone = (options) => __async(null, null, function* () {
|
|
|
15207
15216
|
|
|
15208
15217
|
// src/@parsers/@text/text.getEmbed.ts
|
|
15209
15218
|
var getEmebed = (event) => {
|
|
15210
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na
|
|
15219
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na;
|
|
15211
15220
|
const line = (label, value, condition = true) => condition && value ? `${label} ${value}` : null;
|
|
15212
15221
|
const isStatement = event.properties.status_metadata.is_statement;
|
|
15213
15222
|
const isExpired = event.properties.status_metadata.is_expired;
|
|
@@ -15239,12 +15248,7 @@ var getEmebed = (event) => {
|
|
|
15239
15248
|
line(`**Tags:**`, ((_sa = (_ra = (_qa = event == null ? void 0 : event.properties) == null ? void 0 : _qa.parameters) == null ? void 0 : _ra.tags) == null ? void 0 : _sa.length) > 0 ? (_ua = (_ta = event == null ? void 0 : event.properties) == null ? void 0 : _ta.parameters) == null ? void 0 : _ua.tags.join(", ") : null, !isExpired),
|
|
15240
15249
|
line(`**Sender:**`, ((_xa = (_wa = (_va = event == null ? void 0 : event.properties) == null ? void 0 : _va.geocode) == null ? void 0 : _wa.office) == null ? void 0 : _xa.name) ? `${(_Aa = (_za = (_ya = event == null ? void 0 : event.properties) == null ? void 0 : _ya.geocode) == null ? void 0 : _za.office) == null ? void 0 : _Aa.name} (${(_Da = (_Ca = (_Ba = event == null ? void 0 : event.properties) == null ? void 0 : _Ba.geocode) == null ? void 0 : _Ca.office) == null ? void 0 : _Da.office})` : (_Ga = (_Fa = (_Ea = event == null ? void 0 : event.properties) == null ? void 0 : _Ea.geocode) == null ? void 0 : _Fa.office) == null ? void 0 : _Ga.office),
|
|
15241
15250
|
line(`**Tracking:**`, (_Ia = (_Ha = event == null ? void 0 : event.properties) == null ? void 0 : _Ha.metadata) == null ? void 0 : _Ia.tracking),
|
|
15242
|
-
line(`**Logs:**`, ((_La = (_Ka = (_Ja = event == null ? void 0 : event.properties) == null ? void 0 : _Ja.metadata) == null ? void 0 : _Ka.history) == null ? void 0 : _La.length) > 0 ? (_Na = (_Ma = event == null ? void 0 : event.properties) == null ? void 0 : _Ma.metadata) == null ? void 0 : _Na.history.length : null)
|
|
15243
|
-
line(``, ((_Qa = (_Pa = (_Oa = event == null ? void 0 : event.properties) == null ? void 0 : _Oa.metadata) == null ? void 0 : _Pa.attachments) == null ? void 0 : _Qa.length) > 0 ? `**Attachments:** ${(_Sa = (_Ra = event == null ? void 0 : event.properties) == null ? void 0 : _Ra.metadata) == null ? void 0 : _Sa.attachments.map((attachment) => {
|
|
15244
|
-
var _a2, _b2;
|
|
15245
|
-
return `[Attachment #${((_b2 = (_a2 = event == null ? void 0 : event.properties) == null ? void 0 : _a2.metadata) == null ? void 0 : _b2.attachments.indexOf(attachment)) + 1}](${attachment})`;
|
|
15246
|
-
}).join(" | ")}` : null),
|
|
15247
|
-
line(``, ((_Ta = event == null ? void 0 : event.properties) == null ? void 0 : _Ta.description) ? "```\n" + ((_Ua = event == null ? void 0 : event.properties) == null ? void 0 : _Ua.description.split("\n").map((l) => l.trim()).filter(Boolean).join("\n")) + "\n```" : null, !isExpired)
|
|
15251
|
+
line(`**Logs:**`, ((_La = (_Ka = (_Ja = event == null ? void 0 : event.properties) == null ? void 0 : _Ja.metadata) == null ? void 0 : _Ka.history) == null ? void 0 : _La.length) > 0 ? (_Na = (_Ma = event == null ? void 0 : event.properties) == null ? void 0 : _Ma.metadata) == null ? void 0 : _Na.history.length : null)
|
|
15248
15252
|
].filter(Boolean).join("\n");
|
|
15249
15253
|
};
|
|
15250
15254
|
|
|
@@ -15252,57 +15256,66 @@ var getEmebed = (event) => {
|
|
|
15252
15256
|
import request from "request";
|
|
15253
15257
|
var createHttp = (options) => __async(null, null, function* () {
|
|
15254
15258
|
return new Promise((resolve6, reject) => {
|
|
15255
|
-
var _a, _b, _c, _d, _e;
|
|
15256
|
-
|
|
15257
|
-
|
|
15258
|
-
|
|
15259
|
-
|
|
15260
|
-
|
|
15261
|
-
|
|
15262
|
-
|
|
15263
|
-
|
|
15264
|
-
|
|
15265
|
-
|
|
15266
|
-
|
|
15267
|
-
|
|
15268
|
-
|
|
15269
|
-
|
|
15270
|
-
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
request(requestOptions, (error, response2, body) => {
|
|
15274
|
-
var _a2, _b2, _c2, _d2, _e2;
|
|
15275
|
-
if (error) {
|
|
15276
|
-
return resolve6({
|
|
15277
|
-
error: true,
|
|
15278
|
-
options: requestOptions,
|
|
15279
|
-
status: -1,
|
|
15280
|
-
message: (_a2 = error.message) != null ? _a2 : `Unknown Error`
|
|
15281
|
-
});
|
|
15282
|
-
}
|
|
15283
|
-
if (response2.statusCode < 200 || response2.statusCode >= 300) {
|
|
15284
|
-
return resolve6({
|
|
15285
|
-
error: true,
|
|
15286
|
-
options: requestOptions,
|
|
15287
|
-
status: (_b2 = response2.statusCode) != null ? _b2 : -1,
|
|
15288
|
-
message: `HTTP Status Code ${(_c2 = response2.statusCode) != null ? _c2 : `Unknown Status Code`} (${body})`
|
|
15289
|
-
});
|
|
15259
|
+
var _a, _b, _c, _d, _e, _f;
|
|
15260
|
+
try {
|
|
15261
|
+
const requestOptions = {
|
|
15262
|
+
url: (_a = options.url) != null ? _a : `https://api.weather.gov/alerts/active`,
|
|
15263
|
+
headers: (_b = options.headers) != null ? _b : {
|
|
15264
|
+
"User-Agent": "AtmosphericX",
|
|
15265
|
+
"Accept": "application/geo+json, text/plain, */*; q=0.9",
|
|
15266
|
+
"Accept-Language": "en-US,en;q=0.9"
|
|
15267
|
+
},
|
|
15268
|
+
method: (_c = options.method) != null ? _c : `GET`,
|
|
15269
|
+
timeout: (_d = options.timeout) != null ? _d : 1e4,
|
|
15270
|
+
proxy: (_e = options.proxy) != null ? _e : null,
|
|
15271
|
+
maxRedirects: 1
|
|
15272
|
+
};
|
|
15273
|
+
if (options.formData) {
|
|
15274
|
+
requestOptions["formData"] = options.formData;
|
|
15275
|
+
} else if (options.body) {
|
|
15276
|
+
requestOptions["body"] = options.body;
|
|
15290
15277
|
}
|
|
15291
|
-
|
|
15292
|
-
|
|
15293
|
-
|
|
15278
|
+
request(requestOptions, (error, response2, body) => {
|
|
15279
|
+
var _a2, _b2, _c2, _d2, _e2;
|
|
15280
|
+
if (error) {
|
|
15281
|
+
return resolve6({
|
|
15282
|
+
error: true,
|
|
15283
|
+
options: requestOptions,
|
|
15284
|
+
status: -1,
|
|
15285
|
+
message: (_a2 = error.message) != null ? _a2 : `Unknown Error`
|
|
15286
|
+
});
|
|
15287
|
+
}
|
|
15288
|
+
if (response2.statusCode < 200 || response2.statusCode >= 300) {
|
|
15289
|
+
return resolve6({
|
|
15290
|
+
error: true,
|
|
15291
|
+
options: requestOptions,
|
|
15292
|
+
status: (_b2 = response2.statusCode) != null ? _b2 : -1,
|
|
15293
|
+
message: `HTTP Status Code ${(_c2 = response2.statusCode) != null ? _c2 : `Unknown Status Code`} (${body})`
|
|
15294
|
+
});
|
|
15295
|
+
}
|
|
15296
|
+
if (body == void 0 || body == null) {
|
|
15297
|
+
return resolve6({
|
|
15298
|
+
error: true,
|
|
15299
|
+
options: requestOptions,
|
|
15300
|
+
status: (_d2 = response2.statusCode) != null ? _d2 : -1,
|
|
15301
|
+
message: `Empty Response Body`
|
|
15302
|
+
});
|
|
15303
|
+
}
|
|
15304
|
+
resolve6({
|
|
15305
|
+
error: false,
|
|
15294
15306
|
options: requestOptions,
|
|
15295
|
-
status: (
|
|
15296
|
-
message:
|
|
15307
|
+
status: (_e2 = response2.statusCode) != null ? _e2 : -1,
|
|
15308
|
+
message: body
|
|
15297
15309
|
});
|
|
15298
|
-
}
|
|
15299
|
-
resolve6({
|
|
15300
|
-
error: false,
|
|
15301
|
-
options: requestOptions,
|
|
15302
|
-
status: (_e2 = response2.statusCode) != null ? _e2 : -1,
|
|
15303
|
-
message: body
|
|
15304
15310
|
});
|
|
15305
|
-
})
|
|
15311
|
+
} catch (error) {
|
|
15312
|
+
return resolve6({
|
|
15313
|
+
error: true,
|
|
15314
|
+
options: {},
|
|
15315
|
+
status: -1,
|
|
15316
|
+
message: (_f = error.message) != null ? _f : `Unknown Error`
|
|
15317
|
+
});
|
|
15318
|
+
}
|
|
15306
15319
|
});
|
|
15307
15320
|
});
|
|
15308
15321
|
|
|
@@ -15314,86 +15327,119 @@ var updateListener = (event) => __async(null, null, function* () {
|
|
|
15314
15327
|
const settings = bootstrap.settings;
|
|
15315
15328
|
const listeners2 = settings.ListenerSettings;
|
|
15316
15329
|
const properties2 = event.properties;
|
|
15317
|
-
|
|
15318
|
-
|
|
15319
|
-
|
|
15320
|
-
|
|
15321
|
-
|
|
15330
|
+
const metadata = {
|
|
15331
|
+
file: null,
|
|
15332
|
+
eas: null,
|
|
15333
|
+
name: properties2.event,
|
|
15334
|
+
status: properties2.status,
|
|
15335
|
+
description: properties2.description,
|
|
15336
|
+
tracking: properties2.metadata.tracking,
|
|
15337
|
+
header: properties2.metadata.header,
|
|
15338
|
+
raw: properties2.metadata.raw,
|
|
15339
|
+
expired: properties2.status_metadata.is_expired,
|
|
15340
|
+
attachments: properties2.metadata.attachments
|
|
15341
|
+
};
|
|
15342
|
+
for (const listener2 of listeners2) {
|
|
15343
|
+
const events = listener2 == null ? void 0 : listener2.events;
|
|
15344
|
+
const webhook = listener2 == null ? void 0 : listener2.webhook;
|
|
15345
|
+
const uploads = listener2 == null ? void 0 : listener2.uploads;
|
|
15346
|
+
const isMatched = events.some((pattern) => {
|
|
15322
15347
|
if (!pattern) return false;
|
|
15323
|
-
if (pattern === "*" || pattern ===
|
|
15348
|
+
if (pattern === "*" || pattern === metadata.name) return true;
|
|
15324
15349
|
if (pattern.includes("*")) {
|
|
15325
15350
|
const regex = "^" + pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*") + "$";
|
|
15326
|
-
return new RegExp(regex).test(
|
|
15351
|
+
return new RegExp(regex).test(metadata.name);
|
|
15327
15352
|
}
|
|
15328
15353
|
return false;
|
|
15329
15354
|
});
|
|
15330
|
-
if ((events == null ? void 0 : events.length) == 0 ||
|
|
15331
|
-
|
|
15332
|
-
|
|
15333
|
-
|
|
15334
|
-
|
|
15335
|
-
|
|
15336
|
-
message: properties2.description,
|
|
15337
|
-
header: properties2.metadata.header
|
|
15355
|
+
if ((events == null ? void 0 : events.length) == 0 || isMatched) {
|
|
15356
|
+
if (uploads == null ? void 0 : uploads.eas) {
|
|
15357
|
+
metadata.eas = yield setEasTone({
|
|
15358
|
+
title: `${metadata.name}_${metadata.status}_${metadata.tracking}`,
|
|
15359
|
+
message: metadata.description,
|
|
15360
|
+
header: metadata.header
|
|
15338
15361
|
});
|
|
15339
15362
|
}
|
|
15340
|
-
if (
|
|
15341
|
-
const
|
|
15342
|
-
if (
|
|
15343
|
-
if (!existsSync2(
|
|
15344
|
-
mkdirSync2(
|
|
15363
|
+
if (uploads == null ? void 0 : uploads.file) {
|
|
15364
|
+
const fDestination = settings.GlobalSettings.ArchiveSettings.TextDirectory;
|
|
15365
|
+
if (fDestination) {
|
|
15366
|
+
if (!existsSync2(fDestination)) {
|
|
15367
|
+
mkdirSync2(fDestination, { recursive: true });
|
|
15345
15368
|
}
|
|
15346
|
-
if (existsSync2(`${
|
|
15347
|
-
appendFileSync(`${
|
|
15369
|
+
if (existsSync2(`${fDestination}/${metadata.name}_${metadata.status}_${metadata.tracking}.txt`)) {
|
|
15370
|
+
appendFileSync(`${fDestination}/${metadata.name}_${metadata.status}_${metadata.tracking}.txt`, metadata.raw);
|
|
15348
15371
|
} else {
|
|
15349
|
-
writeFileSync3(`${
|
|
15372
|
+
writeFileSync3(`${fDestination}/${metadata.name}_${metadata.status}_${metadata.tracking}.txt`, metadata.raw);
|
|
15350
15373
|
}
|
|
15351
15374
|
}
|
|
15352
|
-
file =
|
|
15375
|
+
metadata.file = metadata.raw;
|
|
15353
15376
|
}
|
|
15354
|
-
if (
|
|
15355
|
-
const
|
|
15356
|
-
if (
|
|
15357
|
-
|
|
15358
|
-
|
|
15359
|
-
body = body.substring(0, 1900) + "\n\n[Message truncated due to length]";
|
|
15360
|
-
const blocks = ((_a = body.match(/```/g)) != null ? _a : []).length;
|
|
15361
|
-
if (blocks % 2 !== 0) body += "```";
|
|
15362
|
-
}
|
|
15363
|
-
if (properties2.description.length < 25) {
|
|
15364
|
-
continue;
|
|
15365
|
-
}
|
|
15366
|
-
const form = new import_form_data.default();
|
|
15367
|
-
const embed = {
|
|
15368
|
-
title: `${properties2.event} (${properties2.status})`,
|
|
15369
|
-
description: body,
|
|
15370
|
-
color: 16711680,
|
|
15371
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
15372
|
-
image: {},
|
|
15373
|
-
footer: { text: (_b = sWebhook.title) != null ? _b : `AtmosphericX` }
|
|
15374
|
-
};
|
|
15375
|
-
form.append("payload_json", JSON.stringify({
|
|
15376
|
-
username: (_c = sWebhook.title) != null ? _c : "AtmosphericX",
|
|
15377
|
-
content: (_d = sWebhook.message) != null ? _d : "",
|
|
15378
|
-
embeds: [embed]
|
|
15379
|
-
}));
|
|
15380
|
-
if (sUploads == null ? void 0 : sUploads.file) {
|
|
15381
|
-
form.append("fUpload", Buffer.from(file), { filename: `${properties2.event}_${properties2.status}_${properties2.metadata.tracking}.txt`, contentType: "application/text" });
|
|
15377
|
+
if (uploads == null ? void 0 : uploads.event) {
|
|
15378
|
+
const eDestination = settings.GlobalSettings.ArchiveSettings.EventDirectory;
|
|
15379
|
+
if (eDestination) {
|
|
15380
|
+
if (!existsSync2(eDestination)) {
|
|
15381
|
+
mkdirSync2(eDestination, { recursive: true });
|
|
15382
15382
|
}
|
|
15383
|
-
|
|
15384
|
-
|
|
15385
|
-
|
|
15386
|
-
|
|
15387
|
-
|
|
15383
|
+
writeFileSync3(`${eDestination}/${metadata.name}_${metadata.status}_${metadata.tracking}.json`, JSON.stringify(getCleanedEvent(event), null, 2));
|
|
15384
|
+
}
|
|
15385
|
+
}
|
|
15386
|
+
if (webhook.enabled && webhook.destination) {
|
|
15387
|
+
const ratelimit = setTimeoutAction({ identifier: webhook.destination, interval: webhook.ratelimit, max: webhook.ratelimit, addTime: true });
|
|
15388
|
+
const form = new import_form_data.default();
|
|
15389
|
+
const embed = {
|
|
15390
|
+
title: `${metadata.name} (${metadata.status})`,
|
|
15391
|
+
description: getEmebed(event),
|
|
15392
|
+
fields: [],
|
|
15393
|
+
color: 16711680,
|
|
15394
|
+
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
15395
|
+
footer: { text: (_a = webhook.title) != null ? _a : `AtmosphericX` }
|
|
15396
|
+
};
|
|
15397
|
+
if (ratelimit.limited) {
|
|
15398
|
+
return;
|
|
15399
|
+
}
|
|
15400
|
+
if (metadata.description && !metadata.expired) {
|
|
15401
|
+
if (metadata.description.length > 900) {
|
|
15402
|
+
metadata.description = metadata.description.substring(0, 900) + "\n\n[Message truncated due to length]";
|
|
15388
15403
|
}
|
|
15389
|
-
|
|
15390
|
-
|
|
15391
|
-
|
|
15392
|
-
|
|
15393
|
-
|
|
15394
|
-
|
|
15404
|
+
embed.fields.push({
|
|
15405
|
+
name: "Description",
|
|
15406
|
+
value: metadata.description ? "```\n" + metadata.description.split("\n").map((l) => l.trim()).filter(Boolean).join("\n") + "\n```" : ""
|
|
15407
|
+
});
|
|
15408
|
+
}
|
|
15409
|
+
if (((_b = metadata.attachments) == null ? void 0 : _b.length) > 0) {
|
|
15410
|
+
metadata.attachments = metadata.attachments.slice(0, 5);
|
|
15411
|
+
embed.fields.push({
|
|
15412
|
+
name: "Attachments",
|
|
15413
|
+
value: metadata.attachments.map((attachment) => `- [${attachment.name.length > 45 ? attachment.name.substring(0, 45) + "..." : attachment.name}](${attachment.link})`).join("\n")
|
|
15395
15414
|
});
|
|
15396
15415
|
}
|
|
15416
|
+
if (uploads == null ? void 0 : uploads.file) {
|
|
15417
|
+
form.append("fUpload", Buffer.from(metadata.file), {
|
|
15418
|
+
filename: `${properties2.event}_${properties2.status}_${properties2.metadata.tracking}.txt`,
|
|
15419
|
+
contentType: "application/text"
|
|
15420
|
+
});
|
|
15421
|
+
}
|
|
15422
|
+
if (uploads == null ? void 0 : uploads.eas) {
|
|
15423
|
+
if (metadata.eas) {
|
|
15424
|
+
const file = readFileSync2(metadata.eas);
|
|
15425
|
+
form.append("fEas", Buffer.from(file), {
|
|
15426
|
+
filename: `${properties2.event}_${properties2.status}_${properties2.metadata.tracking}_eas.mp3`,
|
|
15427
|
+
contentType: "audio/mpeg"
|
|
15428
|
+
});
|
|
15429
|
+
}
|
|
15430
|
+
}
|
|
15431
|
+
form.append("payload_json", JSON.stringify({
|
|
15432
|
+
username: (_c = webhook.title) != null ? _c : "AtmosphericX",
|
|
15433
|
+
content: (_d = webhook.message) != null ? _d : "",
|
|
15434
|
+
embeds: [embed]
|
|
15435
|
+
}));
|
|
15436
|
+
yield createHttp({
|
|
15437
|
+
url: webhook.destination,
|
|
15438
|
+
timeout: 5e3,
|
|
15439
|
+
method: `POST`,
|
|
15440
|
+
headers: form.getHeaders(),
|
|
15441
|
+
body: form
|
|
15442
|
+
});
|
|
15397
15443
|
}
|
|
15398
15444
|
}
|
|
15399
15445
|
}
|
|
@@ -15667,13 +15713,70 @@ var getLatestIssuance = () => {
|
|
|
15667
15713
|
return latest.toString().padStart(4, "0");
|
|
15668
15714
|
};
|
|
15669
15715
|
|
|
15716
|
+
// src/@dictionaries/dictionaries.states.ts
|
|
15717
|
+
var dict_states = {
|
|
15718
|
+
"AL": "Alabama",
|
|
15719
|
+
"AK": "Alaska",
|
|
15720
|
+
"AZ": "Arizona",
|
|
15721
|
+
"AR": "Arkansas",
|
|
15722
|
+
"CA": "California",
|
|
15723
|
+
"CO": "Colorado",
|
|
15724
|
+
"CT": "Connecticut",
|
|
15725
|
+
"DE": "Delaware",
|
|
15726
|
+
"FL": "Florida",
|
|
15727
|
+
"GA": "Georgia",
|
|
15728
|
+
"HI": "Hawaii",
|
|
15729
|
+
"ID": "Idaho",
|
|
15730
|
+
"IL": "Illinois",
|
|
15731
|
+
"IN": "Indiana",
|
|
15732
|
+
"IA": "Iowa",
|
|
15733
|
+
"KS": "Kansas",
|
|
15734
|
+
"KY": "Kentucky",
|
|
15735
|
+
"LA": "Louisiana",
|
|
15736
|
+
"ME": "Maine",
|
|
15737
|
+
"MD": "Maryland",
|
|
15738
|
+
"MA": "Massachusetts",
|
|
15739
|
+
"MI": "Michigan",
|
|
15740
|
+
"MN": "Minnesota",
|
|
15741
|
+
"MS": "Mississippi",
|
|
15742
|
+
"MO": "Missouri",
|
|
15743
|
+
"MT": "Montana",
|
|
15744
|
+
"NE": "Nebraska",
|
|
15745
|
+
"NV": "Nevada",
|
|
15746
|
+
"NH": "New Hampshire",
|
|
15747
|
+
"NJ": "New Jersey",
|
|
15748
|
+
"NM": "New Mexico",
|
|
15749
|
+
"NY": "New York",
|
|
15750
|
+
"NC": "North Carolina",
|
|
15751
|
+
"ND": "North Dakota",
|
|
15752
|
+
"OH": "Ohio",
|
|
15753
|
+
"OK": "Oklahoma",
|
|
15754
|
+
"OR": "Oregon",
|
|
15755
|
+
"PA": "Pennsylvania",
|
|
15756
|
+
"RI": "Rhode Island",
|
|
15757
|
+
"SC": "South Carolina",
|
|
15758
|
+
"SD": "South Dakota",
|
|
15759
|
+
"TN": "Tennessee",
|
|
15760
|
+
"TX": "Texas",
|
|
15761
|
+
"UT": "Utah",
|
|
15762
|
+
"VT": "Vermont",
|
|
15763
|
+
"VA": "Virginia",
|
|
15764
|
+
"WA": "Washington",
|
|
15765
|
+
"WV": "West Virginia",
|
|
15766
|
+
"WI": "Wisconsin",
|
|
15767
|
+
"WY": "Wyoming",
|
|
15768
|
+
"DC": "District of Columbia"
|
|
15769
|
+
};
|
|
15770
|
+
|
|
15670
15771
|
// src/@building/building.attachments.ts
|
|
15671
15772
|
var getEventAttachments = (event) => {
|
|
15672
|
-
var _a, _b, _c, _d;
|
|
15773
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
15774
|
+
let attachments = [];
|
|
15673
15775
|
const latestTime = getLatestIssuance();
|
|
15674
15776
|
const spcNumber = (_b = (_a = event == null ? void 0 : event.properties) == null ? void 0 : _a.discussion_parameters) == null ? void 0 : _b.discussion_number;
|
|
15675
15777
|
const watchNumber = (_d = (_c = event == null ? void 0 : event.properties) == null ? void 0 : _c.watch_parameters) == null ? void 0 : _d.watch_number;
|
|
15676
|
-
const
|
|
15778
|
+
const locations = (_e = event == null ? void 0 : event.properties) == null ? void 0 : _e.locations_array;
|
|
15779
|
+
const events = [
|
|
15677
15780
|
{ target: "Day 1", attachment: `https://www.spc.noaa.gov/products/outlook/day1otlk_${latestTime}.png` },
|
|
15678
15781
|
{ target: "Day 2", attachment: `https://www.spc.noaa.gov/products/outlook/day2otlk.png` },
|
|
15679
15782
|
{ target: "Day 3", attachment: `https://www.spc.noaa.gov/products/outlook/day3otlk.png` },
|
|
@@ -15683,11 +15786,32 @@ var getEventAttachments = (event) => {
|
|
|
15683
15786
|
{ target: "Severe Thunderstorm Watch", attachment: `https://www.spc.noaa.gov/products/watch/ww${watchNumber}_radar_big.gif` },
|
|
15684
15787
|
{ target: "PDS Severe Thunderstorm Watch", attachment: `https://www.spc.noaa.gov/products/watch/ww${watchNumber}_radar_big.gif` }
|
|
15685
15788
|
];
|
|
15686
|
-
|
|
15687
|
-
|
|
15688
|
-
|
|
15789
|
+
if (events.find((e) => e.target === event.properties.event)) {
|
|
15790
|
+
attachments.push({ name: `Image: Graphic`, link: events.find((e) => e.target === event.properties.event).attachment });
|
|
15791
|
+
}
|
|
15792
|
+
for (const location of locations) {
|
|
15793
|
+
if (dict_expressions.location.test(location)) {
|
|
15794
|
+
const lines = [`Northern`, `Southern`, `Eastern`, `Western`, `Inland`, `Costal`, `County`];
|
|
15795
|
+
const county = (_f = location == null ? void 0 : location.split(",")[0]) == null ? void 0 : _f.trim().replace(new RegExp(`^(${lines.join("|")}) `), "");
|
|
15796
|
+
const state = dict_states[(_g = location == null ? void 0 : location.split(",")[1]) == null ? void 0 : _g.trim()];
|
|
15797
|
+
const feeds = bootstrap.database.prepare(`SELECT * FROM broadcastify WHERE state = ? AND county = ?`).all(state, county).sort((a, b) => {
|
|
15798
|
+
const typeOrder = ["Other", "Public Safety"];
|
|
15799
|
+
const indexA = typeOrder.indexOf(a.type);
|
|
15800
|
+
const indexB = typeOrder.indexOf(b.type);
|
|
15801
|
+
return indexA - indexB;
|
|
15802
|
+
});
|
|
15803
|
+
const tags = bootstrap.settings.BroadcastifySettings.BroadcastifyTags;
|
|
15804
|
+
const filtered = feeds.filter((feed) => tags.includes(feed.type));
|
|
15805
|
+
if (filtered.length > 0) {
|
|
15806
|
+
filtered.map((filtered2) => {
|
|
15807
|
+
if (!attachments.some((a) => a.link === filtered2.link)) {
|
|
15808
|
+
attachments.push({ name: `${filtered2.type}: ${filtered2.feed}`, link: filtered2.link });
|
|
15809
|
+
}
|
|
15810
|
+
});
|
|
15811
|
+
}
|
|
15812
|
+
}
|
|
15689
15813
|
}
|
|
15690
|
-
return
|
|
15814
|
+
return attachments;
|
|
15691
15815
|
};
|
|
15692
15816
|
|
|
15693
15817
|
// src/@building/building.validate.ts
|
|
@@ -16235,7 +16359,7 @@ var vtec = (stanza) => __async(null, null, function* () {
|
|
|
16235
16359
|
|
|
16236
16360
|
// src/@events/events.api.ts
|
|
16237
16361
|
var api = (stanza) => __async(null, null, function* () {
|
|
16238
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb;
|
|
16362
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _A, _B, _C, _D, _E, _F, _G, _H, _I, _J, _K, _L, _M, _N, _O, _P, _Q, _R, _S, _T, _U, _V, _W, _X, _Y, _Z, __, _$, _aa, _ba, _ca, _da, _ea, _fa, _ga, _ha, _ia, _ja, _ka, _la, _ma, _na, _oa, _pa, _qa, _ra, _sa, _ta, _ua, _va, _wa, _xa, _ya, _za, _Aa, _Ba, _Ca, _Da, _Ea, _Fa, _Ga, _Ha, _Ia, _Ja, _Ka, _La, _Ma, _Na, _Oa, _Pa, _Qa, _Ra, _Sa, _Ta, _Ua, _Va, _Wa, _Xa, _Ya, _Za, __a, _$a, _ab, _bb, _cb, _db, _eb, _fb, _gb, _hb, _ib, _jb, _kb, _lb, _mb, _nb, _ob, _pb, _qb, _rb, _sb, _tb, _ub;
|
|
16239
16363
|
let processed = [];
|
|
16240
16364
|
const messages = Object.values(JSON.parse(stanza.message).features);
|
|
16241
16365
|
for (const feature of messages) {
|
|
@@ -16254,67 +16378,68 @@ var api = (stanza) => __async(null, null, function* () {
|
|
|
16254
16378
|
issued: ((_k = feature == null ? void 0 : feature.properties) == null ? void 0 : _k.sent) ? new Date((_l = feature == null ? void 0 : feature.properties) == null ? void 0 : _l.sent).toISOString() : null,
|
|
16255
16379
|
expires: ((_m = feature == null ? void 0 : feature.properties) == null ? void 0 : _m.expires) ? new Date((_n = feature == null ? void 0 : feature.properties) == null ? void 0 : _n.expires).toISOString() : null,
|
|
16256
16380
|
locations: (_p = (_o = feature == null ? void 0 : feature.properties) == null ? void 0 : _o.areaDesc) != null ? _p : null,
|
|
16257
|
-
|
|
16258
|
-
|
|
16381
|
+
locations_array: ((_q = feature == null ? void 0 : feature.properties) == null ? void 0 : _q.areaDesc) ? (_r = feature == null ? void 0 : feature.properties) == null ? void 0 : _r.areaDesc.split(";") : [],
|
|
16382
|
+
description: (_t = (_s = feature == null ? void 0 : feature.properties) == null ? void 0 : _s.description) != null ? _t : null,
|
|
16383
|
+
attributes: (_v = (_u = feature == null ? void 0 : feature.properties) == null ? void 0 : _u.attributes) != null ? _v : {},
|
|
16259
16384
|
geocode: {
|
|
16260
16385
|
office: {
|
|
16261
|
-
office: pVtec ? (
|
|
16262
|
-
name: (
|
|
16386
|
+
office: pVtec ? (_w = pVtec == null ? void 0 : pVtec[0]) == null ? void 0 : _w.tracking.split(`.`)[0] : null,
|
|
16387
|
+
name: (_y = dict_icao[pVtec ? (_x = pVtec == null ? void 0 : pVtec[0]) == null ? void 0 : _x.tracking.split(`.`)[0] : null]) != null ? _y : null
|
|
16263
16388
|
},
|
|
16264
|
-
organization: (
|
|
16265
|
-
ugc: (
|
|
16266
|
-
polygon: ((
|
|
16267
|
-
polygon_generated: ((
|
|
16389
|
+
organization: (_B = (_A = (_z = feature == null ? void 0 : feature.properties) == null ? void 0 : _z.parameters) == null ? void 0 : _A.WMOidentifier) == null ? void 0 : _B[0],
|
|
16390
|
+
ugc: (_E = (_D = (_C = feature == null ? void 0 : feature.properties) == null ? void 0 : _C.geocode) == null ? void 0 : _D.UGC) != null ? _E : [],
|
|
16391
|
+
polygon: ((_F = feature == null ? void 0 : feature.geometry) == null ? void 0 : _F.coordinates.length) > 0 ? Buffer.from(JSON.stringify([(_G = feature == null ? void 0 : feature.geometry) == null ? void 0 : _G.coordinates[0]])).toString("base64") : null,
|
|
16392
|
+
polygon_generated: ((_H = feature == null ? void 0 : feature.geometry) == null ? void 0 : _H.coordinates.length) > 0 ? true : false
|
|
16268
16393
|
},
|
|
16269
16394
|
parameters: {
|
|
16270
|
-
tags: getEventTags((
|
|
16271
|
-
instructions: (
|
|
16272
|
-
source: (
|
|
16273
|
-
hazards: (
|
|
16274
|
-
impacts: (
|
|
16275
|
-
estimated_hail_size: (
|
|
16276
|
-
estimated_wind_gusts: (
|
|
16277
|
-
damage_threat: (
|
|
16278
|
-
tornado_threat: (
|
|
16279
|
-
flood_threat: (
|
|
16280
|
-
wind_threat: (
|
|
16281
|
-
hail_threat: (
|
|
16395
|
+
tags: getEventTags((_I = feature == null ? void 0 : feature.properties) == null ? void 0 : _I.description),
|
|
16396
|
+
instructions: (_K = (_J = feature == null ? void 0 : feature.properties) == null ? void 0 : _J.instruction) != null ? _K : null,
|
|
16397
|
+
source: (_M = getTextFromProduct({ message: (_L = feature == null ? void 0 : feature.properties) == null ? void 0 : _L.description, find: [`SOURCE...`], removal: [`.`] })) != null ? _M : null,
|
|
16398
|
+
hazards: (_O = getTextFromProduct({ message: (_N = feature == null ? void 0 : feature.properties) == null ? void 0 : _N.description, find: [`HAZARD...`], removal: [`.`] })) != null ? _O : null,
|
|
16399
|
+
impacts: (_Q = getTextFromProduct({ message: (_P = feature == null ? void 0 : feature.properties) == null ? void 0 : _P.description, find: [`IMPACT...`], removal: [`.`] })) != null ? _Q : null,
|
|
16400
|
+
estimated_hail_size: (_U = (_T = (_S = (_R = feature == null ? void 0 : feature.properties) == null ? void 0 : _R.parameters) == null ? void 0 : _S.maxHailSize) == null ? void 0 : _T[0]) != null ? _U : null,
|
|
16401
|
+
estimated_wind_gusts: (_Y = (_X = (_W = (_V = feature == null ? void 0 : feature.properties) == null ? void 0 : _V.parameters) == null ? void 0 : _W.maxWindGust) == null ? void 0 : _X[0]) != null ? _Y : null,
|
|
16402
|
+
damage_threat: (_aa = (_$ = (__ = (_Z = feature == null ? void 0 : feature.properties) == null ? void 0 : _Z.parameters) == null ? void 0 : __.thunderstormDamageThreat) == null ? void 0 : _$[0]) != null ? _aa : null,
|
|
16403
|
+
tornado_threat: (_ea = (_da = (_ca = (_ba = feature == null ? void 0 : feature.properties) == null ? void 0 : _ba.parameters) == null ? void 0 : _ca.tornadoDetection) == null ? void 0 : _da[0]) != null ? _ea : null,
|
|
16404
|
+
flood_threat: (_ia = (_ha = (_ga = (_fa = feature == null ? void 0 : feature.properties) == null ? void 0 : _fa.parameters) == null ? void 0 : _ga.floodDetection) == null ? void 0 : _ha[0]) != null ? _ia : null,
|
|
16405
|
+
wind_threat: (_ma = (_la = (_ka = (_ja = feature == null ? void 0 : feature.properties) == null ? void 0 : _ja.parameters) == null ? void 0 : _ka.windThreat) == null ? void 0 : _la[0]) != null ? _ma : null,
|
|
16406
|
+
hail_threat: (_qa = (_pa = (_oa = (_na = feature == null ? void 0 : feature.properties) == null ? void 0 : _na.parameters) == null ? void 0 : _oa.hailThreat) == null ? void 0 : _pa[0]) != null ? _qa : null
|
|
16282
16407
|
},
|
|
16283
16408
|
discussion_parameters: {
|
|
16284
|
-
discussion_number: (
|
|
16285
|
-
discussion_concerning: (
|
|
16286
|
-
discussion_max_tornado: (
|
|
16287
|
-
discussion_max_hail: (
|
|
16288
|
-
discussion_max_wind: (
|
|
16289
|
-
discussion_watch_issuance: (
|
|
16409
|
+
discussion_number: (_ua = (_ta = (_sa = getTextFromProduct({ message: (_ra = feature == null ? void 0 : feature.properties) == null ? void 0 : _ra.description, find: [`Mesoscale Discussion `], removal: [`Mesoscale Discussion`, `Number`, `...`] })) == null ? void 0 : _sa.toString()) == null ? void 0 : _ta.padStart(4, "0")) != null ? _ua : null,
|
|
16410
|
+
discussion_concerning: (_wa = getTextFromProduct({ message: (_va = feature == null ? void 0 : feature.properties) == null ? void 0 : _va.description, find: [`Concerning...`] })) != null ? _wa : null,
|
|
16411
|
+
discussion_max_tornado: (_ya = getTextFromProduct({ message: (_xa = feature == null ? void 0 : feature.properties) == null ? void 0 : _xa.description, find: [`MOST PROBABLE PEAK TORNADO INTENSITY...`] })) != null ? _ya : null,
|
|
16412
|
+
discussion_max_hail: (_Aa = getTextFromProduct({ message: (_za = feature == null ? void 0 : feature.properties) == null ? void 0 : _za.description, find: [`MOST PROBABLE PEAK HAIL SIZE...`] })) != null ? _Aa : null,
|
|
16413
|
+
discussion_max_wind: (_Ca = getTextFromProduct({ message: (_Ba = feature == null ? void 0 : feature.properties) == null ? void 0 : _Ba.description, find: [`MOST PROBABLE PEAK WIND GUST...`] })) != null ? _Ca : null,
|
|
16414
|
+
discussion_watch_issuance: (_Ea = getTextFromProduct({ message: (_Da = feature == null ? void 0 : feature.properties) == null ? void 0 : _Da.description, find: [`Probability of Watch Issuance...`], removal: [`percent`] })) != null ? _Ea : null
|
|
16290
16415
|
},
|
|
16291
16416
|
watch_parameters: {
|
|
16292
|
-
watch_number: ((
|
|
16293
|
-
watch_type: ((
|
|
16294
|
-
additional_tornadoes_probability: (
|
|
16295
|
-
strong_tornadoes_probability: (
|
|
16296
|
-
severe_wind_probability: (
|
|
16297
|
-
severe_hail_probability: (
|
|
16298
|
-
hail_2in_probability: (
|
|
16299
|
-
combined_hail_wind_probability: (
|
|
16300
|
-
max_hail_in: (
|
|
16301
|
-
max_wind_surface: (
|
|
16302
|
-
max_tops_x100feet: (
|
|
16303
|
-
pds_watch: getTextFromProduct({ message: (
|
|
16417
|
+
watch_number: ((_Fa = pVtec == null ? void 0 : pVtec[0]) == null ? void 0 : _Fa.is_watch) && ((_Qa = (_Pa = (_Ka = (_Ja = (_Ia = (_Ha = getTextFromProduct({ message: (_Ga = feature == null ? void 0 : feature.properties) == null ? void 0 : _Ga.description, find: [`ITIES FOR`, `UPDATE FOR`, `Watch Number `], removal: [`%`, `<`, `:`] })) == null ? void 0 : _Ha.replace(/(WT|WS|)/g, "")) == null ? void 0 : _Ia.trim()) == null ? void 0 : _Ja.toString()) == null ? void 0 : _Ka.padStart(4, "0")) != null ? _Pa : (_Oa = (_Na = (_Ma = (_La = pVtec == null ? void 0 : pVtec[0]) == null ? void 0 : _La.tracking) == null ? void 0 : _Ma.slice(-4)) == null ? void 0 : _Na.toString()) == null ? void 0 : _Oa.padStart(4, "0")) != null ? _Qa : null),
|
|
16418
|
+
watch_type: ((_Ra = feature == null ? void 0 : feature.properties) == null ? void 0 : _Ra.description.includes(`TORNADO WATCH`)) ? `Tornado` : ((_Sa = feature == null ? void 0 : feature.properties) == null ? void 0 : _Sa.description.includes(`SEVERE`)) ? `Severe` : null,
|
|
16419
|
+
additional_tornadoes_probability: (_Ua = getTextFromProduct({ message: (_Ta = feature == null ? void 0 : feature.properties) == null ? void 0 : _Ta.description, find: [`PROB OF 2 OR MORE TORNADOES`], removal: [`%`, `<`, `:`] })) != null ? _Ua : null,
|
|
16420
|
+
strong_tornadoes_probability: (_Wa = getTextFromProduct({ message: (_Va = feature == null ? void 0 : feature.properties) == null ? void 0 : _Va.description, find: [`PROB OF 1 OR MORE STRONG /EF2-EF5/ TORNADOES`], removal: [`%`, `<`, `:`] })) != null ? _Wa : null,
|
|
16421
|
+
severe_wind_probability: (_Ya = getTextFromProduct({ message: (_Xa = feature == null ? void 0 : feature.properties) == null ? void 0 : _Xa.description, find: [`PROB OF 10 OR MORE SEVERE WIND EVENTS`], removal: [`%`, `<`, `:`] })) != null ? _Ya : null,
|
|
16422
|
+
severe_hail_probability: (__a = getTextFromProduct({ message: (_Za = feature == null ? void 0 : feature.properties) == null ? void 0 : _Za.description, find: [`PROB OF 10 OR MORE SEVERE HAIL EVENTS`], removal: [`%`, `<`, `:`] })) != null ? __a : null,
|
|
16423
|
+
hail_2in_probability: (_ab = getTextFromProduct({ message: (_$a = feature == null ? void 0 : feature.properties) == null ? void 0 : _$a.description, find: [`PROB OF 1 OR MORE HAIL EVENTS >= 2 INCHES`], removal: [`%`, `<`, `:`] })) != null ? _ab : null,
|
|
16424
|
+
combined_hail_wind_probability: (_cb = getTextFromProduct({ message: (_bb = feature == null ? void 0 : feature.properties) == null ? void 0 : _bb.description, find: [`PROB OF 6 OR MORE COMBINED SEVERE HAIL/WIND EVENTS`], removal: [`%`, `<`, `:`] })) != null ? _cb : null,
|
|
16425
|
+
max_hail_in: (_eb = getTextFromProduct({ message: (_db = feature == null ? void 0 : feature.properties) == null ? void 0 : _db.description, find: [`MAX HAIL /INCHES/`], removal: [`%`, `<`, `:`] })) != null ? _eb : null,
|
|
16426
|
+
max_wind_surface: (_gb = getTextFromProduct({ message: (_fb = feature == null ? void 0 : feature.properties) == null ? void 0 : _fb.description, find: [`MAX WIND GUSTS SURFACE /KNOTS/`], removal: [`%`, `<`, `:`] })) != null ? _gb : null,
|
|
16427
|
+
max_tops_x100feet: (_ib = getTextFromProduct({ message: (_hb = feature == null ? void 0 : feature.properties) == null ? void 0 : _hb.description, find: [`MAX TOPS /X 100 FEET/`], removal: [`%`, `<`, `:`] })) != null ? _ib : null,
|
|
16428
|
+
pds_watch: getTextFromProduct({ message: (_jb = feature == null ? void 0 : feature.properties) == null ? void 0 : _jb.description, find: [`PARTICULARLY DANGEROUS SITUATION`], removal: [`%`, `<`, `:`] }) === `YES`
|
|
16304
16429
|
},
|
|
16305
16430
|
metadata: {
|
|
16306
16431
|
ms: performance.now() - tick,
|
|
16307
16432
|
source: `events.api`,
|
|
16308
|
-
tracking: getEventTracking({ type: `API`, organization: { wmoidentifier: (
|
|
16309
|
-
header: `ZCZC-ATMOSX-${(
|
|
16433
|
+
tracking: getEventTracking({ type: `API`, organization: { wmoidentifier: (_mb = (_lb = (_kb = feature == null ? void 0 : feature.properties) == null ? void 0 : _kb.parameters) == null ? void 0 : _lb.WMOidentifier) == null ? void 0 : _mb[0], featureId: feature == null ? void 0 : feature.id }, vtec: pVtec == null ? void 0 : pVtec[0] }),
|
|
16434
|
+
header: `ZCZC-ATMOSX-${(_ob = (_nb = feature == null ? void 0 : feature.properties) == null ? void 0 : _nb.parameters) == null ? void 0 : _ob.WMOidentifier}`,
|
|
16310
16435
|
vtec: pVtec == null ? void 0 : pVtec[0],
|
|
16311
16436
|
hvtec: null,
|
|
16312
|
-
raw: (
|
|
16437
|
+
raw: (_pb = feature == null ? void 0 : feature.properties) == null ? void 0 : _pb.description,
|
|
16313
16438
|
history: [
|
|
16314
16439
|
{
|
|
16315
|
-
description: (
|
|
16316
|
-
issued: ((
|
|
16317
|
-
status: (
|
|
16440
|
+
description: (_qb = feature == null ? void 0 : feature.properties) == null ? void 0 : _qb.description,
|
|
16441
|
+
issued: ((_rb = feature == null ? void 0 : feature.properties) == null ? void 0 : _rb.sent) ? new Date((_sb = feature == null ? void 0 : feature.properties) == null ? void 0 : _sb.sent).toISOString() : null,
|
|
16442
|
+
status: (_ub = (_tb = feature == null ? void 0 : feature.properties) == null ? void 0 : _tb.messageType) != null ? _ub : null
|
|
16318
16443
|
}
|
|
16319
16444
|
]
|
|
16320
16445
|
}
|
|
@@ -16471,7 +16596,6 @@ var importShapefiles = () => __async(null, null, function* () {
|
|
|
16471
16596
|
const tShapefiles = bootstrap.database.prepare(`SELECT COUNT(*) AS count FROM shapefiles`).get().count;
|
|
16472
16597
|
if (tShapefiles === 0) {
|
|
16473
16598
|
yield setSleep({ timeout: 1e3 });
|
|
16474
|
-
setWarning({ message: `Shapefiles are currently building, please DO NOT close your terminal. The shapefiles will not finish and will remain incomplete. If you do mess up, you will need to delete ${settings.Database} and restart the application.` });
|
|
16475
16599
|
for (const shapefile of dict_shapefiles) {
|
|
16476
16600
|
const response2 = yield fetch(shapefile.link);
|
|
16477
16601
|
const arrayBuff = yield response2.arrayBuffer();
|
|
@@ -16492,7 +16616,7 @@ var importShapefiles = () => __async(null, null, function* () {
|
|
|
16492
16616
|
filepath,
|
|
16493
16617
|
filepath
|
|
16494
16618
|
);
|
|
16495
|
-
setWarning({ message: `Importing ${features.length} features from ${shapefile.name}_${shapefile.id}` });
|
|
16619
|
+
setWarning({ message: `Importing ${features.length} features from ${shapefile.name}_${shapefile.id} for Shapefiles` });
|
|
16496
16620
|
const insert = bootstrap.database.prepare(`INSERT OR REPLACE INTO shapefiles (id, location, geometry) VALUES (?, ?, ?)`);
|
|
16497
16621
|
const transaction = bootstrap.database.transaction((entries) => {
|
|
16498
16622
|
var _a2, _b2, _c;
|
|
@@ -16517,10 +16641,8 @@ var importShapefiles = () => __async(null, null, function* () {
|
|
|
16517
16641
|
});
|
|
16518
16642
|
fs.unlinkSync(`${filepath}.shp`);
|
|
16519
16643
|
fs.unlinkSync(`${filepath}.dbf`);
|
|
16520
|
-
setWarning({ message: `Cleaned up temporary files for ${shapefile.name}_${shapefile.id}` });
|
|
16521
16644
|
transaction(features);
|
|
16522
16645
|
}
|
|
16523
|
-
setWarning({ message: `Shapefiles have finished compiling, you can now continue and close this terminal` });
|
|
16524
16646
|
fs.rm(resolve5(__dirname, "../../shapefiles"), { recursive: true, force: true }, () => {
|
|
16525
16647
|
});
|
|
16526
16648
|
}
|
|
@@ -16529,6 +16651,49 @@ var importShapefiles = () => __async(null, null, function* () {
|
|
|
16529
16651
|
}
|
|
16530
16652
|
});
|
|
16531
16653
|
|
|
16654
|
+
// src/@modules/@database/database.broadcastify.ts
|
|
16655
|
+
var importBroadcastify = () => __async(null, null, function* () {
|
|
16656
|
+
const settings = bootstrap.settings;
|
|
16657
|
+
const isBroadcastifyImported = bootstrap.database.prepare(`SELECT name FROM sqlite_master WHERE type='table' AND name='broadcastify';`).get();
|
|
16658
|
+
if (!settings.BroadcastifySettings.BroadcastifyAttachments) {
|
|
16659
|
+
return;
|
|
16660
|
+
}
|
|
16661
|
+
if (isBroadcastifyImported) {
|
|
16662
|
+
return;
|
|
16663
|
+
}
|
|
16664
|
+
const broadcastify = yield createHttp({
|
|
16665
|
+
url: settings.BroadcastifySettings.BroadcastifyDatabase,
|
|
16666
|
+
timeout: 5e3
|
|
16667
|
+
});
|
|
16668
|
+
if (!broadcastify.error) {
|
|
16669
|
+
bootstrap.database.prepare(`CREATE TABLE broadcastify ( state TEXT, county TEXT, feed TEXT, type TEXT, link TEXT);`).run();
|
|
16670
|
+
const states = JSON.parse(broadcastify.message);
|
|
16671
|
+
const insert = bootstrap.database.prepare(`INSERT INTO broadcastify (state, county, feed, type, link) VALUES (?, ?, ?, ?, ?)`);
|
|
16672
|
+
const transaction = bootstrap.database.transaction((rows) => {
|
|
16673
|
+
for (const row of rows) {
|
|
16674
|
+
insert.run(row);
|
|
16675
|
+
}
|
|
16676
|
+
});
|
|
16677
|
+
const batch = [];
|
|
16678
|
+
for (const state of states) {
|
|
16679
|
+
setWarning({ message: `Importing ${state.counties.length} counties from ${state.state} for Broadcastify` });
|
|
16680
|
+
for (const county of state.counties) {
|
|
16681
|
+
const countyName = county.county;
|
|
16682
|
+
for (const feed of county.feeds) {
|
|
16683
|
+
batch.push([
|
|
16684
|
+
state.state,
|
|
16685
|
+
countyName,
|
|
16686
|
+
feed.name,
|
|
16687
|
+
feed.type,
|
|
16688
|
+
feed.link
|
|
16689
|
+
]);
|
|
16690
|
+
}
|
|
16691
|
+
}
|
|
16692
|
+
}
|
|
16693
|
+
transaction(batch);
|
|
16694
|
+
}
|
|
16695
|
+
});
|
|
16696
|
+
|
|
16532
16697
|
// src/@modules/@database/database.init.ts
|
|
16533
16698
|
var initializeDatabase = () => __async(null, null, function* () {
|
|
16534
16699
|
const settings = bootstrap.settings;
|
|
@@ -16540,7 +16705,14 @@ var initializeDatabase = () => __async(null, null, function* () {
|
|
|
16540
16705
|
bootstrap.database = new sqlite3(settings.Database);
|
|
16541
16706
|
bootstrap.database.prepare(`CREATE TABLE IF NOT EXISTS stanzas ( id INTEGER PRIMARY KEY AUTOINCREMENT, type TEXT, issued TEXT, stanza TEXT )`).run();
|
|
16542
16707
|
bootstrap.database.prepare(`CREATE TABLE IF NOT EXISTS shapefiles (id TEXT PRIMARY KEY, location TEXT, geometry TEXT)`).run();
|
|
16543
|
-
|
|
16708
|
+
const isNeedingShapefiles = bootstrap.database.prepare(`SELECT name FROM sqlite_master WHERE type='table' AND name='shapefiles';`).get();
|
|
16709
|
+
const isNeedingBroadcastify = bootstrap.database.prepare(`SELECT name FROM sqlite_master WHERE type='table' AND name='broadcastify';`).get();
|
|
16710
|
+
if (!isNeedingShapefiles || !isNeedingBroadcastify) {
|
|
16711
|
+
setWarning({ message: `Required database tables are currently building, please ${bootstrap.ansi_colors.RED}DO NOT${bootstrap.ansi_colors.RESET} close your terminal. The building will not finish and will remain incomplete. If you do mess up, you will need to delete ${settings.Database} and restart the application.` });
|
|
16712
|
+
yield importBroadcastify();
|
|
16713
|
+
yield importShapefiles();
|
|
16714
|
+
setWarning({ message: `Building has completed, you can now continue or close the terminal` });
|
|
16715
|
+
}
|
|
16544
16716
|
} catch (error) {
|
|
16545
16717
|
setWarning({ message: `An error occurred while initializing the database: ${error.message}` });
|
|
16546
16718
|
}
|
|
@@ -16601,7 +16773,8 @@ var xReconnect = (interval) => __async(null, null, function* () {
|
|
|
16601
16773
|
},
|
|
16602
16774
|
type: `reconnect`,
|
|
16603
16775
|
error: true
|
|
16604
|
-
}
|
|
16776
|
+
},
|
|
16777
|
+
message: `Attempting to reconnect to XMPP Service (Reconnect Attempt ${bootstrap.cache.tReconnects})`
|
|
16605
16778
|
});
|
|
16606
16779
|
yield bootstrap.session_xmpp.stop().catch(() => {
|
|
16607
16780
|
});
|
|
@@ -16645,6 +16818,7 @@ var setCronSchedule = () => __async(null, null, function* () {
|
|
|
16645
16818
|
};
|
|
16646
16819
|
walk(settings.GlobalSettings.ArchiveSettings.TextDirectory);
|
|
16647
16820
|
walk(settings.GlobalSettings.ArchiveSettings.EasDirectory);
|
|
16821
|
+
walk(settings.GlobalSettings.ArchiveSettings.EventDirectory);
|
|
16648
16822
|
if (settings.EnableWireService) {
|
|
16649
16823
|
if (settings.NOAAWeatherWireServiceSettings.ReconnectionSettings.Enabled) {
|
|
16650
16824
|
void xReconnect(settings.NOAAWeatherWireServiceSettings.ReconnectionSettings.ReconnectionInterval);
|
|
@@ -16829,6 +17003,7 @@ var createEvent2 = (options) => {
|
|
|
16829
17003
|
issued: options.issued.toISOString(),
|
|
16830
17004
|
expires: options.expires.toISOString(),
|
|
16831
17005
|
locations: options.locations,
|
|
17006
|
+
locations_array: options.locations ? options.locations.split(";") : [],
|
|
16832
17007
|
description: options.description,
|
|
16833
17008
|
geocode: {
|
|
16834
17009
|
office: {
|