@mhalle/vost 0.8.1 → 0.8.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,24 +1,350 @@
1
- # vost (TypeScript)
1
+ # @mhalle/vost
2
2
 
3
- A versioned filesystem backed by a bare git repository.
3
+ A versioned filesystem backed by bare Git repositories. Store, retrieve, and version directory trees of files with text and binary data using an immutable-snapshot API. Every write produces a new commit. Old snapshots remain accessible forever.
4
4
 
5
- This is the TypeScript port of [vost](https://github.com/mhalle/vost), using [isomorphic-git](https://isomorphic-git.org/) as the git backend.
5
+ This is the TypeScript port of [vost](https://github.com/mhalle/vost), using [isomorphic-git](https://isomorphic-git.org/) as the git backend. The repositories are standard Git repos that can be manipulated with Git tools as well.
6
6
 
7
- ## Usage
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install @mhalle/vost
11
+ ```
12
+
13
+ Requires Node.js 18+ or Deno.
14
+
15
+ ## Quick start
16
+
17
+ ```typescript
18
+ import * as fs from 'node:fs';
19
+ import { GitStore } from '@mhalle/vost';
20
+
21
+ // Create (or open) a repository with a "main" branch
22
+ const store = await GitStore.open('data.git', { fs });
23
+
24
+ // Get a snapshot of the current branch ("main" by default)
25
+ let snap = await store.branches.getCurrent();
26
+
27
+ // Write a file -- returns a new immutable snapshot
28
+ snap = await snap.writeText('hello.txt', 'Hello, world!');
29
+
30
+ // Read it back
31
+ console.log(await snap.readText('hello.txt')); // 'Hello, world!'
32
+
33
+ // Every write is a commit
34
+ console.log(snap.commitHash); // full 40-char SHA
35
+ console.log(await snap.getMessage()); // '+ hello.txt'
36
+ ```
37
+
38
+ ## Core concepts
39
+
40
+ **Bare repository.** vost uses a bare Git repository with no working directory. All data lives inside Git's content-addressable object store and is accessed through the vost API.
41
+
42
+ **`GitStore`** opens or creates a bare repository. It exposes `branches`, `tags`, and `notes`.
43
+
44
+ **`FS`** is an immutable snapshot of a committed tree. Reading methods (`read`, `ls`, `walk`, `exists`) never mutate state. Writing methods (`write`, `writeText`, `remove`, `batch`) return a *new* `FS` pointing at the new commit -- the original `FS` is unchanged.
45
+
46
+ Snapshots from **branches** are writable (`fs.writable === true`). Snapshots from **tags** are read-only (`fs.writable === false`).
47
+
48
+ **All operations are async** -- every read, write, and query returns a `Promise`.
49
+
50
+ ## API
51
+
52
+ ### Opening a repository
53
+
54
+ ```typescript
55
+ import * as fs from 'node:fs';
56
+
57
+ const store = await GitStore.open('data.git', { fs }); // create or open
58
+ const store = await GitStore.open('data.git', { fs, create: false }); // open only
59
+ const store = await GitStore.open('data.git', { fs, branch: 'dev' }); // custom default branch
60
+ const store = await GitStore.open('data.git', { fs, branch: null }); // branchless
61
+ const store = await GitStore.open('data.git', { fs,
62
+ author: 'alice', email: 'alice@example.com' }); // custom author
63
+ ```
64
+
65
+ The `fs` option is required and should be Node's `node:fs` module (or a compatible implementation for Deno).
66
+
67
+ ### Branches and tags
68
+
69
+ ```typescript
70
+ let snap = await store.branches.get('main');
71
+ await store.branches.set('experiment', snap); // fork a branch
72
+ await store.branches.delete('experiment'); // delete a branch
73
+
74
+ await store.tags.set('v1.0', snap); // create a tag
75
+ const tagged = await store.tags.get('v1.0'); // read-only FS
76
+
77
+ const name = await store.branches.getCurrentName(); // 'main'
78
+ snap = await store.branches.getCurrent(); // FS for current branch
79
+ await store.branches.setCurrent('dev'); // set current branch
80
+
81
+ for await (const name of store.branches) {
82
+ console.log(name);
83
+ }
84
+ console.log(await store.branches.has('main')); // true
85
+ ```
86
+
87
+ ### Reading
88
+
89
+ ```typescript
90
+ const data = await snap.read('path/to/file.bin'); // Uint8Array
91
+ const text = await snap.readText('config.json'); // string (UTF-8)
92
+ const chunk = await snap.read('big.bin', { offset: 100, size: 50 }); // partial read
93
+ const chunk = await snap.readByHash(sha, { offset: 0, size: 1024 }); // read blob by SHA
94
+
95
+ const entries = await snap.ls(); // root listing -- string[]
96
+ const entries = await snap.ls('src'); // subdirectory listing
97
+ const details = await snap.listdir('src'); // WalkEntry[] (name, oid, mode)
98
+ const exists = await snap.exists('path/to/file.bin'); // boolean
99
+ const info = await snap.stat('path/to/file.bin'); // StatResult
100
+ const ftype = await snap.fileType('run.sh'); // FileType.EXECUTABLE
101
+ const nbytes = await snap.size('path/to/file.bin'); // number (bytes)
102
+ const sha = await snap.objectHash('path/to/file.bin'); // 40-char hex SHA
103
+ const treeHash = snap.treeHash; // root tree SHA
104
+
105
+ // Walk the tree (like os.walk)
106
+ for await (const [dirpath, dirnames, files] of snap.walk()) {
107
+ for (const entry of files) {
108
+ console.log(entry.name, entry.mode); // WalkEntry
109
+ }
110
+ }
111
+
112
+ // Glob
113
+ const matches = await snap.glob('**/*.ts'); // sorted string[]
114
+ ```
115
+
116
+ ### Writing
117
+
118
+ Every write auto-commits and returns a new snapshot:
119
+
120
+ ```typescript
121
+ import { FileType } from '@mhalle/vost';
122
+
123
+ snap = await snap.writeText('config.json', '{"key": "value"}');
124
+ snap = await snap.writeText('script.sh', '#!/bin/sh\n', { mode: FileType.EXECUTABLE });
125
+ snap = await snap.writeText('config.json', '{}', { message: 'Reset' });
126
+ snap = await snap.write('image.png', rawBytes); // Uint8Array
127
+ snap = await snap.writeFromFile('big.bin', '/data/big.bin'); // from disk
128
+ snap = await snap.writeSymlink('link', 'target'); // symlink
129
+ snap = await snap.remove('old-file.txt');
130
+
131
+ // Buffered write (commits on close)
132
+ const w = snap.writer('big.bin');
133
+ await w.write(chunk1);
134
+ await w.write(chunk2);
135
+ await w.close();
136
+ snap = w.fs;
137
+
138
+ // Text mode
139
+ const tw = snap.writer('log.txt', 'w');
140
+ await tw.write('line 1\n');
141
+ await tw.write('line 2\n');
142
+ await tw.close();
143
+ snap = tw.fs;
144
+ ```
145
+
146
+ The original `FS` is never mutated:
147
+
148
+ ```typescript
149
+ const snap1 = await store.branches.get('main');
150
+ const snap2 = await snap1.write('new.txt', new TextEncoder().encode('data'));
151
+ console.log(await snap1.exists('new.txt')); // false -- snap1 is unchanged
152
+ console.log(await snap2.exists('new.txt')); // true
153
+ ```
154
+
155
+ ### Batch writes
156
+
157
+ Multiple writes/removes in a single commit:
8
158
 
9
159
  ```typescript
10
- import { GitStore } from 'gitstore';
11
- import fs from 'node:fs';
160
+ const batch = snap.batch({ message: 'Import dataset v2' });
161
+ await batch.write('a.txt', new TextEncoder().encode('alpha'));
162
+ await batch.writeFromFile('big.bin', '/data/big.bin');
163
+ await batch.writeSymlink('link.txt', 'a.txt');
164
+ await batch.remove('old.txt');
165
+ snap = await batch.commit(); // single atomic commit
166
+ ```
167
+
168
+ ### Atomic apply
12
169
 
13
- const store = new GitStore('my-repo.git', { create: true, fs });
170
+ Apply multiple writes and removes in a single commit without a batch:
14
171
 
15
- const branch = store.branches.get('main');
16
- await branch.write('hello.txt', 'world');
172
+ ```typescript
173
+ import { WriteEntry } from '@mhalle/vost';
174
+
175
+ snap = await snap.apply(
176
+ {
177
+ 'config.json': new TextEncoder().encode('{"v": 2}'),
178
+ 'script.sh': { data: new TextEncoder().encode('#!/bin/sh\n'), mode: FileType.EXECUTABLE },
179
+ 'link': { target: 'config.json' }, // symlink
180
+ },
181
+ ['old.txt', 'deprecated/'], // removes
182
+ { message: 'Update config and clean up' },
183
+ );
184
+ ```
185
+
186
+ ### History
187
+
188
+ ```typescript
189
+ const parent = await snap.parent(); // FS or null
190
+ const ancestor = await snap.back(3); // 3 commits back
191
+
192
+ for await (const entry of snap.log()) { // full commit log
193
+ console.log(entry.commitHash, await entry.getMessage());
194
+ }
195
+
196
+ for await (const entry of snap.log({ path: 'config.json' })) { // file history
197
+ console.log(entry.commitHash, await entry.getMessage());
198
+ }
199
+
200
+ snap = await snap.undo(); // move branch back 1 commit
201
+ snap = await snap.redo(); // move branch forward 1 reflog step
202
+
203
+ // Reflog
204
+ const entries = await store.branches.reflog('main');
205
+ for (const entry of entries) {
206
+ console.log(entry.oldSha, entry.newSha, entry.message);
207
+ }
208
+ ```
209
+
210
+ ### Copy and sync
211
+
212
+ ```typescript
213
+ // Disk to repo
214
+ snap = await snap.copyIn(['./data/'], 'backup');
215
+ console.log(snap.changes.add); // FileEntry[]
216
+
217
+ // Repo to disk
218
+ await snap.copyOut(['docs'], './local-docs');
219
+
220
+ // Copy between branches (atomic, no disk I/O)
221
+ let main = await store.branches.get('main');
222
+ let dev = await store.branches.get('dev');
223
+ dev = await dev.copyFromRef(main, ['config'], 'imported');
224
+
225
+ // Sync (make identical, including deletes)
226
+ snap = await snap.syncIn('./local', 'data');
227
+ await snap.syncOut('data', './local');
228
+
229
+ // Remove and move within repo
230
+ snap = await snap.remove(['old-dir'], { recursive: true });
231
+ snap = await snap.move(['old.txt'], 'new.txt');
232
+ ```
233
+
234
+ ### Snapshot properties
235
+
236
+ ```typescript
237
+ snap.commitHash // string -- full 40-char commit SHA
238
+ snap.refName // string | null -- branch or tag name
239
+ snap.writable // boolean -- true for branches, false for tags
240
+ snap.treeHash // string -- root tree SHA
241
+ snap.changes // ChangeReport | null
242
+
243
+ // Async properties (require commit object read)
244
+ await snap.getMessage() // string -- commit message
245
+ await snap.getTime() // Date -- commit timestamp
246
+ await snap.getAuthorName() // string
247
+ await snap.getAuthorEmail() // string
248
+ await snap.getCommitInfo() // { message, time, authorName, authorEmail }
249
+ ```
250
+
251
+ ### Git notes
252
+
253
+ Attach metadata to commits without modifying history. Notes can be addressed by commit hash or ref name (branch/tag):
254
+
255
+ ```typescript
256
+ // Default namespace (refs/notes/commits)
257
+ const ns = store.notes.commits;
258
+
259
+ // By commit hash
260
+ await ns.set(snap.commitHash, 'reviewed by Alice');
261
+ console.log(await ns.get(snap.commitHash)); // 'reviewed by Alice'
262
+
263
+ // By branch or tag name (resolves to tip commit)
264
+ await ns.set('main', 'deployed to staging');
265
+ console.log(await ns.get('main')); // 'deployed to staging'
266
+
267
+ await ns.delete(snap.commitHash);
268
+
269
+ // Custom namespaces
270
+ const reviews = store.notes.namespace('reviews');
271
+ await reviews.set('main', 'LGTM');
272
+
273
+ // Batch writes (single commit)
274
+ const batch = ns.batch();
275
+ await batch.set('main', 'note for main');
276
+ await batch.set('dev', 'note for dev');
277
+ await batch.commit();
278
+
279
+ // Iteration
280
+ for (const hash of await ns.list()) {
281
+ console.log(hash, await ns.get(hash));
282
+ }
283
+ ```
284
+
285
+ ### Backup and restore
286
+
287
+ ```typescript
288
+ const diff = await store.backup('https://github.com/user/repo.git'); // MirrorDiff
289
+ const diff = await store.restore('https://github.com/user/repo.git'); // MirrorDiff
290
+ const diff = await store.backup(url, { dryRun: true }); // preview only
291
+ ```
292
+
293
+ ## Concurrency safety
294
+
295
+ vost uses an advisory file lock (`vost.lock`) to make the stale-snapshot check and ref update atomic. If a branch advances after you obtain a snapshot, writing from the stale snapshot throws `StaleSnapshotError`:
296
+
297
+ ```typescript
298
+ import { StaleSnapshotError, retryWrite } from '@mhalle/vost';
299
+
300
+ let snap = await store.branches.get('main');
301
+ await snap.write('a.txt', new TextEncoder().encode('a')); // advances the branch
302
+
303
+ try {
304
+ await snap.write('b.txt', new TextEncoder().encode('b')); // snap is now stale
305
+ } catch (e) {
306
+ if (e instanceof StaleSnapshotError) {
307
+ snap = await store.branches.get('main'); // re-fetch and retry
308
+ }
309
+ }
310
+
311
+ // Or use retryWrite for automatic retry with backoff
312
+ snap = await retryWrite(store, 'main', 'file.txt', data);
313
+ ```
314
+
315
+ ## Error handling
316
+
317
+ | Exception | When |
318
+ |-----------|------|
319
+ | `FileNotFoundError` | `read`/`remove` on a missing path; `writeFromFile` with a missing local file |
320
+ | `IsADirectoryError` | `read` on a directory path |
321
+ | `NotADirectoryError` | `ls`/`walk` on a file path |
322
+ | `PermissionError` | Writing to a tag snapshot |
323
+ | `KeyNotFoundError` | Accessing a missing branch/tag |
324
+ | `KeyExistsError` | Overwriting an existing tag |
325
+ | `InvalidRefNameError` | Invalid characters in branch/tag name |
326
+ | `InvalidPathError` | Invalid path (`..`, empty segments) |
327
+ | `BatchClosedError` | Writing to a batch after `commit()` |
328
+ | `StaleSnapshotError` | Writing from a snapshot whose branch has moved forward |
329
+
330
+ All errors extend `GitStoreError`.
331
+
332
+ ## Documentation
333
+
334
+ - [API Reference](https://github.com/mhalle/vost/blob/master/ts/docs/api.md) -- classes, methods, and types
335
+ - [Python version](https://github.com/mhalle/vost) -- the reference implementation with CLI
336
+
337
+ ## Deno support
338
+
339
+ vost works under Deno using its Node.js compatibility layer:
340
+
341
+ ```typescript
342
+ import * as fs from 'node:fs';
343
+ import { GitStore } from 'npm:@mhalle/vost';
17
344
 
18
- const content = await branch.readText('hello.txt');
19
- console.log(content); // "world"
345
+ const store = await GitStore.open('/tmp/repo.git', { fs });
20
346
  ```
21
347
 
22
348
  ## License
23
349
 
24
- Apache-2.0 see [LICENSE](../LICENSE) for details.
350
+ Apache-2.0 -- see [LICENSE](../LICENSE) for details.
package/dist/notes.d.ts CHANGED
@@ -18,6 +18,18 @@ export declare class NoteNamespace {
18
18
  /** @internal */ _namespace: string;
19
19
  /** @internal */ _ref: string;
20
20
  constructor(store: GitStore, namespace: string);
21
+ /**
22
+ * Resolve a target string to a 40-char hex commit hash.
23
+ *
24
+ * If `target` is already a 40-char hex hash, return it as-is.
25
+ * Otherwise try to resolve it as a branch name, then as a tag name.
26
+ *
27
+ * @param target - A commit hash, branch name, or tag name.
28
+ * @returns The resolved 40-char hex commit hash.
29
+ * @throws {GitStoreError} If the target cannot be resolved.
30
+ * @internal
31
+ */
32
+ _resolveTarget(target: string): Promise<string>;
21
33
  toString(): string;
22
34
  private get _fs();
23
35
  private get _gitdir();
@@ -35,33 +47,33 @@ export declare class NoteNamespace {
35
47
  /** @internal Commit a new tree to the notes ref under repo lock. */
36
48
  _commitNoteTree(newTreeOid: string, message: string): Promise<void>;
37
49
  /**
38
- * Get the note text for a commit hash.
50
+ * Get the note text for a commit hash or ref name (branch/tag).
39
51
  *
40
- * @param hash - 40-char lowercase hex commit hash.
52
+ * @param hash - 40-char lowercase hex commit hash, or a branch/tag name.
41
53
  * @returns The note text (UTF-8).
42
54
  * @throws {GitStoreError} If no note exists for the hash.
43
55
  */
44
56
  get(hash: string): Promise<string>;
45
57
  /**
46
- * Set or overwrite the note text for a commit hash.
58
+ * Set or overwrite the note text for a commit hash or ref name (branch/tag).
47
59
  *
48
60
  * Creates a commit on the namespace's notes ref.
49
61
  *
50
- * @param hash - 40-char lowercase hex commit hash.
62
+ * @param hash - 40-char lowercase hex commit hash, or a branch/tag name.
51
63
  * @param text - Note text (UTF-8 string).
52
64
  */
53
65
  set(hash: string, text: string): Promise<void>;
54
66
  /**
55
- * Delete the note for a commit hash.
67
+ * Delete the note for a commit hash or ref name (branch/tag).
56
68
  *
57
- * @param hash - 40-char lowercase hex commit hash.
69
+ * @param hash - 40-char lowercase hex commit hash, or a branch/tag name.
58
70
  * @throws {GitStoreError} If no note exists for the hash.
59
71
  */
60
72
  delete(hash: string): Promise<void>;
61
73
  /**
62
- * Check if a note exists for a commit hash.
74
+ * Check if a note exists for a commit hash or ref name (branch/tag).
63
75
  *
64
- * @param hash - 40-char lowercase hex commit hash.
76
+ * @param hash - 40-char lowercase hex commit hash, or a branch/tag name.
65
77
  * @returns True if a note exists.
66
78
  */
67
79
  has(hash: string): Promise<boolean>;
@@ -109,16 +121,16 @@ export declare class NotesBatch {
109
121
  /**
110
122
  * Stage a note write.
111
123
  *
112
- * @param hash - 40-char lowercase hex commit hash.
124
+ * @param hash - 40-char lowercase hex commit hash, or a branch/tag name.
113
125
  * @param text - Note text (UTF-8 string).
114
126
  */
115
127
  set(hash: string, text: string): Promise<void>;
116
128
  /**
117
129
  * Stage a note deletion.
118
130
  *
119
- * @param hash - 40-char lowercase hex commit hash.
131
+ * @param hash - 40-char lowercase hex commit hash, or a branch/tag name.
120
132
  */
121
- delete(hash: string): void;
133
+ delete(hash: string): Promise<void>;
122
134
  /**
123
135
  * Commit all staged writes and deletes in a single commit.
124
136
  *
package/dist/notes.js CHANGED
@@ -33,6 +33,37 @@ export class NoteNamespace {
33
33
  this._namespace = namespace;
34
34
  this._ref = `refs/notes/${namespace}`;
35
35
  }
36
+ /**
37
+ * Resolve a target string to a 40-char hex commit hash.
38
+ *
39
+ * If `target` is already a 40-char hex hash, return it as-is.
40
+ * Otherwise try to resolve it as a branch name, then as a tag name.
41
+ *
42
+ * @param target - A commit hash, branch name, or tag name.
43
+ * @returns The resolved 40-char hex commit hash.
44
+ * @throws {GitStoreError} If the target cannot be resolved.
45
+ * @internal
46
+ */
47
+ async _resolveTarget(target) {
48
+ if (HEX40_RE.test(target)) {
49
+ return target;
50
+ }
51
+ try {
52
+ const fs = await this._store.branches.get(target);
53
+ return fs.commitHash;
54
+ }
55
+ catch {
56
+ // not a branch — try tag
57
+ }
58
+ try {
59
+ const fs = await this._store.tags.get(target);
60
+ return fs.commitHash;
61
+ }
62
+ catch {
63
+ // not a tag either
64
+ }
65
+ throw new GitStoreError(`Cannot resolve '${target}': not a commit hash, branch, or tag`);
66
+ }
36
67
  toString() {
37
68
  return `NoteNamespace('${this._namespace}')`;
38
69
  }
@@ -290,19 +321,19 @@ export class NoteNamespace {
290
321
  }
291
322
  // -- public API --------------------------------------------------------
292
323
  /**
293
- * Get the note text for a commit hash.
324
+ * Get the note text for a commit hash or ref name (branch/tag).
294
325
  *
295
- * @param hash - 40-char lowercase hex commit hash.
326
+ * @param hash - 40-char lowercase hex commit hash, or a branch/tag name.
296
327
  * @returns The note text (UTF-8).
297
328
  * @throws {GitStoreError} If no note exists for the hash.
298
329
  */
299
330
  async get(hash) {
300
- validateHash(hash);
331
+ const h = await this._resolveTarget(hash);
301
332
  const treeOid = await this._treeOid();
302
333
  if (treeOid === null) {
303
334
  throw new KeyNotFoundError(`key not found: ${hash}`);
304
335
  }
305
- const blobOid = await this._findNoteInTree(treeOid, hash);
336
+ const blobOid = await this._findNoteInTree(treeOid, h);
306
337
  if (blobOid === null) {
307
338
  throw new KeyNotFoundError(`key not found: ${hash}`);
308
339
  }
@@ -314,50 +345,50 @@ export class NoteNamespace {
314
345
  return new TextDecoder().decode(blob);
315
346
  }
316
347
  /**
317
- * Set or overwrite the note text for a commit hash.
348
+ * Set or overwrite the note text for a commit hash or ref name (branch/tag).
318
349
  *
319
350
  * Creates a commit on the namespace's notes ref.
320
351
  *
321
- * @param hash - 40-char lowercase hex commit hash.
352
+ * @param hash - 40-char lowercase hex commit hash, or a branch/tag name.
322
353
  * @param text - Note text (UTF-8 string).
323
354
  */
324
355
  async set(hash, text) {
325
- validateHash(hash);
356
+ const h = await this._resolveTarget(hash);
326
357
  const writes = new Map();
327
- writes.set(hash, text);
358
+ writes.set(h, text);
328
359
  const treeOid = await this._treeOid();
329
360
  const newTreeOid = await this._buildNoteTree(treeOid, writes, new Set());
330
- await this._commitNoteTree(newTreeOid, `Notes added by 'git notes' on ${hash.slice(0, 7)}`);
361
+ await this._commitNoteTree(newTreeOid, `Notes added by 'git notes' on ${h.slice(0, 7)}`);
331
362
  }
332
363
  /**
333
- * Delete the note for a commit hash.
364
+ * Delete the note for a commit hash or ref name (branch/tag).
334
365
  *
335
- * @param hash - 40-char lowercase hex commit hash.
366
+ * @param hash - 40-char lowercase hex commit hash, or a branch/tag name.
336
367
  * @throws {GitStoreError} If no note exists for the hash.
337
368
  */
338
369
  async delete(hash) {
339
- validateHash(hash);
370
+ const h = await this._resolveTarget(hash);
340
371
  const treeOid = await this._treeOid();
341
372
  if (treeOid === null) {
342
373
  throw new KeyNotFoundError(`key not found: ${hash}`);
343
374
  }
344
375
  const deletes = new Set();
345
- deletes.add(hash);
376
+ deletes.add(h);
346
377
  const newTreeOid = await this._buildNoteTree(treeOid, new Map(), deletes);
347
- await this._commitNoteTree(newTreeOid, `Notes removed by 'git notes' on ${hash.slice(0, 7)}`);
378
+ await this._commitNoteTree(newTreeOid, `Notes removed by 'git notes' on ${h.slice(0, 7)}`);
348
379
  }
349
380
  /**
350
- * Check if a note exists for a commit hash.
381
+ * Check if a note exists for a commit hash or ref name (branch/tag).
351
382
  *
352
- * @param hash - 40-char lowercase hex commit hash.
383
+ * @param hash - 40-char lowercase hex commit hash, or a branch/tag name.
353
384
  * @returns True if a note exists.
354
385
  */
355
386
  async has(hash) {
356
- validateHash(hash);
387
+ const h = await this._resolveTarget(hash);
357
388
  const treeOid = await this._treeOid();
358
389
  if (treeOid === null)
359
390
  return false;
360
- return (await this._findNoteInTree(treeOid, hash)) !== null;
391
+ return (await this._findNoteInTree(treeOid, h)) !== null;
361
392
  }
362
393
  /**
363
394
  * List all commit hashes that have notes in this namespace.
@@ -434,27 +465,27 @@ export class NotesBatch {
434
465
  /**
435
466
  * Stage a note write.
436
467
  *
437
- * @param hash - 40-char lowercase hex commit hash.
468
+ * @param hash - 40-char lowercase hex commit hash, or a branch/tag name.
438
469
  * @param text - Note text (UTF-8 string).
439
470
  */
440
471
  async set(hash, text) {
441
472
  if (this._closed)
442
473
  throw new BatchClosedError('Batch is closed');
443
- validateHash(hash);
444
- this._deletes.delete(hash);
445
- this._writes.set(hash, text);
474
+ const h = await this._ns._resolveTarget(hash);
475
+ this._deletes.delete(h);
476
+ this._writes.set(h, text);
446
477
  }
447
478
  /**
448
479
  * Stage a note deletion.
449
480
  *
450
- * @param hash - 40-char lowercase hex commit hash.
481
+ * @param hash - 40-char lowercase hex commit hash, or a branch/tag name.
451
482
  */
452
- delete(hash) {
483
+ async delete(hash) {
453
484
  if (this._closed)
454
485
  throw new BatchClosedError('Batch is closed');
455
- validateHash(hash);
456
- this._writes.delete(hash);
457
- this._deletes.add(hash);
486
+ const h = await this._ns._resolveTarget(hash);
487
+ this._writes.delete(h);
488
+ this._deletes.add(h);
458
489
  }
459
490
  /**
460
491
  * Commit all staged writes and deletes in a single commit.
package/dist/notes.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"notes.js","sourceRoot":"","sources":["../src/notes.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,GAAG,MAAM,gBAAgB,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,EAAiB,MAAM,YAAY,CAAC;AAC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IAEzB,YAAY,KAAe;QACzB,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,QAAQ;QACN,OAAO,YAAY,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,CAAC;IAC/C,CAAC;IAED,kDAAkD;IAClD,IAAI,OAAO;QACT,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACnD,CAAC;IAED;;;;;OAKG;IACH,SAAS,CAAC,IAAY;QACpB,OAAO,IAAI,aAAa,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAC9C,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mhalle/vost",
3
- "version": "0.8.1",
3
+ "version": "0.8.2",
4
4
  "description": "A versioned filesystem backed by a bare git repository",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",