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:
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user