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 op-js uses a singleton approach, where every family of commands is exported. This is nice and handy for quick importing, but we've had requests to make the project class-based so you can have multiple instances going at the same time.
Use cases
There are handful of benefits:
Requiring different versions of the CLI
Supplying a specific path to the op binary
Supporting Service Account and Connect environment variables
Proposed solution
Convert all the exported command functions/objects into methods on an OPJS class that can be instantiated with options:
Summary
Currently
op-js
uses a singleton approach, where every family of commands is exported. This is nice and handy for quick importing, but we've had requests to make the project class-based so you can have multiple instances going at the same time.Use cases
There are handful of benefits:
Proposed solution
Convert all the exported command functions/objects into methods on an
OPJS
class that can be instantiated with options:Is there a workaround to accomplish this today?
All of this is technically possible with our current setup, but it's a little messy and obviously only supports a single instance of the library.
The text was updated successfully, but these errors were encountered: