@mark1russell7/guidebook-preparedness 0.0.0-stage → 0.1.0
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 +21 -0
- package/README.md +87 -2
- package/build/index.d.ts +51 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +2314 -0
- package/build/index.js.map +1 -0
- package/package.json +66 -3
- package/src/data/bundles.ts +38 -0
- package/src/data/gaps.ts +58 -0
- package/src/data/media.ts +32 -0
- package/src/data/sources.ts +48 -0
- package/src/data/steps.ts +339 -0
- package/src/data/topics.ts +105 -0
- package/src/index.ts +37 -0
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,88 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @mark1russell7/guidebook-preparedness
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The preparedness content of `@mark1russell7/guidebook`. It gives the steps of a household plan for 12 cases and 6 cuts, in each phase of the time ladder. It also gives 40 topics to learn and a catalog of offline bundles.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
pnpm add @mark1russell7/guidebook @mark1russell7/guidebook-plans @mark1russell7/guidebook-preparedness
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The core and the plans add-on name no topic. This package is the first topic.
|
|
10
|
+
|
|
11
|
+
## The content
|
|
12
|
+
|
|
13
|
+
| Name | What it is |
|
|
14
|
+
| --- | --- |
|
|
15
|
+
| `SOURCES` | The 28 sources. The 21 sources of the steps are pages of Ready.gov, CDC and FDA in the US public domain. The 5 sources of the bundles are 4 open wikis and the Stack Exchange network, under CC BY-SA 4.0. The 2 sources of the media rates are reports of Backblaze. |
|
|
16
|
+
| `CASE_STEPS` | The steps of the 12 cases and of the 2 more cases |
|
|
17
|
+
| `CUT_STEPS` | The steps of the 6 cuts |
|
|
18
|
+
| `STEPS` | All the steps |
|
|
19
|
+
| `GAPS` | The marked gaps: each key and phase with no step on purpose, with the reason |
|
|
20
|
+
| `CASES` | The codes of the 12 cases |
|
|
21
|
+
| `MORE_CASES` | The codes of 2 more cases, with the same gates |
|
|
22
|
+
| `CUTS` | The ids of the cuts |
|
|
23
|
+
| `NEEDS` | The need codes that the steps protect |
|
|
24
|
+
| `TOPICS` | The 40 topics, as a graph of prerequisites |
|
|
25
|
+
| `AREAS` | The 12 areas of the topics |
|
|
26
|
+
| `BUNDLES` | The 16 offline bundles: Kiwix files of Wikipedia, Wikibooks, Appropedia, energypedia and 10 sites of Stack Exchange |
|
|
27
|
+
| `BUNDLE_LEVELS` | The levels of the bundles: `pocket` fits on one flash drive of 32 GB, and `shelf` needs a larger drive |
|
|
28
|
+
| `BUNDLES_CHECKED` | The date of the last read of the Kiwix catalog |
|
|
29
|
+
| `MEDIA_UNITS` | The cited fact units of the loss rates of the media |
|
|
30
|
+
| `MEDIUM_LOSSES` | The yearly loss of each kind of medium with a cited rate: hard drives and SSDs |
|
|
31
|
+
| `MEDIUM_GAPS` | The kinds of medium with no cited rate: flash, optical and paper |
|
|
32
|
+
|
|
33
|
+
The steps are full from `ready` to `P3`. `P4` and `P5` are an outline. Each cell of the matrix has a step or a marked gap.
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import { stepsFor, phaseOf } from "@mark1russell7/guidebook-plans";
|
|
37
|
+
import { STEPS } from "@mark1russell7/guidebook-preparedness";
|
|
38
|
+
|
|
39
|
+
const steps = stepsFor(STEPS, ["met.winter.storm", "energy.grid", "road.local"], [phaseOf(2 * 86_400)]);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## The keys
|
|
43
|
+
|
|
44
|
+
The 12 cases are the codes of an event taxonomy:
|
|
45
|
+
|
|
46
|
+
`met.winter.storm`, `met.tropical.hurricane`, `met.flood`, `met.heat.extreme`, `met.tornado`, `geo.earthquake`, `fire.wildfire`, `fire.structure`, `infra.power.outage`, `infra.water.outage`, `health.outbreak`, `health.medical-emergency`.
|
|
47
|
+
|
|
48
|
+
The code `health.medical-emergency` is new in the taxonomy. A household starts this case, because no feed gives it.
|
|
49
|
+
|
|
50
|
+
An evacuation is a set of steps of the hurricane, the flood and the wildfire, not a case. The power outage and the water outage use the steps of their cuts.
|
|
51
|
+
|
|
52
|
+
The 2 more cases are `cbrne.hazardous-materials` and `cbrne.radiological`.
|
|
53
|
+
|
|
54
|
+
The 6 cuts are the services that an event stops:
|
|
55
|
+
|
|
56
|
+
`energy.grid`, `water.main`, `road.local`, `telecom.network`, `gas.main`, `store.pharmacy`.
|
|
57
|
+
|
|
58
|
+
The ids of the cuts are a proposal. A model of the system stack can give other ids. Then this package changes its ids to agree.
|
|
59
|
+
|
|
60
|
+
## The words
|
|
61
|
+
|
|
62
|
+
Each step is one instruction in Simplified Technical English, in the words of the guidebook. It is a summary of its sources, not a quote. Each step cites one or more pages that tell the action.
|
|
63
|
+
|
|
64
|
+
The test of the package applies these gates:
|
|
65
|
+
|
|
66
|
+
- The source gate of the core, on the sources.
|
|
67
|
+
- The step gate of the plans add-on, over all the keys and all the phases, with no unmarked gap.
|
|
68
|
+
- The rules of `ste-lint` on the text of each step and the reason of each gap.
|
|
69
|
+
- No plan of a case gives the same text two times.
|
|
70
|
+
|
|
71
|
+
## The topics and the bundles
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
import { printOrder } from "@mark1russell7/guidebook-topics";
|
|
75
|
+
import { TOPICS } from "@mark1russell7/guidebook-preparedness";
|
|
76
|
+
|
|
77
|
+
const book = printOrder(TOPICS); // each topic comes after its prerequisites
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Each topic names the bundles that hold it. The cited units of the topics are not written yet.
|
|
81
|
+
|
|
82
|
+
The size, the release and the address of each bundle come from the Kiwix catalog. A share-alike bundle keeps its license and its credit line. A use of a Stack Exchange bundle shows the network as the source, links each question, and shows and links the name of each author.
|
|
83
|
+
|
|
84
|
+
## The limits
|
|
85
|
+
|
|
86
|
+
- The steps are general advice for a household. They do not replace the instructions of the local authorities.
|
|
87
|
+
- The sources are US pages. A user in another country uses the sources of that country.
|
|
88
|
+
- A step names no place. The places and the contacts of a household are input data.
|
package/build/index.d.ts
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { CitedUnit, Source } from "@mark1russell7/guidebook";
|
|
2
|
+
import { Gap, Step } from "@mark1russell7/guidebook-plans";
|
|
3
|
+
import { Topic } from "@mark1russell7/guidebook-topics";
|
|
4
|
+
import { Bundle, MediumKind } from "@mark1russell7/guidebook-library";
|
|
5
|
+
/** The date of the last check of the sources against their pages. */
|
|
6
|
+
export declare const CHECKED = "2026-11-21";
|
|
7
|
+
/** The sources of the content, each with its id, its title, its address and the date of its last check. */
|
|
8
|
+
export declare const SOURCES: readonly Source[];
|
|
9
|
+
/** The steps of the cases. A case is a kind of event. */
|
|
10
|
+
export declare const CASE_STEPS: readonly Step[];
|
|
11
|
+
/** The steps of the cuts. A cut is a service that an event stops. A plan of a case adds the steps of its cuts. */
|
|
12
|
+
export declare const CUT_STEPS: readonly Step[];
|
|
13
|
+
/** All the steps of the content. */
|
|
14
|
+
export declare const STEPS: readonly Step[];
|
|
15
|
+
/** The marked gaps of the cases and the cuts. */
|
|
16
|
+
export declare const GAPS: readonly Gap[];
|
|
17
|
+
/** The areas of the topics. */
|
|
18
|
+
export declare const AREAS: readonly ["water", "food", "farming", "medicine", "sanitation", "shelter", "energy", "electronics", "metals", "tools", "chemistry", "communication"];
|
|
19
|
+
/** The topics of the content. `printOrder` of the topics add-on gives the sequence of the book. */
|
|
20
|
+
export declare const TOPICS: readonly Topic[];
|
|
21
|
+
/** The date of the last read of the Kiwix catalog feed. */
|
|
22
|
+
export declare const BUNDLES_CHECKED = "2026-11-21";
|
|
23
|
+
/**
|
|
24
|
+
* The levels of the bundles.
|
|
25
|
+
* - `pocket`: the small bundles. Together they fit on one flash drive of 32 GB.
|
|
26
|
+
* - `shelf`: the large bundles. Each needs a drive of 64 GB or more.
|
|
27
|
+
*/
|
|
28
|
+
export declare const BUNDLE_LEVELS: readonly ["pocket", "shelf"];
|
|
29
|
+
/** The bundles of the content, in the sequence of their level, and then of their size. */
|
|
30
|
+
export declare const BUNDLES: readonly Bundle[];
|
|
31
|
+
/** The fact units of the rates. */
|
|
32
|
+
export declare const MEDIA_UNITS: readonly CitedUnit[];
|
|
33
|
+
/** The yearly loss of each kind with a cited rate, and the unit of the rate. */
|
|
34
|
+
export declare const MEDIUM_LOSSES: Readonly<Partial<Record<MediumKind, {
|
|
35
|
+
readonly yearlyLoss: number;
|
|
36
|
+
readonly unit: string;
|
|
37
|
+
}>>>;
|
|
38
|
+
/** The kinds with no cited rate. A plan of copies cannot use them until a source gives a rate. */
|
|
39
|
+
export declare const MEDIUM_GAPS: readonly MediumKind[];
|
|
40
|
+
/**
|
|
41
|
+
* The 12 cases of v1. A case is a kind of event. The codes come from the event taxonomy of the alerts project.
|
|
42
|
+
* The code `health.medical-emergency` is new in that taxonomy.
|
|
43
|
+
*/
|
|
44
|
+
export declare const CASES: readonly ["met.winter.storm", "met.tropical.hurricane", "met.flood", "met.heat.extreme", "met.tornado", "geo.earthquake", "fire.wildfire", "fire.structure", "infra.power.outage", "infra.water.outage", "health.outbreak", "health.medical-emergency"];
|
|
45
|
+
/** The cases past v1. Their steps have the same gates as the steps of `CASES`. */
|
|
46
|
+
export declare const MORE_CASES: readonly ["cbrne.hazardous-materials", "cbrne.radiological"];
|
|
47
|
+
/** The cuts of the content. A cut is a service that an event stops. These ids are a proposal until the stack model names them. */
|
|
48
|
+
export declare const CUTS: readonly ["energy.grid", "water.main", "road.local", "telecom.network", "gas.main", "store.pharmacy"];
|
|
49
|
+
/** The need codes that the steps protect. */
|
|
50
|
+
export declare const NEEDS: readonly ["hydration.drink", "food.energy", "health.medicine", "power.electric"];
|
|
51
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/data/sources.ts","../src/data/steps.ts","../src/data/gaps.ts","../src/data/topics.ts","../src/data/bundles.ts","../src/data/media.ts","../src/index.ts"],"mappings":";;;;;qBAOa;;qBAKA,kBAAkB;;qBCyClB,qBAAqB;;qBA+MrB,oBAAoB;;qBA8EpB,gBAAgB;;qBCvUhB,eAAe;;qBCLf;;qBAyDA,iBAAiB;;qBCvDjB;;;;;;qBAOA;;qBAKA,kBAAkB;;qBCblB,sBAAsB;;qBAkBtB,eAAe,SAAS,QAAQ,OAAO;WAAuB;WAA6B;;;qBAM3F,sBAAsB;;;;;qBCjBtB;;qBAgBA;;qBAGA;;qBAGA"}
|