feat(npm): packument GET cache-hit serve (S11 Step 11 part 2/4)

📦 Summary

Part 2 of 4 of the npm hosted packument GET handler (S11 Step 11). Builds on part 1 (core serve) to add the cache-hit path:

  • npm_metadata_files cache lookup in ServeHTTP, dispatching to a cache-hit branch when a fresh row exists
  • serveCacheHit streaming the pre-rendered blob via BlobStore.OpenBlob
  • Strong ETag derived from the cache row's stored blob_sha256
  • sha256SumFromBytes helper

Constructor grows to take the cache and blobs (BlobStore) dependencies.

🧪 Tests

Unit: inline-build performs no blob open, cache-hit serves via OpenBlob, no synthesized latest. Integration: inline-build after publish.

🗂️ Stack

Part 2/4, targets 10io/npm-hosted-step11-part1of4 (part 1/4). Part 3 stacks on this.

Related to #129 (closed)

Edited by David Fernandez

Merge request reports

Loading
Loading