New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

kookaburra

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kookaburra - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

15

index.js

@@ -17,3 +17,3 @@ const Package = require('./package.json');

// provided in the handler and we just returned by default.
if (handlerResult === undefined && pluginOptions.skipUndefined) {
if (pluginOptions.skipUndefined && handlerResult === undefined) {
request.log(['handler'],

@@ -23,3 +23,3 @@ `Undefined return value ignored in generator handler ${handler.name}`);

}
// If the success result of the handler is an error either:

@@ -31,3 +31,5 @@ // 1. An error was returned.

// For this reason, if it is an error, we just ignore it.
if (handlerResult !== undefined && handlerResult.isBoom && pluginOptions.skipReturnError) {
if (pluginOptions.skipReturnError &&
handlerResult instanceof Error &&
handlerResult.isBoom) {
request.log(['handler'], `Unthrown error ignored in generator handler ${handler.name}`);

@@ -41,7 +43,8 @@ return;

// is probably enough to determine that reply was already called and we should do nothing.
if (handlerResult !== undefined &&
if (pluginOptions.skipReturnReply &&
handlerResult !== undefined &&
handlerResult !== null &&
handlerResult.statusCode !== undefined &&
handlerResult.headers !== undefined &&
handlerResult.source !== undefined &&
pluginOptions.skipReturnReply) {
handlerResult.source !== undefined) {
return;

@@ -48,0 +51,0 @@ }

2

package.json
{
"name": "kookaburra",
"version": "1.0.2",
"version": "1.0.3",
"description": "Kookaburra is a Hapi plugin that lets you use generator function coroutines as handlers using Bluebird",

@@ -5,0 +5,0 @@ "repository": "xargi/kookaburra",

@@ -35,3 +35,3 @@ # Kookaburra

- patchAll:
- Automatically patch all detected generator handlers in route tables. If disabled, you must use the ```handler: { coroutine: *fn() {...} }``` syntax. Default value: ```true```.
- Automatically patch all detected generator handlers in route tables. If disabled, you must use the ```handler: { coroutine: *fn() {...} }``` syntax to define a handler. Default value: ```true```.
- skipReturnReply:

@@ -38,0 +38,0 @@ - Skip replying when a ```return reply();``` return value is detected. If disabled, you shouldn't use that syntax, but it may allow avoiding a falsely detected reply call. Default value: ```true```.

@@ -0,0 +0,0 @@ const Hapi = require('hapi');

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc