@atmosx/event-product-parser 3.0.47 → 3.0.51
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 +48 -21
- package/dist/cjs/index.cjs +5841 -15199
- package/dist/esm/index.mjs +5827 -15185
- package/package.json +5 -6
- package/src/@building/building.attachments.ts +6 -6
- package/src/@building/building.create.ts +19 -5
- package/src/@building/building.enhance.ts +1 -1
- package/src/@building/building.geometry.ts +1 -1
- package/src/@building/building.polygon.ts +1 -2
- package/src/@building/building.signature.ts +0 -1
- package/src/@building/building.tracking.ts +4 -4
- package/src/@building/building.validate.ts +11 -6
- package/src/@core/core.clearEvents.ts +0 -1
- package/src/@core/core.createEvent.ts +0 -1
- package/src/@core/core.getEvents.ts +0 -1
- package/src/@core/core.getNodes.ts +0 -1
- package/src/@core/core.getRandomEvent.ts +0 -1
- package/src/@core/core.getVersion.ts +0 -1
- package/src/@dictionaries/dictionaries.awips.ts +3 -3
- package/src/@events/events.api.ts +7 -9
- package/src/@events/events.text.ts +5 -6
- package/src/@events/events.ugc.ts +5 -5
- package/src/@events/events.vtec.ts +4 -5
- package/src/@manager/manager.mkEvent.ts +17 -12
- package/src/@manager/manager.rmEvent.ts +5 -3
- package/src/@manager/manager.setHash.ts +0 -1
- package/src/@manager/manager.updateEvents.ts +1 -3
- package/src/@manager/manager.updateListener.ts +23 -31
- package/src/@manager/manager.updateNodes.ts +2 -3
- package/src/@modules/@database/database.cache.ts +6 -4
- package/src/@modules/@database/database.init.ts +5 -4
- package/src/@modules/@database/database.shapefiles.ts +11 -11
- package/src/@modules/@database/database.stanza.ts +2 -3
- package/src/@modules/@eas/eas.setAFSK.ts +0 -1
- package/src/@modules/@eas/eas.setAsciiToBits.ts +0 -1
- package/src/@modules/@eas/eas.setEasTone.ts +6 -2
- package/src/@modules/@eas/eas.setNoise.ts +1 -0
- package/src/@modules/@eas/eas.setRadioEffect.ts +1 -0
- package/src/@modules/@eas/eas.setSameHeader.ts +0 -1
- package/src/@modules/@utilities/utilities.createHttp.ts +40 -64
- package/src/@modules/@utilities/utilities.getMatched.ts +33 -0
- package/src/@modules/@utilities/utilities.setCronSchedule.ts +1 -1
- package/src/@modules/@utilities/utilities.setDebug.ts +38 -0
- package/src/@modules/@utilities/utilities.setTimeoutAction.ts +5 -1
- package/src/@modules/@xmpp/xmpp.xDeploy.ts +1 -2
- package/src/@modules/@xmpp/xmpp.xError.ts +0 -2
- package/src/@modules/@xmpp/xmpp.xOffline.ts +0 -1
- package/src/@modules/@xmpp/xmpp.xOnline.ts +2 -2
- package/src/@parsers/@text/text.getEmbed.ts +0 -2
- package/src/@parsers/@ugc/ugc.coordinates.ts +2 -1
- package/src/@parsers/@ugc/ugc.getCache.ts +24 -0
- package/src/@parsers/@ugc/ugc.locations.ts +35 -7
- package/src/@parsers/@ugc/ugc.setCache.ts +28 -0
- package/src/@types/type.settings.ts +1 -0
- package/src/bootstrap.ts +4 -1
- package/test.js +15 -21
- package/tsup.config.ts +1 -1
- package/dist/index.d.mts +0 -299
- package/dist/index.d.ts +0 -299
package/dist/index.d.ts
DELETED
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
type TypeListener = {
|
|
2
|
-
events: string[];
|
|
3
|
-
webhook?: {
|
|
4
|
-
enabled: boolean;
|
|
5
|
-
destination: string;
|
|
6
|
-
ratelimit: number;
|
|
7
|
-
title: string;
|
|
8
|
-
message: string;
|
|
9
|
-
};
|
|
10
|
-
uploads?: {
|
|
11
|
-
file?: boolean;
|
|
12
|
-
eas?: boolean;
|
|
13
|
-
event?: boolean;
|
|
14
|
-
};
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
type TypeSettings = {
|
|
18
|
-
Database: string;
|
|
19
|
-
EnableWireService: boolean;
|
|
20
|
-
EnableJournal: boolean;
|
|
21
|
-
NOAAWeatherWireServiceSettings: {
|
|
22
|
-
ReconnectionSettings: {
|
|
23
|
-
Enabled: boolean;
|
|
24
|
-
ReconnectionInterval: number;
|
|
25
|
-
};
|
|
26
|
-
CredentialSettings: {
|
|
27
|
-
Username: string | void;
|
|
28
|
-
Password: string | void;
|
|
29
|
-
Nickname: string | void;
|
|
30
|
-
};
|
|
31
|
-
CacheSettings: {
|
|
32
|
-
Enabled: boolean;
|
|
33
|
-
MaxDatabaseHistory: number;
|
|
34
|
-
MaxRetentionHistory: number;
|
|
35
|
-
};
|
|
36
|
-
StanzaSettings: {
|
|
37
|
-
DisableUGC: boolean;
|
|
38
|
-
DisableVTEC: boolean;
|
|
39
|
-
DisableText: boolean;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
NationalWeatherServiceSettings: {
|
|
43
|
-
CallbackInterval: number;
|
|
44
|
-
EventsEndpoint: string;
|
|
45
|
-
};
|
|
46
|
-
BroadcastifySettings: {
|
|
47
|
-
BroadcastifyAttachments: boolean;
|
|
48
|
-
BroadcastifyDatabase: string;
|
|
49
|
-
BroadcastifyTags: string[];
|
|
50
|
-
};
|
|
51
|
-
GlobalSettings: {
|
|
52
|
-
EventManagement: boolean;
|
|
53
|
-
BetterEventNames: boolean;
|
|
54
|
-
DisableGeometryParsing: boolean;
|
|
55
|
-
UseShapefileCoordinates: boolean;
|
|
56
|
-
SPCWatchesOnly: boolean;
|
|
57
|
-
ShapefileSkipPoints: number;
|
|
58
|
-
NodeTTL: number;
|
|
59
|
-
NodeMinDistance: number;
|
|
60
|
-
ListenerSettings?: TypeListener[];
|
|
61
|
-
EventFiltering: {
|
|
62
|
-
ListeningEvents: string[];
|
|
63
|
-
ListeningICAO: string[];
|
|
64
|
-
ListeningUGC: string[];
|
|
65
|
-
ListeningStates: string[];
|
|
66
|
-
IgnoredICAO: string[];
|
|
67
|
-
IgnoredEvents: string[];
|
|
68
|
-
NodeLocationFiltering: boolean;
|
|
69
|
-
IgnoreTestProducts: boolean;
|
|
70
|
-
};
|
|
71
|
-
ArchiveSettings: {
|
|
72
|
-
TTL: number;
|
|
73
|
-
EventDirectory: string;
|
|
74
|
-
TextDirectory: string;
|
|
75
|
-
EasDirectory: string;
|
|
76
|
-
EasToneout: string;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
declare const setSettings: (newSettings: TypeSettings) => TypeSettings;
|
|
82
|
-
|
|
83
|
-
type TypeAttributes = {
|
|
84
|
-
xmlns: string;
|
|
85
|
-
id: string;
|
|
86
|
-
issue: string;
|
|
87
|
-
ttaaii: string;
|
|
88
|
-
cccc: string;
|
|
89
|
-
awipsid: string;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
|
-
type TypeEventProperties = {
|
|
93
|
-
locations: string;
|
|
94
|
-
locations_array: string[];
|
|
95
|
-
description: string;
|
|
96
|
-
attributes?: TypeAttributes;
|
|
97
|
-
geocode: {
|
|
98
|
-
office: {
|
|
99
|
-
name: string;
|
|
100
|
-
office: string;
|
|
101
|
-
};
|
|
102
|
-
organization: string;
|
|
103
|
-
ugc: string[];
|
|
104
|
-
polygon: string;
|
|
105
|
-
polygon_generated: boolean;
|
|
106
|
-
};
|
|
107
|
-
parameters?: {
|
|
108
|
-
tags: string[];
|
|
109
|
-
instructions: string;
|
|
110
|
-
source: string;
|
|
111
|
-
hazards: string;
|
|
112
|
-
impacts: string;
|
|
113
|
-
estimated_hail_size: string;
|
|
114
|
-
estimated_wind_gusts: string;
|
|
115
|
-
damage_threat: string;
|
|
116
|
-
tornado_threat: string;
|
|
117
|
-
flood_threat: string;
|
|
118
|
-
wind_threat: string;
|
|
119
|
-
hail_threat: string;
|
|
120
|
-
max_hail_inches?: string;
|
|
121
|
-
max_wind_gusts_surface_knots?: string;
|
|
122
|
-
max_tops_x100feet?: string;
|
|
123
|
-
mean_storm_motion_vector?: string;
|
|
124
|
-
particularly_dangerous_situation?: string;
|
|
125
|
-
};
|
|
126
|
-
watch_parameters?: {
|
|
127
|
-
watch_number: string;
|
|
128
|
-
watch_type: string;
|
|
129
|
-
additional_tornadoes_probability: string;
|
|
130
|
-
strong_tornadoes_probability: string;
|
|
131
|
-
severe_wind_probability: string;
|
|
132
|
-
severe_hail_probability: string;
|
|
133
|
-
hail_2in_probability: string;
|
|
134
|
-
combined_hail_wind_probability: string;
|
|
135
|
-
max_hail_in: string;
|
|
136
|
-
max_wind_surface: string;
|
|
137
|
-
max_tops_x100feet: string;
|
|
138
|
-
pds_watch: boolean;
|
|
139
|
-
};
|
|
140
|
-
discussion_parameters?: {
|
|
141
|
-
discussion_number: string;
|
|
142
|
-
discussion_concerning: string;
|
|
143
|
-
discussion_max_tornado: string;
|
|
144
|
-
discussion_max_hail: string;
|
|
145
|
-
discussion_max_wind: string;
|
|
146
|
-
discussion_watch_issuance: string;
|
|
147
|
-
};
|
|
148
|
-
};
|
|
149
|
-
|
|
150
|
-
type TypeHVTEC = {
|
|
151
|
-
hvtec: string;
|
|
152
|
-
severity: string;
|
|
153
|
-
cause: string;
|
|
154
|
-
record: string;
|
|
155
|
-
};
|
|
156
|
-
|
|
157
|
-
type TypePVTEC = {
|
|
158
|
-
vtec: string;
|
|
159
|
-
product: string;
|
|
160
|
-
tracking: string;
|
|
161
|
-
event: string;
|
|
162
|
-
status: string;
|
|
163
|
-
organization: string;
|
|
164
|
-
expires: string;
|
|
165
|
-
is_watch: boolean;
|
|
166
|
-
prediction_center: boolean;
|
|
167
|
-
};
|
|
168
|
-
|
|
169
|
-
type TypeEvent = {
|
|
170
|
-
type: string;
|
|
171
|
-
geometry: {
|
|
172
|
-
type: string;
|
|
173
|
-
coordinates: number[][];
|
|
174
|
-
};
|
|
175
|
-
properties: {
|
|
176
|
-
event: string;
|
|
177
|
-
parent: string;
|
|
178
|
-
status: string;
|
|
179
|
-
issued: string;
|
|
180
|
-
expires: string;
|
|
181
|
-
status_metadata?: {
|
|
182
|
-
is_issued?: boolean;
|
|
183
|
-
is_updated?: boolean;
|
|
184
|
-
is_expired?: boolean;
|
|
185
|
-
is_test?: boolean;
|
|
186
|
-
is_statement?: boolean;
|
|
187
|
-
};
|
|
188
|
-
metadata: {
|
|
189
|
-
ms: number;
|
|
190
|
-
source: string;
|
|
191
|
-
tracking: string;
|
|
192
|
-
hash?: string;
|
|
193
|
-
header: string;
|
|
194
|
-
vtec?: TypePVTEC | null;
|
|
195
|
-
hvtec?: TypeHVTEC[] | null;
|
|
196
|
-
nodes?: {
|
|
197
|
-
id?: string | number;
|
|
198
|
-
coordinates: [number, number];
|
|
199
|
-
nearest: [number, number];
|
|
200
|
-
miles: number | null;
|
|
201
|
-
kilometers: number | null;
|
|
202
|
-
proximity: boolean;
|
|
203
|
-
}[];
|
|
204
|
-
filtered_proximity?: boolean;
|
|
205
|
-
updated?: number;
|
|
206
|
-
history: {
|
|
207
|
-
description: string;
|
|
208
|
-
issued: string;
|
|
209
|
-
status: string;
|
|
210
|
-
}[];
|
|
211
|
-
attachments?: {
|
|
212
|
-
name: string;
|
|
213
|
-
link: string;
|
|
214
|
-
}[];
|
|
215
|
-
raw: string;
|
|
216
|
-
};
|
|
217
|
-
} & TypeEventProperties;
|
|
218
|
-
};
|
|
219
|
-
|
|
220
|
-
interface GetGeometryResponse {
|
|
221
|
-
type: `Polygon` | `MultiPolygon`;
|
|
222
|
-
coordinates: any[];
|
|
223
|
-
}
|
|
224
|
-
declare const getEventGeometry: (event: TypeEvent) => Promise<GetGeometryResponse>;
|
|
225
|
-
|
|
226
|
-
declare const getCleanedEvent: <T extends Record<string, any>>(event: T) => T;
|
|
227
|
-
|
|
228
|
-
declare const startService: (configurations: TypeSettings) => Promise<void>;
|
|
229
|
-
|
|
230
|
-
declare const stopService: () => Promise<void>;
|
|
231
|
-
|
|
232
|
-
interface GenerateEASOptions {
|
|
233
|
-
message: string;
|
|
234
|
-
header: string;
|
|
235
|
-
title: string;
|
|
236
|
-
}
|
|
237
|
-
declare const setEasTone: (options: GenerateEASOptions) => Promise<string>;
|
|
238
|
-
|
|
239
|
-
interface GetNodeOptions {
|
|
240
|
-
identifier: string;
|
|
241
|
-
delete?: boolean;
|
|
242
|
-
coordinates: {
|
|
243
|
-
longitude: number;
|
|
244
|
-
latitude: number;
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
declare const setNode: (options: GetNodeOptions) => void;
|
|
248
|
-
|
|
249
|
-
declare const getEvents: () => any;
|
|
250
|
-
|
|
251
|
-
declare const getNodes: () => any;
|
|
252
|
-
|
|
253
|
-
interface CreateEventOptions {
|
|
254
|
-
event: string;
|
|
255
|
-
status: string;
|
|
256
|
-
issued: Date;
|
|
257
|
-
expires: Date;
|
|
258
|
-
locations: string;
|
|
259
|
-
description: string;
|
|
260
|
-
coordinates: number[][];
|
|
261
|
-
}
|
|
262
|
-
declare const createEvent: (options: CreateEventOptions) => void;
|
|
263
|
-
|
|
264
|
-
declare const getRandomEvent: () => any;
|
|
265
|
-
|
|
266
|
-
type TypeStanza = {
|
|
267
|
-
getChild(arg0: string): unknown;
|
|
268
|
-
is(arg0: string): unknown;
|
|
269
|
-
name: string;
|
|
270
|
-
parent: TypeStanza | null;
|
|
271
|
-
children: any;
|
|
272
|
-
attrs: {
|
|
273
|
-
xmlns: string;
|
|
274
|
-
id: string;
|
|
275
|
-
issue: string;
|
|
276
|
-
ttaaii: string;
|
|
277
|
-
cccc: string;
|
|
278
|
-
awipsid: string;
|
|
279
|
-
from: string;
|
|
280
|
-
to: string;
|
|
281
|
-
type: string;
|
|
282
|
-
};
|
|
283
|
-
};
|
|
284
|
-
|
|
285
|
-
interface QueryOptions {
|
|
286
|
-
search: string;
|
|
287
|
-
max?: number;
|
|
288
|
-
}
|
|
289
|
-
declare const query: (options: QueryOptions) => Promise<TypeStanza[]>;
|
|
290
|
-
|
|
291
|
-
declare const clearEvents: () => void;
|
|
292
|
-
|
|
293
|
-
declare class Manager {
|
|
294
|
-
constructor(settings: TypeSettings);
|
|
295
|
-
on(event: string, callback: () => void): void;
|
|
296
|
-
trycatch(): void;
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
export { Manager, type TypeEvent, clearEvents, createEvent, Manager as default, getCleanedEvent, getEventGeometry, getEvents, getNodes, getRandomEvent, query, setEasTone, setNode, setSettings, startService, stopService };
|