// Generated by CoffeeScript 2.5.1
module.exports = {
  name: '@nikitajs/core/lib/plugins/history',
  hooks: {
    'nikita:normalize': function(action, handler) {
      return async function() {
        action = (await handler.call(null, ...arguments));
        action.children = [];
        if (action.siblings == null) {
          action.siblings = [];
        }
        if (action.parent) {
          action.siblings = action.parent.children;
        }
        if (action.parent) {
          action.sibling = action.siblings.slice(-1)[0];
        }
        return action;
      };
    },
    'nikita:result': function({action, error, output}) {
      if (!action.parent) {
        return;
      }
      return action.parent.children.push({
        children: action.children,
        metadata: action.metadata,
        config: action.config,
        error: error,
        output: output
      });
    }
  }
};

@@ -689,24 +689,202 @@
 rn;%0A      %7D%0A
+      // A bastard is not recognized by their parent as children%0A      // examples include conditions and assertions%0A      if (action.metadata.bastard) %7B%0A        return;%0A      %7D%0A
       return

build previous feature