feat(snapshot): modul-skelett
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c391df0d55
commit
b6366ea1fe
|
|
@ -0,0 +1,2 @@
|
||||||
|
output/
|
||||||
|
.last-snapshot.json
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
# snapshot/
|
||||||
|
|
||||||
|
Liest die `kind:30023`-Events des Site-Autors von den Read-Relays und
|
||||||
|
schreibt sie als JSON-Artefakte für den SvelteKit-Prerender-Schritt.
|
||||||
|
Kein Live-Proxy: Relays werden nur zur Build-Zeit befragt.
|
||||||
|
|
||||||
|
Spec: [`../docs/superpowers/specs/2026-04-21-prerender-snapshot-design.md`](../docs/superpowers/specs/2026-04-21-prerender-snapshot-design.md)
|
||||||
|
|
||||||
|
## Nutzung
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd snapshot
|
||||||
|
deno task snapshot # default
|
||||||
|
deno task snapshot --out ./output # alternatives Ziel
|
||||||
|
deno task snapshot --min-events 20 # Schwelle
|
||||||
|
deno task snapshot --allow-shrink # Drop-Check aus
|
||||||
|
```
|
||||||
|
|
||||||
|
Erwartet diese Env-Vars (aus `../.env.local`):
|
||||||
|
|
||||||
|
- `AUTHOR_PUBKEY_HEX` (64 hex chars)
|
||||||
|
- `BOOTSTRAP_RELAY` (wss-URL)
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
"tasks": {
|
||||||
|
"snapshot": "deno run --env-file=../.env.local --allow-env --allow-read --allow-write --allow-net src/cli.ts",
|
||||||
|
"test": "deno test --allow-env --allow-read --allow-write --allow-net",
|
||||||
|
"fmt": "deno fmt",
|
||||||
|
"lint": "deno lint"
|
||||||
|
},
|
||||||
|
"imports": {
|
||||||
|
"@std/yaml": "jsr:@std/yaml@^1.0.5",
|
||||||
|
"@std/cli": "jsr:@std/cli@^1.0.6",
|
||||||
|
"@std/fs": "jsr:@std/fs@^1.0.4",
|
||||||
|
"@std/path": "jsr:@std/path@^1.0.6",
|
||||||
|
"@std/testing": "jsr:@std/testing@^1.0.3",
|
||||||
|
"@std/assert": "jsr:@std/assert@^1.0.6",
|
||||||
|
"@std/encoding": "jsr:@std/encoding@^1.0.5",
|
||||||
|
"nostr-tools": "npm:nostr-tools@^2.10.4",
|
||||||
|
"applesauce-relay": "npm:applesauce-relay@^2.0.0",
|
||||||
|
"rxjs": "npm:rxjs@^7.8.1"
|
||||||
|
},
|
||||||
|
"fmt": {
|
||||||
|
"lineWidth": 100,
|
||||||
|
"indentWidth": 2,
|
||||||
|
"semiColons": false,
|
||||||
|
"singleQuote": true
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"rules": {
|
||||||
|
"tags": ["recommended"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue