also looking at this
fix: hydrate durable registry snapshots before serving writes
#244
11 files
+202
-35
| @@ -7,6 +7,7 @@ | ||
| 7 | 7 | * used to hold), and that a missing snapshot starts empty rather than throwing. |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | import { S3RequestError } from './storage/aws-client' | |
| 10 | 11 | import type { CommitPublish, PackageMetadata } from './types' |
| 11 | 12 | import { describe, expect, it } from 'bun:test' |
| 12 | 13 | import { ObjectMetadataStorage } from './storage/object-metadata' |
| @@ -18,7 +19,7 @@ function mockBucket() { | ||
| 18 | 19 | async getObjectBuffer(_bucket: string, key: string): Promise<Buffer> { |
| 19 | 20 | const v = store.get(key) |
| 20 | 21 | if (!v) |
| 21 | throw new Error('S3 GET failed: 404 Not Found') | |
| 22 | throw new S3RequestError('GET', 404, 'NoSuchKey') | |
| 22 | 23 | return v |
| 23 | 24 | }, |
| 24 | 25 | async putObject(o: { bucket: string, key: string, body: Buffer | string }): Promise<void> { |