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
Currently, only the built-in CLS_REQ and CLS_RES proxy providers are able to be injected in other proxy providers.
There is only a partial support for injecting custom proxy providers with some manual work by calling await cls.resolveProxyProviders(TheOtherProvider) in proxy provider factories when they depend on other proxy providers and their value is needed at the time of construction.
There is no support for this workflow in class proxy providers, because the constructor must be synchronous, but resolving proxy providers is an asynchronous operation.
Solution: when resolving proxy providers, scan their dependency array for other proxy providers and resolve those first. That should ensure that dependent proxy providers are always resolved when needed in other proxy providers.
The text was updated successfully, but these errors were encountered:
Papooch
changed the title
Add support for injecting proxy providers into other proxy providers
Add proper support for injecting proxy providers into other proxy providers
Jul 26, 2024
Currently, only the built-in
CLS_REQ
andCLS_RES
proxy providers are able to be injected in other proxy providers.There is only a partial support for injecting custom proxy providers with some manual work by calling
await cls.resolveProxyProviders(TheOtherProvider)
in proxy provider factories when they depend on other proxy providers and their value is needed at the time of construction.There is no support for this workflow in class proxy providers, because the constructor must be synchronous, but resolving proxy providers is an asynchronous operation.
Solution: when resolving proxy providers, scan their dependency array for other proxy providers and resolve those first. That should ensure that dependent proxy providers are always resolved when needed in other proxy providers.
The text was updated successfully, but these errors were encountered: