-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore(iss-1)!: version 2.0.0 overhaul #2
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AJCJ1
changed the title
Migration of .io to .com
WIP Migration of .io to .com + sync/async/webhook methods
Oct 16, 2024
AJCJ1
changed the title
WIP Migration of .io to .com + sync/async/webhook methods
Migration of .io to .com + sync/async/webhook methods
Oct 18, 2024
AJCJ1
changed the title
Migration of .io to .com + sync/async/webhook methods
WIP - Migration of .io to .com + sync/async/webhook methods
Oct 18, 2024
AJCJ1
changed the title
WIP - Migration of .io to .com + sync/async/webhook methods
Migration of .io to .com + sync/async/webhook methods
Oct 22, 2024
AJCJ1
changed the title
Migration of .io to .com + sync/async/webhook methods
WIP - Migration of .io to .com + sync/async/webhook methods
Dec 3, 2024
fix(repo): clarify code comments feat(repo): add docbblocks to methods
…ponse types and custom deserializer
…ss and failure cases fix(repo): fix blockUrls to be arr
refactor(repo): update urlboxoptions types refactor(repo): split classes into their own files
…er method refactor(repo): make global usings and organise resources and policies into dirs
…test refactor(readme): update readme with new usage examples including new methods refactor(repo): update readme with static fromcredentials example, fix test warnings
refactor(repo): move urlboxoptions tests to own file
… resource tests and test for deserializer in render()
chore(repo): remove unused imports add test to urlboxoptions fix(repo): seal urlbox class make urlbox values readonly private, remove unused webhookSecret which only gets consumed in UrlboxWebhookValidator Implement getUrlboxErrorMessage, which extracts from err message in headers chore(tests): cleanup tests chore(repo): place classes into file namespaces refactor(repo): implement abstract urlbox response
chore(repo): capitalise verifywebhooksignature method chore(repo): reorder methods into categories with public/private
… for singleton/request/transient
…please-test chore(release-please-test): release 1.2.0
…please-test chore(release-please-test): release 1.3.0
…please-test chore(release-please-test): release 1.4.0
…please-test chore(release-please-test): release 1.5.0
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
AJCJ1
changed the title
WIP - Migration of .io to .com + sync/async/webhook methods
chore(iss-1)!: version 2.0.0 overhaul
Jan 22, 2025
…dd in nuget pub step
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a major overhaul of the SDK as it stands, and intends to serve as an example for the other Urlbox SDK's going forward.
The changes made in this PR are as follows:
Updates dotnet package from 2.0 to 6.0
The package has been update to target dotnet 6.0. This is to support the various security, performance, and language enhancements to c# and .NET. It has not been updated to 8.0 due to the current LTS for 6.0. It is presumed that a large number of users may not have upgraded their .NET projects to 8.0 just yet.
Refactors components to be typed class
The Urlbox options are now a class, with typed properties based on the Urlbox documentation. With this, any metadata, errors, exceptions, and general responses have also been turned into convenient types.
The options class has also been given a builder as a fluent interface for users to call.
Implements new methods:
A number of helper methods like
TakePdf
andTakeScreenshotWithMetadata
have been implemented for common use cases.Additionally, the sync and async strategies for rendering a screenshot have had methods written, where any common use case method will use async with polling by default.
All methods that already existed should be backward compatible, now requiring the UrlboxOptions argument, but with overloads which accept the same IDictionary arguments as in v1.0.
Methods for generating different kinds of render links have been added.
Methods for verifying webhook signatures, and getting the status of a render have been addded.
Enums
A number of enums have been added, which simplify the experience for a user.
Implementation of quicktype
Quicktype has been written into a branch of the Urlbox repo in order to create the UrlboxOptions class based on our zod schema. It has also been automated so that if we change that schema and merge, it triggers an action that regenerates the class for our SDK's, and makes a PR on this repo to update it.
Actions on merge
This also implements a deploy github action with use of release-please, that automatically versions the SDK when a merge to master is made, running the tests beforehand.
Once a release PR is made by release please, a developer needs to sign off on the changes. Once this Release PR is signed off and merged, then the deploy action will run again, release-please will detect this, and create a new release. The deploy step will recognise this too, and push the package to Nuget.
Nice To haves:
Tests:
The tests have been written into the MsTest project, and are setup to run on push.
Mocking has been used where appropriate to test up to the point of the network request, ensuring that options etc are as expected, and the SDK responds gracefully to errors/exceptions.