OverviewFilesCommitsIssuesDocsReleasesPeers

hyper-overlay commits / c39a099

file-index: add putIndexMeta/getIndexMeta (0.2.14)
Small additive kv (meta: prefix) for callers to persist index-level state. hyper-deploy uses it to stamp the scan-schema version that gates its fast manifest-diff boot path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
c39a0999b40328deb9a8ad6571e84e6d4b4cdc34
by plankatron <fleeky@gmail.com> · 2026-07-02T16:55:11.000Z

Changed files (2) +22 -1

lib/file-index.js +21 -0
……@@ -106,6 +106,27 @@ export class FileIndex extends ReadyResource {
106106 return files
107107 }
108108
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
109130 // ── Chunk maps ──────────────────────────────────────────────
110131
111132 /**
package.json +1 -1
……@@ -1,6 +1,6 @@
11{
22 "name": "hyper-overlay",
3 "version": "0.2.13",
3 "version": "0.2.14",
44 "description": "Content-addressed union filesystem — P2P file distribution with FastCDC chunking and zero duplication",
55 "type": "module",
66 "main": "index.js",