Skip to content

docs: add docs on adding ingredient from archive#54

Merged
cdmurph32 merged 2 commits intomainfrom
ingredient_docs
Mar 19, 2026
Merged

docs: add docs on adding ingredient from archive#54
cdmurph32 merged 2 commits intomainfrom
ingredient_docs

Conversation

@cdmurph32
Copy link
Collaborator

No description provided.

Copy link
Contributor

@ale-adobe ale-adobe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, with some minor suggestions and a quick question.

README.md Outdated
Comment on lines +268 to +269
const activeLabel = manifestStore.active_manifest;
const activeManifest = manifestStore.manifests[activeLabel];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these variables swapped?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should use a different method entirely.


// Sign the manifest
const signer = LocalSigner.newSigner(cert, key, 'es256');
builder.sign(signer, inputAsset, outputAsset);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this might be missing an await just to make it more clear that it's async.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The LocalSigner is synchronous.

- **Builder archives** (working store archives): Serialized snapshots of a `Builder`, created by `builder.toArchive()`. They can contain multiple ingredients.
- **Ingredient archives**: Contain exactly one ingredient from a source asset. They carry the provenance history for reuse in other manifests.

##### Reading an archive and adding its ingredients
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So it seems like there's to analogous way to add an ingredient from Blob like in the JS SDK with addIngredientFromBlob. 🤔 Is that right?

If so, that feels like something we should definitely revisit when we look into refactoring and cleaning up these two SDKs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. The problem with Blob is that it isn't supported in older versions of Node. We can probably add it now.

@cdmurph32 cdmurph32 merged commit 18cc82a into main Mar 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants