@mark1russell7/alerts 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mark Russell
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,50 @@
1
- # Temporary Holding Version
1
+ # @mark1russell7/alerts
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The signal core of an alert system. It holds the contracts of the event, the source and the channel, and the calculations over them.
4
+
5
+ The core names no person and no place. The people, the places and the keys of a user are input data.
6
+
7
+ ## Install
8
+
9
+ ```sh
10
+ npm install @mark1russell7/alerts
11
+ ```
12
+
13
+ The package needs Node.js 22 or later. It is an ES module.
14
+
15
+ ## What the package holds
16
+
17
+ | Area | What it does |
18
+ | --- | --- |
19
+ | Contracts | The event format, based on CAP (the Common Alerting Protocol), and the contracts of a source adapter and a channel. |
20
+ | Ids and merge | The id of each report and of each incident. The merge of duplicate reports is idempotent and does not change with the order. |
21
+ | Assessment | The first assessment of an incident, its score, its audience and the record that tells why. |
22
+ | Escalation | The chain of the steps of a route, the acknowledgement, the send limits, the digest and the drills. |
23
+ | Sources | The health and the coverage of each source, the lateness across sources and the system reports. |
24
+ | Kinds | The taxonomy of the kinds of an alert, with a lock file of the codes. |
25
+ | Lifelines and needs | The 8 FEMA Community Lifelines, and the needs of a person each day with an official source for each amount. |
26
+ | Indicators | The checks of the indicator readings and the read of each indicator series. |
27
+ | Map | The view of the map, the shapes and the base map. |
28
+
29
+ ## Example
30
+
31
+ ```ts
32
+ import { LIFELINES, LIFELINE_LABELS, NEEDS, kindLabel } from "@mark1russell7/alerts";
33
+
34
+ for (const code of LIFELINES) console.log(code, LIFELINE_LABELS[code]);
35
+ for (const need of NEEDS) console.log(need.code, need.perPersonDay, need.unit, need.source.url);
36
+ console.log(kindLabel("other.unknown"));
37
+ ```
38
+
39
+ ## Stability
40
+
41
+ The version is below 1.0.0. Thus a minor version can change the API. The file `test/api/public-api.txt` holds the report of the API.
42
+
43
+ ## Documents
44
+
45
+ - [The contracts](https://github.com/metrograph-labs/alerts/blob/main/docs/CONTRACTS.md) tell each type and each rule of the core.
46
+ - [The roadmap](https://github.com/metrograph-labs/alerts/blob/main/docs/ROADMAP.md) tells the plan of the work.
47
+
48
+ ## License
49
+
50
+ MIT