| … | … | @@ -106,6 +106,27 @@ export class FileIndex extends ReadyResource { |
| 106 | 106 | return files |
| 107 | 107 | } |
| 108 | 108 | |
| 109 | // ── Server index metadata ─────────────────────────────────── | |
| 110 | ||
| 111 | /** | |
| 112 | * Store a small index-metadata value (e.g. the scan-schema version that | |
| 113 | * gates the fast manifest-diff boot path). Keyed under `meta:`. | |
| 114 | * @param {string} key | |
| 115 | * @param {any} value - JSON-encodable | |
| 116 | */ | |
| 117 | async putIndexMeta (key, value) { | |
| 118 | await this._bee.put(`meta:${key}`, value) | |
| 119 | } | |
| 120 | ||
| 121 | /** | |
| 122 | * @param {string} key | |
| 123 | * @returns {any|null} | |
| 124 | */ | |
| 125 | async getIndexMeta (key) { | |
| 126 | const entry = await this._bee.get(`meta:${key}`) | |
| 127 | return entry ? entry.value : null | |
| 128 | } | |
| 129 | ||
| 109 | 130 | // ── Chunk maps ────────────────────────────────────────────── |
| 110 | 131 | |
| 111 | 132 | /** |
| … | … | @@ -1,6 +1,6 @@ |
| 1 | 1 | { |
| 2 | 2 | "name": "hyper-overlay", |
| 3 | "version": "0.2.13", | |
| 3 | "version": "0.2.14", | |
| 4 | 4 | "description": "Content-addressed union filesystem — P2P file distribution with FastCDC chunking and zero duplication", |
| 5 | 5 | "type": "module", |
| 6 | 6 | "main": "index.js", |