@mark1russell7/guidebook-preparedness 0.7.23 → 0.7.25
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 +222 -5
- package/build/index.js.map +1 -1
- package/package.json +7 -5
- package/src/data/sources.ts +11 -0
- package/src/data/steps.ts +25 -6
- package/src/data/tab-units.ts +146 -1
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.25",
|
|
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",
|
|
@@ -47,18 +47,20 @@
|
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@mark1russell7/cue": "^2.0.0",
|
|
50
|
+
"@mark1russell7/ste-lint": "^0.4.0",
|
|
51
|
+
"@mark1russell7/vex-domains": "^0.20.2",
|
|
50
52
|
"@types/node": "^26.6.5",
|
|
51
53
|
"@vitest/coverage-v8": "^5.0.3",
|
|
52
|
-
"typescript": "^7.0.2",
|
|
53
|
-
"vitest": "^5.0.3",
|
|
54
54
|
"tsdown": "^0.23.7",
|
|
55
|
-
"
|
|
55
|
+
"typescript": "^7.0.2",
|
|
56
|
+
"vitest": "^5.0.3"
|
|
56
57
|
},
|
|
57
58
|
"dependencies": {
|
|
58
59
|
"@mark1russell7/guidebook": "0.2.0",
|
|
59
60
|
"@mark1russell7/guidebook-library": "0.2.1",
|
|
60
61
|
"@mark1russell7/guidebook-plans": "0.3.1",
|
|
61
|
-
"@mark1russell7/guidebook-topics": "0.1.2"
|
|
62
|
+
"@mark1russell7/guidebook-topics": "0.1.2",
|
|
63
|
+
"@mark1russell7/vex": "^0.20.2"
|
|
62
64
|
},
|
|
63
65
|
"scripts": {
|
|
64
66
|
"build": "tsdown",
|
package/src/data/sources.ts
CHANGED
|
@@ -170,6 +170,17 @@ export const SOURCES: readonly Source[] = [
|
|
|
170
170
|
{ id: "purdue-rice", title: "All About Cooking Rice (2023)", url: "https://extension.purdue.edu/news/county/putnam/2023/09/all-about-cooking-rice.html", license: "all-rights-reserved", checked: "2026-11-22", by: "Purdue University Extension" },
|
|
171
171
|
{ ...federal("eia-btu", "U.S. Energy Information Administration", "British thermal units (Btu)", "https://www.eia.gov/energyexplained/units-and-calculators/british-thermal-units.php"), checked: "2026-11-22" },
|
|
172
172
|
{ ...federal("cdc-food-poisoning", "CDC", "Preventing Food Poisoning", "https://www.cdc.gov/food-safety/prevention/index.html"), checked: "2026-11-22" },
|
|
173
|
+
// The sources of the tab health, read on 2026-11-22. The page of the extension service gives only a copyright mark.
|
|
174
|
+
// The terms of use of WHO let you copy extracts only for study and a use with no commercial purpose. The site of the 988 Lifeline
|
|
175
|
+
// says that its network administrator owns most of its text. Thus these sources keep the strictest rule, and their units are a summary or a fact.
|
|
176
|
+
{ ...federal("cdc-hands-faq", "CDC", "Hand Hygiene Frequently Asked Questions", "https://www.cdc.gov/clean-hands/faq/index.html"), checked: "2026-11-22" },
|
|
177
|
+
{ id: "osu-em9334", title: "Survival Basics: Sanitation and Waste Management (EM 9334)", url: "https://extension.oregonstate.edu/catalog/pub/em9334", license: "all-rights-reserved", checked: "2026-11-22", by: "Oregon State University Extension Service" },
|
|
178
|
+
{ ...federal("cdc-prescriptions", "CDC, Prepare Your Health", "Prescriptions", "https://www.cdc.gov/prepare-your-health/take-action/prescriptions.html"), checked: "2026-11-22" },
|
|
179
|
+
{ ...federal("cdc-pinkbook-tetanus", "CDC", "Chapter 21: Tetanus (the Pink Book)", "https://www.cdc.gov/pinkbook/hcp/table-of-contents/chapter-21-tetanus.html"), checked: "2026-11-22" },
|
|
180
|
+
{ id: "lifeline-988", title: "988 Suicide & Crisis Lifeline", url: "https://988lifeline.org/", license: "all-rights-reserved", checked: "2026-11-22", by: "988 Suicide & Crisis Lifeline" },
|
|
181
|
+
{ id: "who-mental-emergencies", title: "Mental health in emergencies (fact sheet)", url: "https://www.who.int/news-room/fact-sheets/detail/mental-health-in-emergencies", license: "all-rights-reserved", checked: "2026-11-22", by: "World Health Organization" },
|
|
182
|
+
{ id: "who-dead-bodies-risks", title: "Risks posed by dead bodies after disasters (2013)", url: "https://www.who.int/publications/m/item/risks-posed-by-dead-bodies-after-disasters", license: "all-rights-reserved", checked: "2026-11-22", by: "World Health Organization" },
|
|
183
|
+
{ id: "who-dead-bodies-qa", title: "Emergencies: Management of dead bodies (questions and answers)", url: "https://www.who.int/news-room/questions-and-answers/item/emergencies-management-of-dead-bodies", license: "all-rights-reserved", checked: "2026-11-22", by: "World Health Organization" },
|
|
173
184
|
// The 72 hours guidance of SPEK, the Finnish National Rescue Association, with the Finnish government. The pages give no license.
|
|
174
185
|
// Thus each step is a summary with a citation, not a quote.
|
|
175
186
|
{ id: "fi-72h-shelter", title: "Sheltering indoors", url: "https://72tuntia.fi/en/sheltering-indoors/", license: "all-rights-reserved", checked: "2026-11-22", by: "SPEK, 72 hours" },
|
package/src/data/steps.ts
CHANGED
|
@@ -2,23 +2,42 @@
|
|
|
2
2
|
// The steps are full from `ready` to `P3`. `P4` and `P5` are an outline. Each cell with no step has a marked gap in `gaps.ts`.
|
|
3
3
|
|
|
4
4
|
import type { Phase, Society, Step } from "@mark1russell7/guidebook-plans";
|
|
5
|
+
import { app, key, lit, ref, serialize } from "@mark1russell7/vex";
|
|
6
|
+
import type { Expr } from "@mark1russell7/vex";
|
|
5
7
|
|
|
6
8
|
/** One row of a key: the phase, a short name, the action, the sources and the needs that the step protects. */
|
|
7
|
-
/** The more fields of a row: the needs that the step protects, its reasoning,
|
|
8
|
-
type More = { readonly needs?: readonly string[]; readonly reasoning?: string; readonly society?: readonly Society[] };
|
|
9
|
+
/** The more fields of a row: the needs that the step protects, its reasoning, the states of society that it is for, and its condition. */
|
|
10
|
+
type More = { readonly needs?: readonly string[]; readonly reasoning?: string; readonly society?: readonly Society[]; readonly when?: string };
|
|
9
11
|
type Row = readonly [phase: Phase, name: string, action: string, sources: readonly string[], more?: readonly string[] | More];
|
|
10
12
|
|
|
11
13
|
/** 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. */
|
|
12
14
|
function stepsOf(on: string, rows: readonly Row[]): Step[] {
|
|
13
15
|
const count = new Map<Phase, number>();
|
|
14
16
|
return rows.map(([phase, name, action, sources, more = []]) => {
|
|
15
|
-
const { needs = [], reasoning, society } = Array.isArray(more) ? { needs: more as readonly string[] } : (more as More);
|
|
17
|
+
const { needs = [], reasoning, society, when } = Array.isArray(more) ? { needs: more as readonly string[] } : (more as More);
|
|
16
18
|
const order = (count.get(phase) ?? 0) + 1;
|
|
17
19
|
count.set(phase, order);
|
|
18
|
-
return { id: `${on}.${phase}.${name}`, on, phase, needs, do: action, order, sources, ...(reasoning === undefined ? {} : { reasoning }), ...(society === undefined ? {} : { society }) };
|
|
20
|
+
return { id: `${on}.${phase}.${name}`, on, phase, needs, do: action, order, sources, ...(reasoning === undefined ? {} : { reasoning }), ...(society === undefined ? {} : { society }), ...(when === undefined ? {} : { when }) };
|
|
19
21
|
});
|
|
20
22
|
}
|
|
21
23
|
|
|
24
|
+
/**
|
|
25
|
+
* This function gives the JSON form of a condition `when`: a Vex program over the live keys.
|
|
26
|
+
* Each live key has the field `stopped`, and a stopped key with a known start has the field `hours`.
|
|
27
|
+
* A step gets a `when` only if the live keys decide its condition. A condition that a person sees (a smell, the weather) gets no `when`.
|
|
28
|
+
*/
|
|
29
|
+
function condition(expr: Expr): string {
|
|
30
|
+
const text = serialize(expr);
|
|
31
|
+
if (!text.ok) throw new Error("the condition does not serialize");
|
|
32
|
+
return text.value;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** The expression that is true when the live key `part` is stopped. */
|
|
36
|
+
const stopped = (part: string): Expr => ref(["stopped"], [key(part)]);
|
|
37
|
+
|
|
38
|
+
/** The expression that is true when the live key `part` is stopped for more than `hours` hours. */
|
|
39
|
+
const stoppedOver = (part: string, hours: number): Expr => app("and", stopped(part), app("gt", ref(["hours"], [key(part)]), lit(hours)));
|
|
40
|
+
|
|
22
41
|
const DRINK = "hydration.drink";
|
|
23
42
|
const FOOD = "food.energy";
|
|
24
43
|
const MEDICINE = "health.medicine";
|
|
@@ -311,7 +330,7 @@ export const CASE_STEPS: readonly Step[] = [
|
|
|
311
330
|
["P0", "friend-account", "If a message from the account of a friend seems strange, ask the friend in a different way.", ["fi-72h-cyber"]],
|
|
312
331
|
["P0", "no-send", "Do not send money, gift cards or cryptocurrency to a person that you know only online or by phone.", ["ic3-genai"]],
|
|
313
332
|
["P1", "sources", "Get news from more than one source: the phone alerts, the radio, the television and the persons near you.", ["ready-alerts"], { reasoning: "Each source can stop or be wrong. A fact that two sources agree on is more certain." }],
|
|
314
|
-
["P1", "radio-info", "If the phone and data networks stop, get the news from the public radio on batteries.", ["fi-72h-info"]],
|
|
333
|
+
["P1", "radio-info", "If the phone and data networks stop, get the news from the public radio on batteries.", ["fi-72h-info"], { when: condition(app("and", stopped("phone.network"), stopped("network.access"))) }],
|
|
315
334
|
["P1", "phone-lines", "Use the phone only when necessary, so that the lines stay open.", ["fi-72h-shelter"]],
|
|
316
335
|
["P1", "who-says", "Before you believe a report, find who wrote it, and find a second source that agrees.", ["fi-72h-info"]],
|
|
317
336
|
["P1", "no-rumours", "Do not pass on a report that does not seem true.", ["fi-72h-info"]],
|
|
@@ -627,7 +646,7 @@ export const CUT_STEPS: readonly Step[] = [
|
|
|
627
646
|
["P2", "food-40", "Discard food that is at 40 °F or higher for two hours or more.", ["ready-power"], [FOOD]],
|
|
628
647
|
["P2", "extreme", "If the heat or the cold is extreme, go to a community place that has power.", ["ready-power"]],
|
|
629
648
|
["P2", "refuel", "Let a generator cool before you add fuel.", ["ready-power"]],
|
|
630
|
-
["P2", "medicine", "After more than one day with no power, discard refrigerated medicine, unless its label tells otherwise.", ["ready-power"], [MEDICINE]],
|
|
649
|
+
["P2", "medicine", "After more than one day with no power, discard refrigerated medicine, unless its label tells otherwise.", ["ready-power"], { needs: [MEDICINE], when: condition(stoppedOver("power.grid", 24)) }],
|
|
631
650
|
["P3", "doubt", "Discard food with an unusual odor, color or texture. When in doubt, throw it out.", ["ready-power"], [FOOD]],
|
|
632
651
|
["P3", "lifesaving", "If a refrigerated medicine keeps you alive and you have no replacement, use it until you get a new supply.", ["fda-drugs"], [MEDICINE]],
|
|
633
652
|
["P3", "few-loads", "Use the stored power only for light, the radio, the phones and medical devices.", [], { needs: [POWER], reasoning: "Heat and cooking empty stored power fast. Small loads make it last for weeks.", society: NONE }],
|
package/src/data/tab-units.ts
CHANGED
|
@@ -1449,5 +1449,150 @@ const FOOD: readonly CitedUnit[] = [
|
|
|
1449
1449
|
},
|
|
1450
1450
|
];
|
|
1451
1451
|
|
|
1452
|
+
/** The units of the tab health that are not medical care: clean hands, toilets, the supply of medicines, distress, vaccines and a death. */
|
|
1453
|
+
const HEALTH: readonly CitedUnit[] = [
|
|
1454
|
+
{
|
|
1455
|
+
id: "tab.health.hands.sanitizer-limits",
|
|
1456
|
+
use: "fact",
|
|
1457
|
+
text: "A hand sanitizer does not work well on hands that are dirty or greasy. It does not remove harmful chemicals.",
|
|
1458
|
+
source: "cdc-hands-faq",
|
|
1459
|
+
locator: "Hand sanitizer and wipes",
|
|
1460
|
+
},
|
|
1461
|
+
{
|
|
1462
|
+
id: "tab.health.hands.water-only",
|
|
1463
|
+
use: "summary",
|
|
1464
|
+
text: "With water but no soap and no sanitizer, rub your hands together under the water. Dry them with a clean towel or in the air. This removes some germs, but less than soap.",
|
|
1465
|
+
source: "cdc-hands-faq",
|
|
1466
|
+
locator: "Using soap and water",
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
id: "tab.health.toilets.street-pipes",
|
|
1470
|
+
use: "summary",
|
|
1471
|
+
text: "After a disaster, do not use a toilet, also when the pipes of the home have no damage. The pipes in the street can be broken.",
|
|
1472
|
+
source: "osu-em9334",
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
id: "tab.health.toilets.two-buckets",
|
|
1476
|
+
use: "summary",
|
|
1477
|
+
text: "For a toilet, use two 5-gallon buckets with lids. Mark one bucket for urine and one for feces. Waste that you keep apart is easier to store and to discard.",
|
|
1478
|
+
source: "osu-em9334",
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
id: "tab.health.toilets.feces-bag",
|
|
1482
|
+
use: "fact",
|
|
1483
|
+
text: "Line the bucket for feces with a heavy plastic garbage bag of 13 gallons.",
|
|
1484
|
+
source: "osu-em9334",
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
id: "tab.health.toilets.carbon",
|
|
1488
|
+
use: "summary",
|
|
1489
|
+
text: "After each use, cover the feces completely with approximately 1/2 cup of carbon material. Use wood shavings, sawdust, shredded paper, bark chips or peat moss.",
|
|
1490
|
+
source: "osu-em9334",
|
|
1491
|
+
},
|
|
1492
|
+
{
|
|
1493
|
+
id: "tab.health.toilets.bag-full",
|
|
1494
|
+
use: "summary",
|
|
1495
|
+
text: "Fill the bucket for feces to half or less. Put on disposable gloves. Close the bag tightly, and put it in a second bag.",
|
|
1496
|
+
source: "osu-em9334",
|
|
1497
|
+
},
|
|
1498
|
+
{
|
|
1499
|
+
id: "tab.health.toilets.bag-store",
|
|
1500
|
+
use: "summary",
|
|
1501
|
+
text: "Keep the bags of feces away from other garbage, and far from the food and the water. Keep them until the sanitary system works again.",
|
|
1502
|
+
source: "osu-em9334",
|
|
1503
|
+
},
|
|
1504
|
+
{
|
|
1505
|
+
id: "tab.health.toilets.urine",
|
|
1506
|
+
use: "summary",
|
|
1507
|
+
text: "Dilute the urine with water, and pour it on the ground. Use a different place each time.",
|
|
1508
|
+
source: "osu-em9334",
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
id: "tab.health.toilets.latrine-rock",
|
|
1512
|
+
use: "fact",
|
|
1513
|
+
text: "In cracked rock or limestone, keep a latrine more than 30 m from water sources.",
|
|
1514
|
+
source: "sphere-2018",
|
|
1515
|
+
locator: "Excreta management standard 3.1, guidance note Distance from water sources",
|
|
1516
|
+
},
|
|
1517
|
+
{
|
|
1518
|
+
id: "tab.health.medicines.emergency-supply",
|
|
1519
|
+
use: "summary",
|
|
1520
|
+
text: "Talk to your doctor or pharmacist about an emergency supply of your medicines.",
|
|
1521
|
+
source: "cdc-prescriptions",
|
|
1522
|
+
locator: "The Basics",
|
|
1523
|
+
},
|
|
1524
|
+
{
|
|
1525
|
+
id: "tab.health.medicines.cold",
|
|
1526
|
+
use: "summary",
|
|
1527
|
+
text: "Keep a cooler and chemical ice packs for the medicines that must stay cold.",
|
|
1528
|
+
source: "cdc-prescriptions",
|
|
1529
|
+
locator: "The Basics",
|
|
1530
|
+
},
|
|
1531
|
+
{
|
|
1532
|
+
id: "tab.health.mind.distress",
|
|
1533
|
+
use: "fact",
|
|
1534
|
+
text: "Almost all people feel distress after an emergency. It usually becomes less with time.",
|
|
1535
|
+
source: "who-mental-emergencies",
|
|
1536
|
+
locator: "Key facts",
|
|
1537
|
+
},
|
|
1538
|
+
{
|
|
1539
|
+
id: "tab.health.mind.distress-signs",
|
|
1540
|
+
use: "fact",
|
|
1541
|
+
text: "The usual signs of distress are anxiety, sadness, hopelessness, sleep problems, fatigue, irritability, anger and aches.",
|
|
1542
|
+
source: "who-mental-emergencies",
|
|
1543
|
+
locator: "Prevalence",
|
|
1544
|
+
},
|
|
1545
|
+
{
|
|
1546
|
+
id: "tab.health.mind.988",
|
|
1547
|
+
use: "summary",
|
|
1548
|
+
text: "For emotional distress, call or text 988. The 988 Lifeline is free and confidential, at all hours.",
|
|
1549
|
+
source: "lifeline-988",
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
id: "tab.health.vaccines.tetanus",
|
|
1553
|
+
use: "fact",
|
|
1554
|
+
text: "An adult gets a booster dose of tetanus vaccine (Td or Tdap) each 10 years.",
|
|
1555
|
+
source: "cdc-pinkbook-tetanus",
|
|
1556
|
+
locator: "Tetanus Toxoid-containing Vaccine Schedule",
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
id: "tab.health.death.record",
|
|
1560
|
+
use: "summary",
|
|
1561
|
+
text: "Take photographs of each dead body. Write a description of its features, its clothes and its personal items.",
|
|
1562
|
+
source: "who-dead-bodies-qa",
|
|
1563
|
+
},
|
|
1564
|
+
{
|
|
1565
|
+
id: "tab.health.death.epidemic",
|
|
1566
|
+
use: "fact",
|
|
1567
|
+
text: "Dead bodies from a natural disaster usually do not cause an epidemic. The exception is a death from a highly infectious disease, for example cholera.",
|
|
1568
|
+
source: "who-dead-bodies-qa",
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
id: "tab.health.death.grief",
|
|
1572
|
+
use: "fact",
|
|
1573
|
+
text: "Grief and a traditional burial of each person are important for the bereaved. In an epidemic, a traditional burial can be a health risk.",
|
|
1574
|
+
source: "who-dead-bodies-qa",
|
|
1575
|
+
locator: "What are the potential mental health issues for the bereaved?",
|
|
1576
|
+
},
|
|
1577
|
+
{
|
|
1578
|
+
id: "tab.health.death.gloves",
|
|
1579
|
+
use: "summary",
|
|
1580
|
+
text: "Use each pair of gloves only once to touch a dead body. Wash your hands with soap after you touch the body and before you eat.",
|
|
1581
|
+
source: "who-dead-bodies-risks",
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
id: "tab.health.death.grave",
|
|
1585
|
+
use: "fact",
|
|
1586
|
+
text: "Put a grave 30 m or more from each groundwater source of drinking water. Put the floor of the grave 1.5 m or more above the water table.",
|
|
1587
|
+
source: "who-dead-bodies-risks",
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
id: "tab.health.death.surface-water",
|
|
1591
|
+
use: "fact",
|
|
1592
|
+
text: "Do not let surface water from a grave go into the places where people live.",
|
|
1593
|
+
source: "who-dead-bodies-risks",
|
|
1594
|
+
},
|
|
1595
|
+
];
|
|
1596
|
+
|
|
1452
1597
|
/** The cited units of the tabs of the binder. The units of the other tabs come in later changes. */
|
|
1453
|
-
export const TAB_UNITS: readonly CitedUnit[] = [...GO, ...FIRST_72H, ...STAY, ...HEAT, ...SECURITY, ...GROUP, ...LONG_TERM, ...WATER, ...FOOD];
|
|
1598
|
+
export const TAB_UNITS: readonly CitedUnit[] = [...GO, ...FIRST_72H, ...STAY, ...HEAT, ...SECURITY, ...GROUP, ...LONG_TERM, ...WATER, ...FOOD, ...HEALTH];
|