docs: add docs on adding ingredient from archive#54
Conversation
ale-adobe
left a comment
There was a problem hiding this comment.
LGTM, with some minor suggestions and a quick question.
README.md
Outdated
| const activeLabel = manifestStore.active_manifest; | ||
| const activeManifest = manifestStore.manifests[activeLabel]; |
There was a problem hiding this comment.
Are these variables swapped?
There was a problem hiding this comment.
I should use a different method entirely.
|
|
||
| // Sign the manifest | ||
| const signer = LocalSigner.newSigner(cert, key, 'es256'); | ||
| builder.sign(signer, inputAsset, outputAsset); |
There was a problem hiding this comment.
I think this might be missing an await just to make it more clear that it's async.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Yes. The problem with Blob is that it isn't supported in older versions of Node. We can probably add it now.
No description provided.