Skip to content
This repository has been archived by the owner on Apr 20, 2019. It is now read-only.

Referencing functions in plugin config #16

Closed
asaf opened this issue Jun 9, 2015 · 5 comments
Closed

Referencing functions in plugin config #16

asaf opened this issue Jun 9, 2015 · 5 comments

Comments

@asaf
Copy link

asaf commented Jun 9, 2015

Sometimes it's impossible to define all plugins via glue's manifest,
(i.e when a method should be referenced by the plugin options)

It could be nice if rejoice could support hooks where plugins can be registered programmatically, maybe by leveraging glue's preConnections / prePlugins hooks.

Thanks.

@lloydbenson
Copy link
Contributor

I am not sure what you have in mind here. Rejoice is simply a CLI utility that uses the glue manifest to start up. Do you have a PR in mind?

@asaf
Copy link
Author

asaf commented Jun 9, 2015

@lloydbenson Plugins may require more than just JSON to be configured,
example can be https://github.com/iceddev/hapi-strategy plugin that adds a strategies (it requires the validation function to be passed as apart of the strategy options)

There must be a way to add extra plugins written in code and combine them to the overall plugin list passed to glue, otherwise any plugin that consumes functions to be configured cannot be used with rejoice, Unless i'm missing something, I think it's a hard limitation.

@lloydbenson
Copy link
Contributor

The point of rejoice is to use just a simple json structure and having the cli use that. You don't obviously have to use rejoice, you can use glue directly and many people prefer that if they like to express it via code vs configuration. I think what you are saying here is that you want the glue manifest to be more expressive. Wouldn't that be a glue issue you'd want to address? Or am I still missing the point?

@asaf
Copy link
Author

asaf commented Jun 13, 2015

Glue has some hooks (such prePlugins), rejoice hides them,
I'm also unable to register plugin programmatically (via my plugin defined in the manifest) because Hapi fails when registering a plugin via a plugin.

To summarize: there is no way to hook plugins that requires function references when using rejoice.

Feel free to close the issue if you guys never hit such a requirement ;)

@lloydbenson
Copy link
Contributor

I think you can use glue if you want to do programmatic registering rather than rejoice. If we wanted to do something in rejoice, I'd like it to be represented as a JSON object as that is the major goal of this repo. I will close this up but if you have other thoughts on the subject let me know.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants