You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's a fair bit of duplicate code that can be eliminated between the two. The most complicated part of this is moving more logging into the client and utility functions.
The text was updated successfully, but these errors were encountered:
Previously, there was no way for users to create new instances of
`SindriClient` because both the logger and the internal generated API client
operated on a global level. This updates all of that so that instances are
fully independent, and adds a `SindriClient.create()` method to initialize new
client instances. These can use different credentials, have a different log
level, etc.
As part of the modularization, I configured openapi-typescript-codegen to use a
persistent `request.ts` module that we can customize. This allows our special
handling of `FormData` to live outside of the code that gets clobbered with
each regeneration. I also hacked in a `logger` field in the `OpenAPIConfig`
class which `request.ts` uses to add debug logging around all API
requests/responses.
I made significant progress on getting the CLI to use the client consistently.
All of the commands use it for all logging and requests now, but we still have
two parallel implementations of the packaging and polling for circuit
deployment so that's a significant last piece that still needs to be addressed.
Because the client requests are now logged internally, I was able to remove all
of that explicit logging from the CLI commands. This means there's no longer
the fancy logic around not logging repeated poll responses if the status hasn't
changed, but I think it's worth it to have the request logging be more uniform
and universal.
Making these changes required regenerating the internal API client, so this
pulls in miscellaneous backend API changes that have taken place. Nothing
particularly major, adding `noir_version` to Noir circuit responses is one
example, but these are mixed in here.
Connects #60Closes#58Closes#70
Merges #73
There's a fair bit of duplicate code that can be eliminated between the two. The most complicated part of this is moving more logging into the client and utility functions.
The text was updated successfully, but these errors were encountered: