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

Plugin loader which understands module names and file paths. #685

Merged
merged 2 commits into from
Dec 2, 2020

Conversation

adrianmroz
Copy link
Collaborator

Fixes: #682

@adrianmroz adrianmroz added the bug label Dec 1, 2020
@adrianmroz adrianmroz added this to In progress in Turnilo 1.29 via automation Dec 1, 2020
@adrianmroz adrianmroz moved this from In progress to Review in progress in Turnilo 1.29 Dec 1, 2020
throw new Error(`Couldn't load module from path ${pluginPath}`);
}
if (!module || !isFunction(module.plugin)) {
throw new Error("Module has no plugin function defined");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Put some context into error message.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This error is in context of loading specific plugin, error is caught and logged with plugin name here:

LOGGER.warn(`Plugin ${name} threw an error: ${e.message}`);

What else could I add?

Turnilo 1.29 automation moved this from Review in progress to Reviewer approved Dec 1, 2020
@adrianmroz adrianmroz merged commit 693c682 into master Dec 2, 2020
Turnilo 1.29 automation moved this from Reviewer approved to Done Dec 2, 2020
@adrianmroz adrianmroz deleted the bugfix/plugin-paths branch December 2, 2020 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Turnilo 1.29
  
Done
Development

Successfully merging this pull request may close these issues.

Path for plugins should be relative to config file
3 participants