Skip to content
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

Limit plugins to use interfaces only #33

Open
martinheidegger opened this issue Feb 22, 2022 · 0 comments
Open

Limit plugins to use interfaces only #33

martinheidegger opened this issue Feb 22, 2022 · 0 comments
Labels
plugin related to the plugin mechanism

Comments

@martinheidegger
Copy link
Contributor

For plugins to work well loaded dynamically, the definition of createPlugin needs to be put into a separate dependency (@tradle/plugin ?) that contains only the interfaces and is used as an intermediate between the plugins loaded and mycloud.

export type CreatePlugin<BotComponent> = (components:IBotComponents, opts:IPluginOpts) => IPluginExports<BotComponent>

Additionally, current plugins freely access a variety of sources. External dependencies such as @tradle/constants are okay but internal dependencies, such as in the examples below, will make it impossible to move the plugins outside of this repository. These need to be changed into either external dependencies or inlined into the plugin.

@martinheidegger martinheidegger added the plugin related to the plugin mechanism label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin related to the plugin mechanism
Projects
None yet
Development

No branches or pull requests

1 participant