@mark1russell7/guidebook-preparedness 0.7.48 → 0.7.50
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/build/index.d.ts.map +1 -1
- package/build/index.js +51 -4
- package/build/index.js.map +1 -1
- package/package.json +2 -2
- package/src/data/persons.ts +21 -0
- package/src/data/sources.ts +2 -2
- package/src/data/steps.ts +6 -2
- package/src/data/uses.ts +15 -4
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package",
|
|
3
3
|
"name": "@mark1russell7/guidebook-preparedness",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.50",
|
|
5
5
|
"description": "The preparedness content of the guidebook: cited sources, the steps and marked gaps of 12 cases and 6 cuts, 40 topics in 12 areas, and the catalog of offline bundles.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"guidebook",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@mark1russell7/guidebook": "0.7.0",
|
|
60
60
|
"@mark1russell7/guidebook-library": "0.5.0",
|
|
61
|
-
"@mark1russell7/guidebook-plans": "0.3.
|
|
61
|
+
"@mark1russell7/guidebook-plans": "0.3.10",
|
|
62
62
|
"@mark1russell7/guidebook-topics": "0.1.9",
|
|
63
63
|
"@mark1russell7/vex": "^0.20.2"
|
|
64
64
|
},
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// The groups of persons that each step protects, by the id of the step. Each group is in `PERSON_GROUPS` of `@mark1russell7/guidebook-plans`.
|
|
2
|
+
// A step gets a group only when its action names the persons of the group: infants and baby formula, children, older adults or pregnancy.
|
|
3
|
+
// A step that names a child under 2 gets the groups `infant` and `child`.
|
|
4
|
+
|
|
5
|
+
import type { PersonGroup } from "@mark1russell7/guidebook-plans";
|
|
6
|
+
|
|
7
|
+
/** The groups of persons that each step protects, by the `id` of the step. A test holds that each key is the id of a step. */
|
|
8
|
+
export const STEP_PERSONS: Readonly<Record<string, readonly PersonGroup[]>> = {
|
|
9
|
+
"met.tropical.hurricane.warned.neighbors": ["older-adult"],
|
|
10
|
+
"met.tropical.hurricane.P3.mold": ["child"],
|
|
11
|
+
"met.heat.extreme.P1.check": ["older-adult"],
|
|
12
|
+
"fire.structure.ready.children": ["child"],
|
|
13
|
+
"fire.wildfire.P1.n95": ["infant", "child"],
|
|
14
|
+
"infra.supply-chain.food.ready.household": ["infant"],
|
|
15
|
+
"infra.supply-chain.food.P2.formula": ["infant"],
|
|
16
|
+
"cbrne.nuclear-detonation.P2.pregnant-care": ["pregnant"],
|
|
17
|
+
"security.armed-conflict.P3.children": ["child"],
|
|
18
|
+
"water.main.P1.unsafe": ["infant"],
|
|
19
|
+
"network.access.P5.teach-children": ["child"],
|
|
20
|
+
"food.retail.P3.share-by-need": ["child"],
|
|
21
|
+
};
|
package/src/data/sources.ts
CHANGED
|
@@ -13,10 +13,10 @@ const federal = (id: string, by: string, title: string, url: string): Source =>
|
|
|
13
13
|
export const SOURCES: readonly Source[] = [
|
|
14
14
|
federal("ready-winter", "Ready.gov", "Winter Weather", "https://www.ready.gov/winter-weather"),
|
|
15
15
|
federal("ready-hurricanes", "Ready.gov", "Hurricanes", "https://www.ready.gov/hurricanes"),
|
|
16
|
-
federal("ready-floods", "Ready.gov", "Floods", "https://www.ready.gov/floods"),
|
|
16
|
+
{ ...federal("ready-floods", "Ready.gov", "Floods", "https://www.ready.gov/floods"), checked: "2026-11-26" },
|
|
17
17
|
federal("ready-heat", "Ready.gov", "Extreme Heat", "https://www.ready.gov/heat"),
|
|
18
18
|
{ ...federal("nws-heat-ww", "National Weather Service", "Understanding Heat Alerts", "https://www.weather.gov/safety/heat-ww"), checked: "2026-11-24" },
|
|
19
|
-
federal("ready-tornadoes", "Ready.gov", "Tornadoes", "https://www.ready.gov/tornadoes"),
|
|
19
|
+
{ ...federal("ready-tornadoes", "Ready.gov", "Tornadoes", "https://www.ready.gov/tornadoes"), checked: "2026-11-26" },
|
|
20
20
|
federal("ready-earthquakes", "Ready.gov", "Earthquakes", "https://www.ready.gov/earthquakes"),
|
|
21
21
|
federal("ready-fire", "Ready.gov", "Home Fires", "https://www.ready.gov/home-fires"),
|
|
22
22
|
{ ...federal("ready-escape-plan", "Ready.gov", "Home Fire Escape Plan", "https://www.ready.gov/home-fire-escape-plan"), checked: "2026-11-24" },
|
package/src/data/steps.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
import type { Phase, Society, Step } from "@mark1russell7/guidebook-plans";
|
|
5
5
|
import { app, key, lit, ref, serialize } from "@mark1russell7/vex";
|
|
6
6
|
import type { Expr } from "@mark1russell7/vex";
|
|
7
|
+
import { STEP_PERSONS } from "./persons.ts";
|
|
7
8
|
import { STEP_USES } from "./uses.ts";
|
|
8
9
|
|
|
9
10
|
/** One row of a key: the phase, a short name, the action, the sources and the needs that the step protects. */
|
|
@@ -13,7 +14,7 @@ type Row = readonly [phase: Phase, name: string, action: string, sources: readon
|
|
|
13
14
|
|
|
14
15
|
/**
|
|
15
16
|
* This function makes the steps of a key from its rows. The order of a step is its position among the rows of its phase.
|
|
16
|
-
* The items that a step uses come from `STEP_USES`, by the id of the step.
|
|
17
|
+
* The items that a step uses come from `STEP_USES`, and its groups of persons come from `STEP_PERSONS`, by the id of the step.
|
|
17
18
|
*/
|
|
18
19
|
function stepsOf(on: string, rows: readonly Row[]): Step[] {
|
|
19
20
|
const count = new Map<Phase, number>();
|
|
@@ -23,7 +24,8 @@ function stepsOf(on: string, rows: readonly Row[]): Step[] {
|
|
|
23
24
|
count.set(phase, order);
|
|
24
25
|
const id = `${on}.${phase}.${name}`;
|
|
25
26
|
const uses = STEP_USES[id];
|
|
26
|
-
|
|
27
|
+
const persons = STEP_PERSONS[id];
|
|
28
|
+
return { id, on, phase, needs, do: action, ...(uses === undefined ? {} : { uses }), ...(persons === undefined ? {} : { persons }), order, sources, ...(reasoning === undefined ? {} : { reasoning }), ...(society === undefined ? {} : { society }), ...(when === undefined ? {} : { when }) };
|
|
27
29
|
});
|
|
28
30
|
}
|
|
29
31
|
|
|
@@ -132,6 +134,7 @@ export const CASE_STEPS: readonly Step[] = [
|
|
|
132
134
|
["ready", "insurance", "Buy flood insurance well before a flood. A new policy can need up to 30 days to start.", ["ready-floods"]],
|
|
133
135
|
["ready", "papers", "Keep your papers in a waterproof container, and make digital copies with a password.", ["ready-floods"]],
|
|
134
136
|
["ready", "valuables", "Move valuable items to higher levels, and clear the drains and gutters.", ["ready-floods"]],
|
|
137
|
+
["ready", "alerts", "Sign up for the warning system of your community. The Emergency Alert System and a NOAA Weather Radio also give flood alerts.", ["ready-floods"]],
|
|
135
138
|
["warned", "shelter", "When a flood warning comes, go to a safe shelter immediately.", ["ready-floods"]],
|
|
136
139
|
["warned", "bridges", "Stay off bridges over fast-moving water.", ["ready-floods"]],
|
|
137
140
|
["P0", "evacuate", "If the water can reach your home or cut your route, go immediately. Do not drive around barricades.", ["ready-floods"], { reasoning: "A flood closes the low roads first. When you go early, the route is open." }],
|
|
@@ -172,6 +175,7 @@ export const CASE_STEPS: readonly Step[] = [
|
|
|
172
175
|
["ready", "practice", "Practice the route to the shelter with your household and pets.", ["ready-tornadoes"]],
|
|
173
176
|
["ready", "signs", "Learn the signs: a turning funnel cloud, a cloud of debris, or a loud roar.", ["ready-tornadoes"]],
|
|
174
177
|
["ready", "sirens", "Learn the sounds of the sirens in your area.", ["ready-tornadoes"]],
|
|
178
|
+
["ready", "alerts", "Sign up for the warning system of your community. The Emergency Alert System and a NOAA Weather Radio also give tornado alerts.", ["ready-tornadoes"]],
|
|
175
179
|
["warned", "shelter", "When a tornado warning comes, go to your safe shelter immediately.", ["ready-tornadoes"]],
|
|
176
180
|
["warned", "walls", "Stay away from windows, doors and outside walls.", ["ready-tornadoes"]],
|
|
177
181
|
["P0", "room", "Go to a small room with no windows on the lowest floor. Stay away from windows, doors and outer walls.", ["ready-tornadoes"]],
|
package/src/data/uses.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
// The items that each step uses, by the id of the step. Each item is the id of a product of the supply catalog of
|
|
2
2
|
// `@mark1russell7/market/supplies`. A planner joins a step to the stock and the buy list with these ids.
|
|
3
3
|
//
|
|
4
|
-
// A step gets an item only when its action needs that item.
|
|
5
|
-
//
|
|
6
|
-
//
|
|
4
|
+
// A step gets an item only when its action needs that item. The weather radio receives only the stations of the weather
|
|
5
|
+
// service. A step that names an FM or AM radio, or a local, a public or an emergency station, gets the AM and FM radio.
|
|
6
|
+
// A step that names shortwave gets no radio: the catalog has no product for it.
|
|
7
7
|
|
|
8
8
|
const WEATHER_RADIO = "communication.noaa-radio";
|
|
9
|
+
const AM_FM_RADIO = "communication.am-fm-radio";
|
|
9
10
|
const TWO_WAY_RADIOS = "communication.frs-radio-pair";
|
|
10
11
|
const FLASHLIGHT = "light.flashlight";
|
|
11
12
|
const CELLS = "power.aa-alkaline";
|
|
@@ -16,6 +17,8 @@ const SLEEPING_BAG = "heat.sleeping-bag";
|
|
|
16
17
|
export const STEP_USES: Readonly<Record<string, readonly string[]>> = {
|
|
17
18
|
"met.winter.storm.ready.supplies": [WEATHER_RADIO, FLASHLIGHT, CELLS],
|
|
18
19
|
"met.winter.storm.ready.car-kit": [FLASHLIGHT],
|
|
20
|
+
"met.flood.ready.alerts": [WEATHER_RADIO],
|
|
21
|
+
"met.tornado.ready.alerts": [WEATHER_RADIO],
|
|
19
22
|
"met.tornado.P1.listen": [WEATHER_RADIO],
|
|
20
23
|
"cbrne.hazardous-materials.warned.listen": [WEATHER_RADIO],
|
|
21
24
|
"cbrne.radiological.ready.radio": [WEATHER_RADIO, CELLS],
|
|
@@ -23,18 +26,26 @@ export const STEP_USES: Readonly<Record<string, readonly string[]>> = {
|
|
|
23
26
|
"health.medical-emergency.ready.first-aid-kit": [FIRST_AID_KIT],
|
|
24
27
|
"civic.ai-collapse.ready.radio": [WEATHER_RADIO, CELLS],
|
|
25
28
|
"civic.ai-collapse.P0.shelter": [WEATHER_RADIO],
|
|
29
|
+
"civic.ai-collapse.P1.radio-info": [AM_FM_RADIO],
|
|
30
|
+
"infra.power.grid-collapse.ready.radio": [AM_FM_RADIO, CELLS],
|
|
31
|
+
"cyber.infrastructure-attack.ready.radio": [AM_FM_RADIO, CELLS],
|
|
32
|
+
"security.civil-unrest.P0.go-in": [AM_FM_RADIO],
|
|
33
|
+
"security.armed-conflict.warned.alarm-radio": [AM_FM_RADIO],
|
|
26
34
|
"infra.power.grid-collapse.ready.warm": [SLEEPING_BAG],
|
|
27
35
|
"cbrne.nuclear-detonation.ready.alerts-and-radio": [WEATHER_RADIO, CELLS],
|
|
28
36
|
"security.nuclear-war.ready.radio": [WEATHER_RADIO, CELLS],
|
|
29
37
|
"security.nuclear-war.warned.public-warning": [WEATHER_RADIO],
|
|
30
38
|
"cbrne.emp.ready.spare-batteries": [CELLS],
|
|
31
|
-
"cbrne.emp.
|
|
39
|
+
"cbrne.emp.ready.battery-radio": [AM_FM_RADIO, CELLS],
|
|
40
|
+
"cbrne.emp.P1.listen-radio": [AM_FM_RADIO],
|
|
32
41
|
"security.armed-conflict.ready.radio": [WEATHER_RADIO, CELLS],
|
|
33
42
|
"power.grid.ready.flashlights": [FLASHLIGHT],
|
|
34
43
|
"phone.network.ready.radio": [WEATHER_RADIO, CELLS],
|
|
35
44
|
"phone.network.ready.radios": [TWO_WAY_RADIOS],
|
|
36
45
|
"phone.network.P4.two-way-radio": [TWO_WAY_RADIOS],
|
|
46
|
+
"phone.network.P2.news": [AM_FM_RADIO],
|
|
37
47
|
"network.access.ready.radio": [WEATHER_RADIO, CELLS],
|
|
48
|
+
"network.access.P1.news": [AM_FM_RADIO],
|
|
38
49
|
"care.local.P3.medic": [FIRST_AID_KIT],
|
|
39
50
|
"fuel.retail.ready.warm-layers": [SLEEPING_BAG],
|
|
40
51
|
"home.dwelling.P1.radio": [WEATHER_RADIO, CELLS],
|