Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Update readme examples #87

Merged
merged 4 commits into from
Oct 29, 2024
Merged

fix: Update readme examples #87

merged 4 commits into from
Oct 29, 2024

Conversation

tmathern
Copy link
Contributor

Follow-up of #86

Update readme examples

@tmathern tmathern self-assigned this Oct 29, 2024
Copy link

changeset-bot bot commented Oct 29, 2024

⚠️ No Changeset found

Latest commit: 5266861

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

// define a location where to place the signed asset
const outputPath = resolve('signed.jpg');

// create a signing function
async function sign(asset, manifest) {
Copy link
Contributor Author

@tmathern tmathern Oct 29, 2024

Choose a reason for hiding this comment

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

asset/output path moved out since they'll be passed in as params to the sign function

// asset mimetype must match the asset type ebing read
const asset: Asset = { buffer, mimeType: 'image/jpeg' };

// create a signing function
async function sign(asset, manifest) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

asset/buffer moved out since they'll be passed in as params to the sign function

{ vendor: 'cai' },
);

// create a signing function
async function sign(asset, manifest) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

asset/buffer moved out since they'll be passed in as params to the sign function

@@ -275,7 +312,37 @@ async function sign(asset, manifest) {
});
}

sign(asset, manifest);
// build a manifest to use for signing
const manifest = new ManifestBuilder(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A bit repetitive, but it makes the examples copy-pastable to have the manifest buildet here too

@@ -317,7 +389,37 @@ async function sign(asset, manifest) {
});
}

sign(asset, manifest);
// build a manifest to use for signing
const manifest = new ManifestBuilder(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

A bit repetitive, but it makes the examples copy-pastable to have the manifest buildet here too

@tmathern tmathern requested a review from crandmck October 29, 2024 02:58
Copy link
Contributor

@crandmck crandmck left a comment

Choose a reason for hiding this comment

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

One small punctuation correction, otherwise LGTM.

README.md Outdated Show resolved Hide resolved
@tmathern tmathern changed the title Update readme examples fix: Update readme examples Oct 29, 2024
@tmathern tmathern merged commit c3d08b4 into main Oct 29, 2024
4 checks passed
@tmathern tmathern deleted the mathern/readme branch October 29, 2024 16:43
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