Separately, how are you thinking about designing your plugin system? I built a PoC here [1] that basically revolves around combining a DI container with the decorator pattern. We start with an initial default DI container/object, then that container is passed to a plugin which wraps certain methods or adds new ones. That new container is then passed to the next plugin which wraps it, etc, etc. Actual implementation is here [2]. The only thing that sucks about my design is that plugins must call `.bind(this)` when wrapping a method. So basically plugins have unfettered access to my DI container. Perhaps I'm giving plugins too much power? :shrug_shoulders:
0: https://github.com/AlexErrant/Pentive/blob/main/design-decis...
1: https://github.com/AlexErrant/Pentive/blob/main/app/src/plug...
2: https://github.com/AlexErrant/Pentive/blob/main/app/src/plug...