Skip to content

Commit

Permalink
better order semantics for plugin lifecycle
Browse files Browse the repository at this point in the history
  • Loading branch information
rjrodger committed May 18, 2020
1 parent d26612c commit 97e895b
Show file tree
Hide file tree
Showing 14 changed files with 3,559 additions and 2,969 deletions.
2 changes: 1 addition & 1 deletion lib/api.js
Expand Up @@ -651,7 +651,7 @@ exports.client = function (callpoint) {
// TODO: review - this feels like a hack
// perhaps we should instantiate a virtual plugin to represent the client?
// ... but is this necessary at all?
var task_res = self.order.plugin.task.delegate({
var task_res = self.order.plugin.task.delegate.exec({
ctx: {
seneca: self
},
Expand Down
4 changes: 4 additions & 0 deletions lib/errors.js
Expand Up @@ -145,6 +145,10 @@ module.exports = {
action_timeout:
'<%=legacy_string%>Action <%=pattern%> timed out. Timeout was: <%=timeout%> (start: <%=start%>, end: <%=end%>. Message was: <%=message%>.',

use_no_args:
'The seneca.use method needs at least one argument to define a plugin.',


// Legacy error message codes

act_invalid_args:
Expand Down
87 changes: 61 additions & 26 deletions lib/use.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/use.js.map

Large diffs are not rendered by default.

0 comments on commit 97e895b

Please sign in to comment.