Add encrypted build and save flow

build.js seals a JSON document into the single-file HTML (passphrase from
a hidden prompt or FW_PASSPHRASE, 12 character minimum). In the page,
Save writes via the File System Access API when available and downloads
otherwise; Backup copy downloads final-wishes-YYYYMMDD.html; Ctrl+S and
Change passphrase are supported. Build and Save share assemble() in
template.js, replacing src/index.html. Tests confirm the built file
holds no plaintext and that the payload round-trips.

Closes #6

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-09 08:17:20 -05:00
parent e291ee75b6
commit fec23c3e80
8 changed files with 293 additions and 32 deletions

View File

@@ -6,7 +6,10 @@
"type": "module",
"scripts": {
"build": "node build.js",
"test": "node --test"
"test": "node --test",
"seal": "node build.js --data data/seed.json"
},
"engines": { "node": ">=20" }
"engines": {
"node": ">=20"
}
}