Skip to content

Commit 9143c6f

Browse files
coryodanielclaude
andcommitted
Pass parsed manifest map to storage adapter
User prompts: - "pass the parsed map to store_manifest so they dont have to reparse" Changes: - Storage adapter callback accepts both manifest (map) and raw_manifest (binary) - Registry passes both through to the adapter - Local adapter receives parsed map for future use, writes raw bytes to disk Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 7a73bec commit 9143c6f

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

lib/oci/registry.ex

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -239,6 +239,7 @@ defmodule OCI.Registry do
239239
storage,
240240
repo,
241241
reference,
242+
manifest,
242243
raw_manifest,
243244
manifest_digest,
244245
ctx

lib/oci/storage/adapter.ex

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,8 @@ defmodule OCI.Storage.Adapter do
204204
storage :: t(),
205205
repo :: Registry.repo_t(),
206206
reference :: Registry.reference_t(),
207-
manifest :: binary(),
207+
manifest :: map(),
208+
raw_manifest :: binary(),
208209
manifest_digest :: Registry.digest_t(),
209210
ctx :: OCI.Context.t()
210211
) ::

lib/oci/storage/local.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,9 +257,9 @@ defmodule OCI.Storage.Local do
257257
end
258258

259259
@impl true
260-
def store_manifest(storage, repo, reference, manifest, manifest_digest, _ctx) do
260+
def store_manifest(storage, repo, reference, _manifest, raw_manifest, manifest_digest, _ctx) do
261261
:ok = File.mkdir_p!(manifests_dir(storage, repo))
262-
File.write!(digest_path(storage, repo, manifest_digest), manifest)
262+
File.write!(digest_path(storage, repo, manifest_digest), raw_manifest)
263263

264264
# If reference is a tag, create a tag reference
265265
if !String.starts_with?(reference, "sha256:") do

0 commit comments

Comments
 (0)