@hapi/h2o2
Advanced tools
Comparing version 9.0.1 to 9.0.2
@@ -7,3 +7,3 @@ 'use strict'; | ||
const Hoek = require('@hapi/hoek'); | ||
const Joi = require('@hapi/joi'); | ||
const Validate = require('@hapi/validate'); | ||
const Wreck = require('@hapi/wreck'); | ||
@@ -32,27 +32,27 @@ | ||
internals.schema = Joi.object({ | ||
httpClient: Joi.object({ | ||
request: Joi.func(), | ||
parseCacheControl: Joi.func() | ||
internals.schema = Validate.object({ | ||
httpClient: Validate.object({ | ||
request: Validate.func(), | ||
parseCacheControl: Validate.func() | ||
}), | ||
host: Joi.string(), | ||
port: Joi.number().integer(), | ||
protocol: Joi.string().valid('http', 'https', 'http:', 'https:'), | ||
uri: Joi.string(), | ||
passThrough: Joi.boolean(), | ||
localStatePassThrough: Joi.boolean(), | ||
acceptEncoding: Joi.boolean().when('passThrough', { is: true, otherwise: Joi.forbidden() }), | ||
rejectUnauthorized: Joi.boolean(), | ||
xforward: Joi.boolean(), | ||
redirects: Joi.number().min(0).integer().allow(false), | ||
timeout: Joi.number().integer(), | ||
mapUri: Joi.func(), | ||
onResponse: Joi.func(), | ||
onRequest: Joi.func(), | ||
agent: Joi.object(), | ||
ttl: Joi.string().valid('upstream').allow(null), | ||
maxSockets: Joi.number().positive().allow(false), | ||
secureProtocol: Joi.string(), | ||
ciphers: Joi.string(), | ||
downstreamResponseTime: Joi.boolean() | ||
host: Validate.string(), | ||
port: Validate.number().integer(), | ||
protocol: Validate.string().valid('http', 'https', 'http:', 'https:'), | ||
uri: Validate.string(), | ||
passThrough: Validate.boolean(), | ||
localStatePassThrough: Validate.boolean(), | ||
acceptEncoding: Validate.boolean().when('passThrough', { is: true, otherwise: Validate.forbidden() }), | ||
rejectUnauthorized: Validate.boolean(), | ||
xforward: Validate.boolean(), | ||
redirects: Validate.number().min(0).integer().allow(false), | ||
timeout: Validate.number().integer(), | ||
mapUri: Validate.func(), | ||
onResponse: Validate.func(), | ||
onRequest: Validate.func(), | ||
agent: Validate.object(), | ||
ttl: Validate.string().valid('upstream').allow(null), | ||
maxSockets: Validate.number().positive().allow(false), | ||
secureProtocol: Validate.string(), | ||
ciphers: Validate.string(), | ||
downstreamResponseTime: Validate.boolean() | ||
}) | ||
@@ -86,3 +86,3 @@ .xor('host', 'mapUri', 'uri') | ||
const settings = Hoek.applyToDefaults(internals.defaults, handlerOptions, { shallow: ['agent'] }); | ||
Joi.assert(handlerOptions, internals.schema, 'Invalid proxy handler options (' + route.path + ')'); | ||
Validate.assert(handlerOptions, internals.schema, 'Invalid proxy handler options (' + route.path + ')'); | ||
Hoek.assert(!route.settings.payload || ((route.settings.payload.output === 'data' || route.settings.payload.output === 'stream') && !route.settings.payload.parse), 'Cannot proxy if payload is parsed or if output is not stream or data'); | ||
@@ -89,0 +89,0 @@ settings.mapUri = handlerOptions.mapUri || internals.mapUri(handlerOptions.protocol, handlerOptions.host, handlerOptions.port, handlerOptions.uri); |
{ | ||
"name": "@hapi/h2o2", | ||
"description": "Proxy handler plugin for hapi.js", | ||
"version": "9.0.1", | ||
"version": "9.0.2", | ||
"repository": "git://github.com/hapijs/h2o2", | ||
"main": "lib/index.js", | ||
"engines": { | ||
"node": ">=12.0.0" | ||
}, | ||
"files": [ | ||
@@ -20,3 +23,3 @@ "lib" | ||
"@hapi/hoek": "9.x.x", | ||
"@hapi/joi": "17.x.x", | ||
"@hapi/validate": "1.x.x", | ||
"@hapi/wreck": "17.x.x" | ||
@@ -26,5 +29,5 @@ }, | ||
"@hapi/code": "8.x.x", | ||
"@hapi/hapi": "19.x.x", | ||
"@hapi/hapi": "20.x.x", | ||
"@hapi/inert": "6.x.x", | ||
"@hapi/lab": "22.x.x" | ||
"@hapi/lab": "24.x.x" | ||
}, | ||
@@ -31,0 +34,0 @@ "scripts": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12891
+ Added@hapi/validate@1.x.x
+ Added@hapi/validate@1.1.3(transitive)
- Removed@hapi/joi@17.x.x
- Removed@hapi/address@4.1.0(transitive)
- Removed@hapi/formula@2.0.0(transitive)
- Removed@hapi/joi@17.1.1(transitive)
- Removed@hapi/pinpoint@2.0.1(transitive)